xref: /openbmc/linux/arch/s390/include/asm/nmi.h (revision a8fe58ce)
1 /*
2  *   Machine check handler definitions
3  *
4  *    Copyright IBM Corp. 2000, 2009
5  *    Author(s): Ingo Adlung <adlung@de.ibm.com>,
6  *		 Martin Schwidefsky <schwidefsky@de.ibm.com>,
7  *		 Cornelia Huck <cornelia.huck@de.ibm.com>,
8  *		 Heiko Carstens <heiko.carstens@de.ibm.com>,
9  */
10 
11 #ifndef _ASM_S390_NMI_H
12 #define _ASM_S390_NMI_H
13 
14 #include <linux/const.h>
15 #include <linux/types.h>
16 
17 #define MCCK_CODE_SYSTEM_DAMAGE		_BITUL(63)
18 #define MCCK_CODE_CPU_TIMER_VALID	_BITUL(63 - 46)
19 #define MCCK_CODE_PSW_MWP_VALID		_BITUL(63 - 20)
20 #define MCCK_CODE_PSW_IA_VALID		_BITUL(63 - 23)
21 
22 #ifndef __ASSEMBLY__
23 
24 union mci {
25 	unsigned long val;
26 	struct {
27 		u64 sd :  1; /* 00 system damage */
28 		u64 pd :  1; /* 01 instruction-processing damage */
29 		u64 sr :  1; /* 02 system recovery */
30 		u64    :  1; /* 03 */
31 		u64 cd :  1; /* 04 timing-facility damage */
32 		u64 ed :  1; /* 05 external damage */
33 		u64    :  1; /* 06 */
34 		u64 dg :  1; /* 07 degradation */
35 		u64 w  :  1; /* 08 warning pending */
36 		u64 cp :  1; /* 09 channel-report pending */
37 		u64 sp :  1; /* 10 service-processor damage */
38 		u64 ck :  1; /* 11 channel-subsystem damage */
39 		u64    :  2; /* 12-13 */
40 		u64 b  :  1; /* 14 backed up */
41 		u64    :  1; /* 15 */
42 		u64 se :  1; /* 16 storage error uncorrected */
43 		u64 sc :  1; /* 17 storage error corrected */
44 		u64 ke :  1; /* 18 storage-key error uncorrected */
45 		u64 ds :  1; /* 19 storage degradation */
46 		u64 wp :  1; /* 20 psw mwp validity */
47 		u64 ms :  1; /* 21 psw mask and key validity */
48 		u64 pm :  1; /* 22 psw program mask and cc validity */
49 		u64 ia :  1; /* 23 psw instruction address validity */
50 		u64 fa :  1; /* 24 failing storage address validity */
51 		u64 vr :  1; /* 25 vector register validity */
52 		u64 ec :  1; /* 26 external damage code validity */
53 		u64 fp :  1; /* 27 floating point register validity */
54 		u64 gr :  1; /* 28 general register validity */
55 		u64 cr :  1; /* 29 control register validity */
56 		u64    :  1; /* 30 */
57 		u64 st :  1; /* 31 storage logical validity */
58 		u64 ie :  1; /* 32 indirect storage error */
59 		u64 ar :  1; /* 33 access register validity */
60 		u64 da :  1; /* 34 delayed access exception */
61 		u64    :  7; /* 35-41 */
62 		u64 pr :  1; /* 42 tod programmable register validity */
63 		u64 fc :  1; /* 43 fp control register validity */
64 		u64 ap :  1; /* 44 ancillary report */
65 		u64    :  1; /* 45 */
66 		u64 ct :  1; /* 46 cpu timer validity */
67 		u64 cc :  1; /* 47 clock comparator validity */
68 		u64    : 16; /* 47-63 */
69 	};
70 };
71 
72 struct pt_regs;
73 
74 extern void s390_handle_mcck(void);
75 extern void s390_do_machine_check(struct pt_regs *regs);
76 
77 #endif /* __ASSEMBLY__ */
78 #endif /* _ASM_S390_NMI_H */
79