aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/s390mach.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /drivers/s390/s390mach.h
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'drivers/s390/s390mach.h')
-rw-r--r--drivers/s390/s390mach.h79
1 files changed, 79 insertions, 0 deletions
diff --git a/drivers/s390/s390mach.h b/drivers/s390/s390mach.h
new file mode 100644
index 000000000000..7e26f0f1b0dc
--- /dev/null
+++ b/drivers/s390/s390mach.h
@@ -0,0 +1,79 @@
1/*
2 * drivers/s390/s390mach.h
3 * S/390 data definitions for machine check processing
4 *
5 * S390 version
6 * Copyright (C) 2000 IBM Deutschland Entwicklung GmbH, IBM Corporation
7 * Author(s): Ingo Adlung (adlung@de.ibm.com)
8 */
9
10#ifndef __s390mach_h
11#define __s390mach_h
12
13#include <asm/types.h>
14
15struct mci {
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 */
33};
34
35/*
36 * Channel Report Word
37 */
38struct crw {
39 __u32 res1 : 1; /* reserved zero */
40 __u32 slct : 1; /* solicited */
41 __u32 oflw : 1; /* overflow */
42 __u32 chn : 1; /* chained */
43 __u32 rsc : 4; /* reporting source code */
44 __u32 anc : 1; /* ancillary report */
45 __u32 res2 : 1; /* reserved zero */
46 __u32 erc : 6; /* error-recovery code */
47 __u32 rsid : 16; /* reporting-source ID */
48} __attribute__ ((packed));
49
50#define CRW_RSC_MONITOR 0x2 /* monitoring facility */
51#define CRW_RSC_SCH 0x3 /* subchannel */
52#define CRW_RSC_CPATH 0x4 /* channel path */
53#define CRW_RSC_CONFIG 0x9 /* configuration-alert facility */
54#define CRW_RSC_CSS 0xB /* channel subsystem */
55
56#define CRW_ERC_EVENT 0x00 /* event information pending */
57#define CRW_ERC_AVAIL 0x01 /* available */
58#define CRW_ERC_INIT 0x02 /* initialized */
59#define CRW_ERC_TERROR 0x03 /* temporary error */
60#define CRW_ERC_IPARM 0x04 /* installed parm initialized */
61#define CRW_ERC_TERM 0x05 /* terminal */
62#define CRW_ERC_PERRN 0x06 /* perm. error, fac. not init */
63#define CRW_ERC_PERRI 0x07 /* perm. error, facility init */
64#define CRW_ERC_PMOD 0x08 /* installed parameters modified */
65
66extern __inline__ int stcrw(struct crw *pcrw )
67{
68 int ccode;
69
70 __asm__ __volatile__(
71 "STCRW 0(%1)\n\t"
72 "IPM %0\n\t"
73 "SRL %0,28\n\t"
74 : "=d" (ccode) : "a" (pcrw)
75 : "cc", "1" );
76 return ccode;
77}
78
79#endif /* __s390mach */