2 * arch/s390/kernel/s390mach.h
3 * S/390 data definitions for machine check processing
6 * Copyright (C) 2000 IBM Deutschland Entwicklung GmbH, IBM Corporation
7 * Author(s): Ingo Adlung (adlung@de.ibm.com)
13 #include <asm/types.h>
16 __u32 sd : 1; /* 00 system damage */
17 __u32 pd : 1; /* 01 instruction-processing damage */
18 __u32 sr : 1; /* 02 system recovery */
19 __u32 to_be_defined_1 : 4; /* 03-06 */
20 __u32 dg : 1; /* 07 degradation */
21 __u32 w : 1; /* 08 warning pending */
22 __u32 cp : 1; /* 09 channel-report pending */
23 __u32 to_be_defined_2 : 6; /* 10-15 */
24 __u32 se : 1; /* 16 storage error uncorrected */
25 __u32 sc : 1; /* 17 storage error corrected */
26 __u32 ke : 1; /* 18 storage-key error uncorrected */
27 __u32 ds : 1; /* 19 storage degradation */
28 __u32 to_be_defined_3 : 4; /* 20-23 */
29 __u32 fa : 1; /* 24 failing storage address validity */
30 __u32 to_be_defined_4 : 7; /* 25-31 */
31 __u32 ie : 1; /* 32 indirect storage error */
32 __u32 to_be_defined_5 : 31; /* 33-63 */
36 // machine-check-interruption code
38 typedef struct _mcic {
40 __u64 mcl; /* machine check int. code - long info */
41 mci_t mcd; /* machine check int. code - details */
43 } __attribute__ ((packed)) mcic_t;
46 // Channel Report Word
49 __u32 res1 : 1; /* reserved zero */
50 __u32 slct : 1; /* solicited */
51 __u32 oflw : 1; /* overflow */
52 __u32 chn : 1; /* chained */
53 __u32 rsc : 4; /* reporting source code */
54 __u32 anc : 1; /* ancillary report */
55 __u32 res2 : 1; /* reserved zero */
56 __u32 erc : 6; /* error-recovery code */
57 __u32 rsid : 16; /* reporting-source ID */
58 } __attribute__ ((packed)) crw_t;
60 #define CRW_RSC_MONITOR 0x2 /* monitoring facility */
61 #define CRW_RSC_SCH 0x3 /* subchannel */
62 #define CRW_RSC_CPATH 0x4 /* channel path */
63 #define CRW_RSC_CONFIG 0x9 /* configuration-alert facility */
64 #define CRW_RSC_CSS 0xB /* channel subsystem */
66 #define CRW_ERC_EVENT 0x00 /* event information pending */
67 #define CRW_ERC_AVAIL 0x01 /* available */
68 #define CRW_ERC_INIT 0x02 /* initialized */
69 #define CRW_ERC_TERROR 0x03 /* temporary error */
70 #define CRW_ERC_IPARM 0x04 /* installed parm initialized */
71 #define CRW_ERC_TERM 0x05 /* terminal */
72 #define CRW_ERC_PERRN 0x06 /* perm. error, fac. not init */
73 #define CRW_ERC_PERRI 0x07 /* perm. error, facility init */
74 #define CRW_ERC_PMOD 0x08 /* installed parameters modified */
76 #define MAX_CRW_PENDING 1024
77 #define MAX_MACH_PENDING 1024
82 typedef struct _crwe {
84 struct _crwe *crwe_next;
85 } __attribute__ ((packed)) crwe_t;
87 typedef struct _mache {
92 crwe_t *crwe; /* CRW if applicable */
98 #define MCHCHK_STATUS_TO_PROCESS 0x00000001
99 #define MCHCHK_STATUS_IN_PROGRESS 0x00000002
100 #define MCHCHK_STATUS_WAITING 0x00000004
102 void s390_init_machine_check( void );
103 void s390_do_machine_check ( void );
104 void s390_do_crw_pending ( crwe_t *pcrwe );
106 extern __inline__ int stcrw( __u32 *pcrw )
110 __asm__ __volatile__(
114 : "=d" (ccode) : "a" (pcrw)
119 #endif /* __s390mach */