1
2
3
4
5
6
7
8
9
10
11
12#ifndef _ASM_S390_NMI_H
13#define _ASM_S390_NMI_H
14
15#include <linux/const.h>
16#include <linux/types.h>
17
18#define MCIC_SUBCLASS_MASK (1ULL<<63 | 1ULL<<62 | 1ULL<<61 | \
19 1ULL<<59 | 1ULL<<58 | 1ULL<<56 | \
20 1ULL<<55 | 1ULL<<54 | 1ULL<<53 | \
21 1ULL<<52 | 1ULL<<47 | 1ULL<<46 | \
22 1ULL<<45 | 1ULL<<44)
23#define MCCK_CODE_SYSTEM_DAMAGE _BITUL(63)
24#define MCCK_CODE_EXT_DAMAGE _BITUL(63 - 5)
25#define MCCK_CODE_CP _BITUL(63 - 9)
26#define MCCK_CODE_CPU_TIMER_VALID _BITUL(63 - 46)
27#define MCCK_CODE_PSW_MWP_VALID _BITUL(63 - 20)
28#define MCCK_CODE_PSW_IA_VALID _BITUL(63 - 23)
29
30#define MCCK_CR14_CR_PENDING_SUB_MASK (1 << 28)
31#define MCCK_CR14_RECOVERY_SUB_MASK (1 << 27)
32#define MCCK_CR14_DEGRAD_SUB_MASK (1 << 26)
33#define MCCK_CR14_EXT_DAMAGE_SUB_MASK (1 << 25)
34#define MCCK_CR14_WARN_SUB_MASK (1 << 24)
35
36#ifndef __ASSEMBLY__
37
38union mci {
39 unsigned long val;
40 struct {
41 u64 sd : 1;
42 u64 pd : 1;
43 u64 sr : 1;
44 u64 : 1;
45 u64 cd : 1;
46 u64 ed : 1;
47 u64 : 1;
48 u64 dg : 1;
49 u64 w : 1;
50 u64 cp : 1;
51 u64 sp : 1;
52 u64 ck : 1;
53 u64 : 2;
54 u64 b : 1;
55 u64 : 1;
56 u64 se : 1;
57 u64 sc : 1;
58 u64 ke : 1;
59 u64 ds : 1;
60 u64 wp : 1;
61 u64 ms : 1;
62 u64 pm : 1;
63 u64 ia : 1;
64 u64 fa : 1;
65 u64 vr : 1;
66 u64 ec : 1;
67 u64 fp : 1;
68 u64 gr : 1;
69 u64 cr : 1;
70 u64 : 1;
71 u64 st : 1;
72 u64 ie : 1;
73 u64 ar : 1;
74 u64 da : 1;
75 u64 : 1;
76 u64 gs : 1;
77 u64 : 5;
78 u64 pr : 1;
79 u64 fc : 1;
80 u64 ap : 1;
81 u64 : 1;
82 u64 ct : 1;
83 u64 cc : 1;
84 u64 : 16;
85 };
86};
87
88#define MCESA_ORIGIN_MASK (~0x3ffUL)
89#define MCESA_LC_MASK (0xfUL)
90
91struct mcesa {
92 u8 vector_save_area[1024];
93 u8 guarded_storage_save_area[32];
94};
95
96struct pt_regs;
97
98extern void s390_handle_mcck(void);
99extern void s390_do_machine_check(struct pt_regs *regs);
100
101#endif
102#endif
103