s390/debug: debug feature version 3

Change __debug_entry structure in the following way:
 - remove redundant union
 - Field containing cpuid is expanded to 16 bits. 8-bit width was not
   enough since we already support up to 512 cpus.
 - Field containing the timestamp is expanded to 60 bits. The timestamp
   itself is now stored in the absolute Unix time format in microseconds
   taking the Epoch Index into acount.
Adjust default header for debug entries by setting minimum width for cpuid
to 4 digits.

Reviewed-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Mikhail Zaslonko <zaslonko@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
This commit is contained in:
Mikhail Zaslonko
2020-05-05 10:34:52 +02:00
committed by Heiko Carstens
parent 929a343b85
commit 0990d836ce
2 changed files with 24 additions and 25 deletions

View File

@@ -2,7 +2,7 @@
/*
* S/390 debug facility
*
* Copyright IBM Corp. 1999, 2000
* Copyright IBM Corp. 1999, 2020
*/
#ifndef DEBUG_H
#define DEBUG_H
@@ -26,19 +26,14 @@
#define DEBUG_DATA(entry) (char *)(entry + 1) /* data is stored behind */
/* the entry information */
#define __DEBUG_FEATURE_VERSION 2 /* version of debug feature */
#define __DEBUG_FEATURE_VERSION 3 /* version of debug feature */
struct __debug_entry {
union {
struct {
unsigned long clock : 52;
unsigned long exception : 1;
unsigned long level : 3;
unsigned long cpuid : 8;
} fields;
unsigned long stck;
} id;
unsigned long clock : 60;
unsigned long exception : 1;
unsigned long level : 3;
void *caller;
unsigned short cpu;
} __packed;
typedef struct __debug_entry debug_entry_t;