aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/include/asm
diff options
context:
space:
mode:
Diffstat (limited to 'arch/s390/include/asm')
-rw-r--r--arch/s390/include/asm/bitops.h14
-rw-r--r--arch/s390/include/asm/crw.h68
-rw-r--r--arch/s390/include/asm/dasd.h10
-rw-r--r--arch/s390/include/asm/idals.h17
-rw-r--r--arch/s390/include/asm/lowcore.h653
-rw-r--r--arch/s390/include/asm/mmu_context.h2
-rw-r--r--arch/s390/include/asm/nmi.h66
-rw-r--r--arch/s390/include/asm/processor.h16
-rw-r--r--arch/s390/include/asm/ptrace.h4
-rw-r--r--arch/s390/include/asm/qdio.h1
-rw-r--r--arch/s390/include/asm/smp.h7
-rw-r--r--arch/s390/include/asm/string.h16
-rw-r--r--arch/s390/include/asm/sysinfo.h1
-rw-r--r--arch/s390/include/asm/tlbflush.h4
-rw-r--r--arch/s390/include/asm/topology.h1
-rw-r--r--arch/s390/include/asm/vtoc.h16
16 files changed, 519 insertions, 377 deletions
diff --git a/arch/s390/include/asm/bitops.h b/arch/s390/include/asm/bitops.h
index 8e9243ae0c19..b30606f6d523 100644
--- a/arch/s390/include/asm/bitops.h
+++ b/arch/s390/include/asm/bitops.h
@@ -57,7 +57,7 @@
57 * with operation of the form "set_bit(bitnr, flags)". 57 * with operation of the form "set_bit(bitnr, flags)".
58 */ 58 */
59 59
60/* bitmap tables from arch/S390/kernel/bitmap.S */ 60/* bitmap tables from arch/s390/kernel/bitmap.c */
61extern const char _oi_bitmap[]; 61extern const char _oi_bitmap[];
62extern const char _ni_bitmap[]; 62extern const char _ni_bitmap[];
63extern const char _zb_findmap[]; 63extern const char _zb_findmap[];
@@ -525,16 +525,16 @@ static inline unsigned long __ffs_word_loop(const unsigned long *addr,
525static inline unsigned long __ffz_word(unsigned long nr, unsigned long word) 525static inline unsigned long __ffz_word(unsigned long nr, unsigned long word)
526{ 526{
527#ifdef __s390x__ 527#ifdef __s390x__
528 if (likely((word & 0xffffffff) == 0xffffffff)) { 528 if ((word & 0xffffffff) == 0xffffffff) {
529 word >>= 32; 529 word >>= 32;
530 nr += 32; 530 nr += 32;
531 } 531 }
532#endif 532#endif
533 if (likely((word & 0xffff) == 0xffff)) { 533 if ((word & 0xffff) == 0xffff) {
534 word >>= 16; 534 word >>= 16;
535 nr += 16; 535 nr += 16;
536 } 536 }
537 if (likely((word & 0xff) == 0xff)) { 537 if ((word & 0xff) == 0xff) {
538 word >>= 8; 538 word >>= 8;
539 nr += 8; 539 nr += 8;
540 } 540 }
@@ -549,16 +549,16 @@ static inline unsigned long __ffz_word(unsigned long nr, unsigned long word)
549static inline unsigned long __ffs_word(unsigned long nr, unsigned long word) 549static inline unsigned long __ffs_word(unsigned long nr, unsigned long word)
550{ 550{
551#ifdef __s390x__ 551#ifdef __s390x__
552 if (likely((word & 0xffffffff) == 0)) { 552 if ((word & 0xffffffff) == 0) {
553 word >>= 32; 553 word >>= 32;
554 nr += 32; 554 nr += 32;
555 } 555 }
556#endif 556#endif
557 if (likely((word & 0xffff) == 0)) { 557 if ((word & 0xffff) == 0) {
558 word >>= 16; 558 word >>= 16;
559 nr += 16; 559 nr += 16;
560 } 560 }
561 if (likely((word & 0xff) == 0)) { 561 if ((word & 0xff) == 0) {
562 word >>= 8; 562 word >>= 8;
563 nr += 8; 563 nr += 8;
564 } 564 }
diff --git a/arch/s390/include/asm/crw.h b/arch/s390/include/asm/crw.h
new file mode 100644
index 000000000000..2185a6d619d3
--- /dev/null
+++ b/arch/s390/include/asm/crw.h
@@ -0,0 +1,68 @@
1/*
2 * Data definitions for channel report processing
3 * Copyright IBM Corp. 2000,2009
4 * Author(s): Ingo Adlung <adlung@de.ibm.com>,
5 * Martin Schwidefsky <schwidefsky@de.ibm.com>,
6 * Cornelia Huck <cornelia.huck@de.ibm.com>,
7 * Heiko Carstens <heiko.carstens@de.ibm.com>,
8 */
9
10#ifndef _ASM_S390_CRW_H
11#define _ASM_S390_CRW_H
12
13#include <linux/types.h>
14
15/*
16 * Channel Report Word
17 */
18struct crw {
19 __u32 res1 : 1; /* reserved zero */
20 __u32 slct : 1; /* solicited */
21 __u32 oflw : 1; /* overflow */
22 __u32 chn : 1; /* chained */
23 __u32 rsc : 4; /* reporting source code */
24 __u32 anc : 1; /* ancillary report */
25 __u32 res2 : 1; /* reserved zero */
26 __u32 erc : 6; /* error-recovery code */
27 __u32 rsid : 16; /* reporting-source ID */
28} __attribute__ ((packed));
29
30typedef void (*crw_handler_t)(struct crw *, struct crw *, int);
31
32extern int crw_register_handler(int rsc, crw_handler_t handler);
33extern void crw_unregister_handler(int rsc);
34extern void crw_handle_channel_report(void);
35
36#define NR_RSCS 16
37
38#define CRW_RSC_MONITOR 0x2 /* monitoring facility */
39#define CRW_RSC_SCH 0x3 /* subchannel */
40#define CRW_RSC_CPATH 0x4 /* channel path */
41#define CRW_RSC_CONFIG 0x9 /* configuration-alert facility */
42#define CRW_RSC_CSS 0xB /* channel subsystem */
43
44#define CRW_ERC_EVENT 0x00 /* event information pending */
45#define CRW_ERC_AVAIL 0x01 /* available */
46#define CRW_ERC_INIT 0x02 /* initialized */
47#define CRW_ERC_TERROR 0x03 /* temporary error */
48#define CRW_ERC_IPARM 0x04 /* installed parm initialized */
49#define CRW_ERC_TERM 0x05 /* terminal */
50#define CRW_ERC_PERRN 0x06 /* perm. error, fac. not init */
51#define CRW_ERC_PERRI 0x07 /* perm. error, facility init */
52#define CRW_ERC_PMOD 0x08 /* installed parameters modified */
53
54static inline int stcrw(struct crw *pcrw)
55{
56 int ccode;
57
58 asm volatile(
59 " stcrw 0(%2)\n"
60 " ipm %0\n"
61 " srl %0,28\n"
62 : "=d" (ccode), "=m" (*pcrw)
63 : "a" (pcrw)
64 : "cc" );
65 return ccode;
66}
67
68#endif /* _ASM_S390_CRW_H */
diff --git a/arch/s390/include/asm/dasd.h b/arch/s390/include/asm/dasd.h
index e2db6f16d9c8..218bce81ec70 100644
--- a/arch/s390/include/asm/dasd.h
+++ b/arch/s390/include/asm/dasd.h
@@ -162,15 +162,15 @@ typedef struct dasd_profile_info_t {
162 unsigned int dasd_io_nr_req[32]; /* histogram of # of requests in chanq */ 162 unsigned int dasd_io_nr_req[32]; /* histogram of # of requests in chanq */
163} dasd_profile_info_t; 163} dasd_profile_info_t;
164 164
165/* 165/*
166 * struct format_data_t 166 * struct format_data_t
167 * represents all data necessary to format a dasd 167 * represents all data necessary to format a dasd
168 */ 168 */
169typedef struct format_data_t { 169typedef struct format_data_t {
170 int start_unit; /* from track */ 170 unsigned int start_unit; /* from track */
171 int stop_unit; /* to track */ 171 unsigned int stop_unit; /* to track */
172 int blksize; /* sectorsize */ 172 unsigned int blksize; /* sectorsize */
173 int intensity; 173 unsigned int intensity;
174} format_data_t; 174} format_data_t;
175 175
176/* 176/*
diff --git a/arch/s390/include/asm/idals.h b/arch/s390/include/asm/idals.h
index e82c10efe65a..aae276d00383 100644
--- a/arch/s390/include/asm/idals.h
+++ b/arch/s390/include/asm/idals.h
@@ -44,24 +44,18 @@ idal_is_needed(void *vaddr, unsigned int length)
44/* 44/*
45 * Return the number of idal words needed for an address/length pair. 45 * Return the number of idal words needed for an address/length pair.
46 */ 46 */
47static inline unsigned int 47static inline unsigned int idal_nr_words(void *vaddr, unsigned int length)
48idal_nr_words(void *vaddr, unsigned int length)
49{ 48{
50#ifdef __s390x__ 49 return ((__pa(vaddr) & (IDA_BLOCK_SIZE-1)) + length +
51 if (idal_is_needed(vaddr, length)) 50 (IDA_BLOCK_SIZE-1)) >> IDA_SIZE_LOG;
52 return ((__pa(vaddr) & (IDA_BLOCK_SIZE-1)) + length +
53 (IDA_BLOCK_SIZE-1)) >> IDA_SIZE_LOG;
54#endif
55 return 0;
56} 51}
57 52
58/* 53/*
59 * Create the list of idal words for an address/length pair. 54 * Create the list of idal words for an address/length pair.
60 */ 55 */
61static inline unsigned long * 56static inline unsigned long *idal_create_words(unsigned long *idaws,
62idal_create_words(unsigned long *idaws, void *vaddr, unsigned int length) 57 void *vaddr, unsigned int length)
63{ 58{
64#ifdef __s390x__
65 unsigned long paddr; 59 unsigned long paddr;
66 unsigned int cidaw; 60 unsigned int cidaw;
67 61
@@ -74,7 +68,6 @@ idal_create_words(unsigned long *idaws, void *vaddr, unsigned int length)
74 paddr += IDA_BLOCK_SIZE; 68 paddr += IDA_BLOCK_SIZE;
75 *idaws++ = paddr; 69 *idaws++ = paddr;
76 } 70 }
77#endif
78 return idaws; 71 return idaws;
79} 72}
80 73
diff --git a/arch/s390/include/asm/lowcore.h b/arch/s390/include/asm/lowcore.h
index f3720defdd16..b349f1c7fdfa 100644
--- a/arch/s390/include/asm/lowcore.h
+++ b/arch/s390/include/asm/lowcore.h
@@ -11,129 +11,118 @@
11#ifndef _ASM_S390_LOWCORE_H 11#ifndef _ASM_S390_LOWCORE_H
12#define _ASM_S390_LOWCORE_H 12#define _ASM_S390_LOWCORE_H
13 13
14#ifndef __s390x__ 14#define __LC_IPL_PARMBLOCK_PTR 0x0014
15#define __LC_EXT_OLD_PSW 0x018 15#define __LC_EXT_PARAMS 0x0080
16#define __LC_SVC_OLD_PSW 0x020 16#define __LC_CPU_ADDRESS 0x0084
17#define __LC_PGM_OLD_PSW 0x028 17#define __LC_EXT_INT_CODE 0x0086
18#define __LC_MCK_OLD_PSW 0x030
19#define __LC_IO_OLD_PSW 0x038
20#define __LC_EXT_NEW_PSW 0x058
21#define __LC_SVC_NEW_PSW 0x060
22#define __LC_PGM_NEW_PSW 0x068
23#define __LC_MCK_NEW_PSW 0x070
24#define __LC_IO_NEW_PSW 0x078
25#else /* !__s390x__ */
26#define __LC_EXT_OLD_PSW 0x0130
27#define __LC_SVC_OLD_PSW 0x0140
28#define __LC_PGM_OLD_PSW 0x0150
29#define __LC_MCK_OLD_PSW 0x0160
30#define __LC_IO_OLD_PSW 0x0170
31#define __LC_EXT_NEW_PSW 0x01b0
32#define __LC_SVC_NEW_PSW 0x01c0
33#define __LC_PGM_NEW_PSW 0x01d0
34#define __LC_MCK_NEW_PSW 0x01e0
35#define __LC_IO_NEW_PSW 0x01f0
36#endif /* !__s390x__ */
37
38#define __LC_IPL_PARMBLOCK_PTR 0x014
39#define __LC_EXT_PARAMS 0x080
40#define __LC_CPU_ADDRESS 0x084
41#define __LC_EXT_INT_CODE 0x086
42
43#define __LC_SVC_ILC 0x088
44#define __LC_SVC_INT_CODE 0x08A
45#define __LC_PGM_ILC 0x08C
46#define __LC_PGM_INT_CODE 0x08E
47 18
48#define __LC_PER_ATMID 0x096 19#define __LC_SVC_ILC 0x0088
49#define __LC_PER_ADDRESS 0x098 20#define __LC_SVC_INT_CODE 0x008a
50#define __LC_PER_ACCESS_ID 0x0A1 21#define __LC_PGM_ILC 0x008c
51#define __LC_AR_MODE_ID 0x0A3 22#define __LC_PGM_INT_CODE 0x008e
52 23
53#define __LC_SUBCHANNEL_ID 0x0B8 24#define __LC_PER_ATMID 0x0096
54#define __LC_SUBCHANNEL_NR 0x0BA 25#define __LC_PER_ADDRESS 0x0098
55#define __LC_IO_INT_PARM 0x0BC 26#define __LC_PER_ACCESS_ID 0x00a1
56#define __LC_IO_INT_WORD 0x0C0 27#define __LC_AR_MODE_ID 0x00a3
57#define __LC_MCCK_CODE 0x0E8
58 28
59#define __LC_LAST_BREAK 0x110 29#define __LC_SUBCHANNEL_ID 0x00b8
60 30#define __LC_SUBCHANNEL_NR 0x00ba
61#define __LC_RETURN_PSW 0x200 31#define __LC_IO_INT_PARM 0x00bc
62 32#define __LC_IO_INT_WORD 0x00c0
63#define __LC_SAVE_AREA 0xC00 33#define __LC_MCCK_CODE 0x00e8
64
65#ifndef __s390x__
66#define __LC_IRB 0x208
67#define __LC_SYNC_ENTER_TIMER 0x248
68#define __LC_ASYNC_ENTER_TIMER 0x250
69#define __LC_EXIT_TIMER 0x258
70#define __LC_USER_TIMER 0x260
71#define __LC_SYSTEM_TIMER 0x268
72#define __LC_STEAL_TIMER 0x270
73#define __LC_LAST_UPDATE_TIMER 0x278
74#define __LC_LAST_UPDATE_CLOCK 0x280
75#define __LC_RETURN_MCCK_PSW 0x288
76#define __LC_KERNEL_STACK 0xC40
77#define __LC_THREAD_INFO 0xC44
78#define __LC_ASYNC_STACK 0xC48
79#define __LC_KERNEL_ASCE 0xC4C
80#define __LC_USER_ASCE 0xC50
81#define __LC_PANIC_STACK 0xC54
82#define __LC_CPUID 0xC60
83#define __LC_CPUADDR 0xC68
84#define __LC_IPLDEV 0xC7C
85#define __LC_CURRENT 0xC90
86#define __LC_INT_CLOCK 0xC98
87#else /* __s390x__ */
88#define __LC_IRB 0x210
89#define __LC_SYNC_ENTER_TIMER 0x250
90#define __LC_ASYNC_ENTER_TIMER 0x258
91#define __LC_EXIT_TIMER 0x260
92#define __LC_USER_TIMER 0x268
93#define __LC_SYSTEM_TIMER 0x270
94#define __LC_STEAL_TIMER 0x278
95#define __LC_LAST_UPDATE_TIMER 0x280
96#define __LC_LAST_UPDATE_CLOCK 0x288
97#define __LC_RETURN_MCCK_PSW 0x290
98#define __LC_KERNEL_STACK 0xD40
99#define __LC_THREAD_INFO 0xD48
100#define __LC_ASYNC_STACK 0xD50
101#define __LC_KERNEL_ASCE 0xD58
102#define __LC_USER_ASCE 0xD60
103#define __LC_PANIC_STACK 0xD68
104#define __LC_CPUID 0xD80
105#define __LC_CPUADDR 0xD88
106#define __LC_IPLDEV 0xDB8
107#define __LC_CURRENT 0xDD8
108#define __LC_INT_CLOCK 0xDE8
109#define __LC_VDSO_PER_CPU 0xE38
110#endif /* __s390x__ */
111 34
112#define __LC_PASTE 0xE40 35#define __LC_DUMP_REIPL 0x0e00
113 36
114#define __LC_PANIC_MAGIC 0xE00
115#ifndef __s390x__ 37#ifndef __s390x__
116#define __LC_PFAULT_INTPARM 0x080 38#define __LC_EXT_OLD_PSW 0x0018
117#define __LC_CPU_TIMER_SAVE_AREA 0x0D8 39#define __LC_SVC_OLD_PSW 0x0020
118#define __LC_CLOCK_COMP_SAVE_AREA 0x0E0 40#define __LC_PGM_OLD_PSW 0x0028
119#define __LC_PSW_SAVE_AREA 0x100 41#define __LC_MCK_OLD_PSW 0x0030
120#define __LC_PREFIX_SAVE_AREA 0x108 42#define __LC_IO_OLD_PSW 0x0038
121#define __LC_AREGS_SAVE_AREA 0x120 43#define __LC_EXT_NEW_PSW 0x0058
122#define __LC_FPREGS_SAVE_AREA 0x160 44#define __LC_SVC_NEW_PSW 0x0060
123#define __LC_GPREGS_SAVE_AREA 0x180 45#define __LC_PGM_NEW_PSW 0x0068
124#define __LC_CREGS_SAVE_AREA 0x1C0 46#define __LC_MCK_NEW_PSW 0x0070
47#define __LC_IO_NEW_PSW 0x0078
48#define __LC_SAVE_AREA 0x0200
49#define __LC_RETURN_PSW 0x0240
50#define __LC_RETURN_MCCK_PSW 0x0248
51#define __LC_SYNC_ENTER_TIMER 0x0250
52#define __LC_ASYNC_ENTER_TIMER 0x0258
53#define __LC_EXIT_TIMER 0x0260
54#define __LC_USER_TIMER 0x0268
55#define __LC_SYSTEM_TIMER 0x0270
56#define __LC_STEAL_TIMER 0x0278
57#define __LC_LAST_UPDATE_TIMER 0x0280
58#define __LC_LAST_UPDATE_CLOCK 0x0288
59#define __LC_CURRENT 0x0290
60#define __LC_THREAD_INFO 0x0294
61#define __LC_KERNEL_STACK 0x0298
62#define __LC_ASYNC_STACK 0x029c
63#define __LC_PANIC_STACK 0x02a0
64#define __LC_KERNEL_ASCE 0x02a4
65#define __LC_USER_ASCE 0x02a8
66#define __LC_USER_EXEC_ASCE 0x02ac
67#define __LC_CPUID 0x02b0
68#define __LC_INT_CLOCK 0x02c8
69#define __LC_IRB 0x0300
70#define __LC_PFAULT_INTPARM 0x0080
71#define __LC_CPU_TIMER_SAVE_AREA 0x00d8
72#define __LC_CLOCK_COMP_SAVE_AREA 0x00e0
73#define __LC_PSW_SAVE_AREA 0x0100
74#define __LC_PREFIX_SAVE_AREA 0x0108
75#define __LC_AREGS_SAVE_AREA 0x0120
76#define __LC_FPREGS_SAVE_AREA 0x0160
77#define __LC_GPREGS_SAVE_AREA 0x0180
78#define __LC_CREGS_SAVE_AREA 0x01c0
125#else /* __s390x__ */ 79#else /* __s390x__ */
126#define __LC_PFAULT_INTPARM 0x11B8 80#define __LC_LAST_BREAK 0x0110
81#define __LC_EXT_OLD_PSW 0x0130
82#define __LC_SVC_OLD_PSW 0x0140
83#define __LC_PGM_OLD_PSW 0x0150
84#define __LC_MCK_OLD_PSW 0x0160
85#define __LC_IO_OLD_PSW 0x0170
86#define __LC_EXT_NEW_PSW 0x01b0
87#define __LC_SVC_NEW_PSW 0x01c0
88#define __LC_PGM_NEW_PSW 0x01d0
89#define __LC_MCK_NEW_PSW 0x01e0
90#define __LC_IO_NEW_PSW 0x01f0
91#define __LC_SAVE_AREA 0x0200
92#define __LC_RETURN_PSW 0x0280
93#define __LC_RETURN_MCCK_PSW 0x0290
94#define __LC_SYNC_ENTER_TIMER 0x02a0
95#define __LC_ASYNC_ENTER_TIMER 0x02a8
96#define __LC_EXIT_TIMER 0x02b0
97#define __LC_USER_TIMER 0x02b8
98#define __LC_SYSTEM_TIMER 0x02c0
99#define __LC_STEAL_TIMER 0x02c8
100#define __LC_LAST_UPDATE_TIMER 0x02d0
101#define __LC_LAST_UPDATE_CLOCK 0x02d8
102#define __LC_CURRENT 0x02e0
103#define __LC_THREAD_INFO 0x02e8
104#define __LC_KERNEL_STACK 0x02f0
105#define __LC_ASYNC_STACK 0x02f8
106#define __LC_PANIC_STACK 0x0300
107#define __LC_KERNEL_ASCE 0x0308
108#define __LC_USER_ASCE 0x0310
109#define __LC_USER_EXEC_ASCE 0x0318
110#define __LC_CPUID 0x0320
111#define __LC_INT_CLOCK 0x0340
112#define __LC_VDSO_PER_CPU 0x0350
113#define __LC_IRB 0x0380
114#define __LC_PASTE 0x03c0
115#define __LC_PFAULT_INTPARM 0x11b8
127#define __LC_FPREGS_SAVE_AREA 0x1200 116#define __LC_FPREGS_SAVE_AREA 0x1200
128#define __LC_GPREGS_SAVE_AREA 0x1280 117#define __LC_GPREGS_SAVE_AREA 0x1280
129#define __LC_PSW_SAVE_AREA 0x1300 118#define __LC_PSW_SAVE_AREA 0x1300
130#define __LC_PREFIX_SAVE_AREA 0x1318 119#define __LC_PREFIX_SAVE_AREA 0x1318
131#define __LC_FP_CREG_SAVE_AREA 0x131C 120#define __LC_FP_CREG_SAVE_AREA 0x131c
132#define __LC_TODREG_SAVE_AREA 0x1324 121#define __LC_TODREG_SAVE_AREA 0x1324
133#define __LC_CPU_TIMER_SAVE_AREA 0x1328 122#define __LC_CPU_TIMER_SAVE_AREA 0x1328
134#define __LC_CLOCK_COMP_SAVE_AREA 0x1331 123#define __LC_CLOCK_COMP_SAVE_AREA 0x1331
135#define __LC_AREGS_SAVE_AREA 0x1340 124#define __LC_AREGS_SAVE_AREA 0x1340
136#define __LC_CREGS_SAVE_AREA 0x1380 125#define __LC_CREGS_SAVE_AREA 0x1380
137#endif /* __s390x__ */ 126#endif /* __s390x__ */
138 127
139#ifndef __ASSEMBLY__ 128#ifndef __ASSEMBLY__
@@ -198,222 +187,240 @@ union save_area {
198struct _lowcore 187struct _lowcore
199{ 188{
200#ifndef __s390x__ 189#ifndef __s390x__
201 /* prefix area: defined by architecture */ 190 /* 0x0000 - 0x01ff: defined by architecture */
202 psw_t restart_psw; /* 0x000 */ 191 psw_t restart_psw; /* 0x0000 */
203 __u32 ccw2[4]; /* 0x008 */ 192 __u32 ccw2[4]; /* 0x0008 */
204 psw_t external_old_psw; /* 0x018 */ 193 psw_t external_old_psw; /* 0x0018 */
205 psw_t svc_old_psw; /* 0x020 */ 194 psw_t svc_old_psw; /* 0x0020 */
206 psw_t program_old_psw; /* 0x028 */ 195 psw_t program_old_psw; /* 0x0028 */
207 psw_t mcck_old_psw; /* 0x030 */ 196 psw_t mcck_old_psw; /* 0x0030 */
208 psw_t io_old_psw; /* 0x038 */ 197 psw_t io_old_psw; /* 0x0038 */
209 __u8 pad1[0x58-0x40]; /* 0x040 */ 198 __u8 pad_0x0040[0x0058-0x0040]; /* 0x0040 */
210 psw_t external_new_psw; /* 0x058 */ 199 psw_t external_new_psw; /* 0x0058 */
211 psw_t svc_new_psw; /* 0x060 */ 200 psw_t svc_new_psw; /* 0x0060 */
212 psw_t program_new_psw; /* 0x068 */ 201 psw_t program_new_psw; /* 0x0068 */
213 psw_t mcck_new_psw; /* 0x070 */ 202 psw_t mcck_new_psw; /* 0x0070 */
214 psw_t io_new_psw; /* 0x078 */ 203 psw_t io_new_psw; /* 0x0078 */
215 __u32 ext_params; /* 0x080 */ 204 __u32 ext_params; /* 0x0080 */
216 __u16 cpu_addr; /* 0x084 */ 205 __u16 cpu_addr; /* 0x0084 */
217 __u16 ext_int_code; /* 0x086 */ 206 __u16 ext_int_code; /* 0x0086 */
218 __u16 svc_ilc; /* 0x088 */ 207 __u16 svc_ilc; /* 0x0088 */
219 __u16 svc_code; /* 0x08a */ 208 __u16 svc_code; /* 0x008a */
220 __u16 pgm_ilc; /* 0x08c */ 209 __u16 pgm_ilc; /* 0x008c */
221 __u16 pgm_code; /* 0x08e */ 210 __u16 pgm_code; /* 0x008e */
222 __u32 trans_exc_code; /* 0x090 */ 211 __u32 trans_exc_code; /* 0x0090 */
223 __u16 mon_class_num; /* 0x094 */ 212 __u16 mon_class_num; /* 0x0094 */
224 __u16 per_perc_atmid; /* 0x096 */ 213 __u16 per_perc_atmid; /* 0x0096 */
225 __u32 per_address; /* 0x098 */ 214 __u32 per_address; /* 0x0098 */
226 __u32 monitor_code; /* 0x09c */ 215 __u32 monitor_code; /* 0x009c */
227 __u8 exc_access_id; /* 0x0a0 */ 216 __u8 exc_access_id; /* 0x00a0 */
228 __u8 per_access_id; /* 0x0a1 */ 217 __u8 per_access_id; /* 0x00a1 */
229 __u8 pad2[0xB8-0xA2]; /* 0x0a2 */ 218 __u8 pad_0x00a2[0x00b8-0x00a2]; /* 0x00a2 */
230 __u16 subchannel_id; /* 0x0b8 */ 219 __u16 subchannel_id; /* 0x00b8 */
231 __u16 subchannel_nr; /* 0x0ba */ 220 __u16 subchannel_nr; /* 0x00ba */
232 __u32 io_int_parm; /* 0x0bc */ 221 __u32 io_int_parm; /* 0x00bc */
233 __u32 io_int_word; /* 0x0c0 */ 222 __u32 io_int_word; /* 0x00c0 */
234 __u8 pad3[0xc8-0xc4]; /* 0x0c4 */ 223 __u8 pad_0x00c4[0x00c8-0x00c4]; /* 0x00c4 */
235 __u32 stfl_fac_list; /* 0x0c8 */ 224 __u32 stfl_fac_list; /* 0x00c8 */
236 __u8 pad4[0xd4-0xcc]; /* 0x0cc */ 225 __u8 pad_0x00cc[0x00d4-0x00cc]; /* 0x00cc */
237 __u32 extended_save_area_addr; /* 0x0d4 */ 226 __u32 extended_save_area_addr; /* 0x00d4 */
238 __u32 cpu_timer_save_area[2]; /* 0x0d8 */ 227 __u32 cpu_timer_save_area[2]; /* 0x00d8 */
239 __u32 clock_comp_save_area[2]; /* 0x0e0 */ 228 __u32 clock_comp_save_area[2]; /* 0x00e0 */
240 __u32 mcck_interruption_code[2]; /* 0x0e8 */ 229 __u32 mcck_interruption_code[2]; /* 0x00e8 */
241 __u8 pad5[0xf4-0xf0]; /* 0x0f0 */ 230 __u8 pad_0x00f0[0x00f4-0x00f0]; /* 0x00f0 */
242 __u32 external_damage_code; /* 0x0f4 */ 231 __u32 external_damage_code; /* 0x00f4 */
243 __u32 failing_storage_address; /* 0x0f8 */ 232 __u32 failing_storage_address; /* 0x00f8 */
244 __u8 pad6[0x100-0xfc]; /* 0x0fc */ 233 __u8 pad_0x00fc[0x0100-0x00fc]; /* 0x00fc */
245 __u32 st_status_fixed_logout[4];/* 0x100 */ 234 __u32 st_status_fixed_logout[4]; /* 0x0100 */
246 __u8 pad7[0x120-0x110]; /* 0x110 */ 235 __u8 pad_0x0110[0x0120-0x0110]; /* 0x0110 */
247 __u32 access_regs_save_area[16];/* 0x120 */ 236
248 __u32 floating_pt_save_area[8]; /* 0x160 */ 237 /* CPU register save area: defined by architecture */
249 __u32 gpregs_save_area[16]; /* 0x180 */ 238 __u32 access_regs_save_area[16]; /* 0x0120 */
250 __u32 cregs_save_area[16]; /* 0x1c0 */ 239 __u32 floating_pt_save_area[8]; /* 0x0160 */
251 240 __u32 gpregs_save_area[16]; /* 0x0180 */
252 psw_t return_psw; /* 0x200 */ 241 __u32 cregs_save_area[16]; /* 0x01c0 */
253 __u8 irb[64]; /* 0x208 */ 242
254 __u64 sync_enter_timer; /* 0x248 */ 243 /* Return psws. */
255 __u64 async_enter_timer; /* 0x250 */ 244 __u32 save_area[16]; /* 0x0200 */
256 __u64 exit_timer; /* 0x258 */ 245 psw_t return_psw; /* 0x0240 */
257 __u64 user_timer; /* 0x260 */ 246 psw_t return_mcck_psw; /* 0x0248 */
258 __u64 system_timer; /* 0x268 */ 247
259 __u64 steal_timer; /* 0x270 */ 248 /* CPU time accounting values */
260 __u64 last_update_timer; /* 0x278 */ 249 __u64 sync_enter_timer; /* 0x0250 */
261 __u64 last_update_clock; /* 0x280 */ 250 __u64 async_enter_timer; /* 0x0258 */
262 psw_t return_mcck_psw; /* 0x288 */ 251 __u64 exit_timer; /* 0x0260 */
263 __u8 pad8[0xc00-0x290]; /* 0x290 */ 252 __u64 user_timer; /* 0x0268 */
264 253 __u64 system_timer; /* 0x0270 */
265 /* System info area */ 254 __u64 steal_timer; /* 0x0278 */
266 __u32 save_area[16]; /* 0xc00 */ 255 __u64 last_update_timer; /* 0x0280 */
267 __u32 kernel_stack; /* 0xc40 */ 256 __u64 last_update_clock; /* 0x0288 */
268 __u32 thread_info; /* 0xc44 */ 257
269 __u32 async_stack; /* 0xc48 */ 258 /* Current process. */
270 __u32 kernel_asce; /* 0xc4c */ 259 __u32 current_task; /* 0x0290 */
271 __u32 user_asce; /* 0xc50 */ 260 __u32 thread_info; /* 0x0294 */
272 __u32 panic_stack; /* 0xc54 */ 261 __u32 kernel_stack; /* 0x0298 */
273 __u32 user_exec_asce; /* 0xc58 */ 262
274 __u8 pad10[0xc60-0xc5c]; /* 0xc5c */ 263 /* Interrupt and panic stack. */
275 /* entry.S sensitive area start */ 264 __u32 async_stack; /* 0x029c */
276 struct cpuinfo_S390 cpu_data; /* 0xc60 */ 265 __u32 panic_stack; /* 0x02a0 */
277 __u32 ipl_device; /* 0xc7c */ 266
278 /* entry.S sensitive area end */ 267 /* Address space pointer. */
279 268 __u32 kernel_asce; /* 0x02a4 */
280 /* SMP info area: defined by DJB */ 269 __u32 user_asce; /* 0x02a8 */
281 __u64 clock_comparator; /* 0xc80 */ 270 __u32 user_exec_asce; /* 0x02ac */
282 __u32 ext_call_fast; /* 0xc88 */ 271
283 __u32 percpu_offset; /* 0xc8c */ 272 /* SMP info area */
284 __u32 current_task; /* 0xc90 */ 273 cpuid_t cpu_id; /* 0x02b0 */
285 __u32 softirq_pending; /* 0xc94 */ 274 __u32 cpu_nr; /* 0x02b8 */
286 __u64 int_clock; /* 0xc98 */ 275 __u32 softirq_pending; /* 0x02bc */
287 __u8 pad11[0xe00-0xca0]; /* 0xca0 */ 276 __u32 percpu_offset; /* 0x02c0 */
288 277 __u32 ext_call_fast; /* 0x02c4 */
289 /* 0xe00 is used as indicator for dump tools */ 278 __u64 int_clock; /* 0x02c8 */
290 /* whether the kernel died with panic() or not */ 279 __u64 clock_comparator; /* 0x02d0 */
291 __u32 panic_magic; /* 0xe00 */ 280 __u8 pad_0x02d8[0x0300-0x02d8]; /* 0x02d8 */
292 281
293 /* Align to the top 1k of prefix area */ 282 /* Interrupt response block */
294 __u8 pad12[0x1000-0xe04]; /* 0xe04 */ 283 __u8 irb[64]; /* 0x0300 */
284
285 __u8 pad_0x0400[0x0e00-0x0400]; /* 0x0400 */
286
287 /*
288 * 0xe00 contains the address of the IPL Parameter Information
289 * block. Dump tools need IPIB for IPL after dump.
290 * Note: do not change the position of any fields in 0x0e00-0x0f00
291 */
292 __u32 ipib; /* 0x0e00 */
293 __u32 ipib_checksum; /* 0x0e04 */
294
295 /* Align to the top 1k of prefix area */
296 __u8 pad_0x0e08[0x1000-0x0e08]; /* 0x0e08 */
295#else /* !__s390x__ */ 297#else /* !__s390x__ */
296 /* prefix area: defined by architecture */ 298 /* 0x0000 - 0x01ff: defined by architecture */
297 __u32 ccw1[2]; /* 0x000 */ 299 __u32 ccw1[2]; /* 0x0000 */
298 __u32 ccw2[4]; /* 0x008 */ 300 __u32 ccw2[4]; /* 0x0008 */
299 __u8 pad1[0x80-0x18]; /* 0x018 */ 301 __u8 pad_0x0018[0x0080-0x0018]; /* 0x0018 */
300 __u32 ext_params; /* 0x080 */ 302 __u32 ext_params; /* 0x0080 */
301 __u16 cpu_addr; /* 0x084 */ 303 __u16 cpu_addr; /* 0x0084 */
302 __u16 ext_int_code; /* 0x086 */ 304 __u16 ext_int_code; /* 0x0086 */
303 __u16 svc_ilc; /* 0x088 */ 305 __u16 svc_ilc; /* 0x0088 */
304 __u16 svc_code; /* 0x08a */ 306 __u16 svc_code; /* 0x008a */
305 __u16 pgm_ilc; /* 0x08c */ 307 __u16 pgm_ilc; /* 0x008c */
306 __u16 pgm_code; /* 0x08e */ 308 __u16 pgm_code; /* 0x008e */
307 __u32 data_exc_code; /* 0x090 */ 309 __u32 data_exc_code; /* 0x0090 */
308 __u16 mon_class_num; /* 0x094 */ 310 __u16 mon_class_num; /* 0x0094 */
309 __u16 per_perc_atmid; /* 0x096 */ 311 __u16 per_perc_atmid; /* 0x0096 */
310 addr_t per_address; /* 0x098 */ 312 addr_t per_address; /* 0x0098 */
311 __u8 exc_access_id; /* 0x0a0 */ 313 __u8 exc_access_id; /* 0x00a0 */
312 __u8 per_access_id; /* 0x0a1 */ 314 __u8 per_access_id; /* 0x00a1 */
313 __u8 op_access_id; /* 0x0a2 */ 315 __u8 op_access_id; /* 0x00a2 */
314 __u8 ar_access_id; /* 0x0a3 */ 316 __u8 ar_access_id; /* 0x00a3 */
315 __u8 pad2[0xA8-0xA4]; /* 0x0a4 */ 317 __u8 pad_0x00a4[0x00a8-0x00a4]; /* 0x00a4 */
316 addr_t trans_exc_code; /* 0x0A0 */ 318 addr_t trans_exc_code; /* 0x00a8 */
317 addr_t monitor_code; /* 0x09c */ 319 addr_t monitor_code; /* 0x00b0 */
318 __u16 subchannel_id; /* 0x0b8 */ 320 __u16 subchannel_id; /* 0x00b8 */
319 __u16 subchannel_nr; /* 0x0ba */ 321 __u16 subchannel_nr; /* 0x00ba */
320 __u32 io_int_parm; /* 0x0bc */ 322 __u32 io_int_parm; /* 0x00bc */
321 __u32 io_int_word; /* 0x0c0 */ 323 __u32 io_int_word; /* 0x00c0 */
322 __u8 pad3[0xc8-0xc4]; /* 0x0c4 */ 324 __u8 pad_0x00c4[0x00c8-0x00c4]; /* 0x00c4 */
323 __u32 stfl_fac_list; /* 0x0c8 */ 325 __u32 stfl_fac_list; /* 0x00c8 */
324 __u8 pad4[0xe8-0xcc]; /* 0x0cc */ 326 __u8 pad_0x00cc[0x00e8-0x00cc]; /* 0x00cc */
325 __u32 mcck_interruption_code[2]; /* 0x0e8 */ 327 __u32 mcck_interruption_code[2]; /* 0x00e8 */
326 __u8 pad5[0xf4-0xf0]; /* 0x0f0 */ 328 __u8 pad_0x00f0[0x00f4-0x00f0]; /* 0x00f0 */
327 __u32 external_damage_code; /* 0x0f4 */ 329 __u32 external_damage_code; /* 0x00f4 */
328 addr_t failing_storage_address; /* 0x0f8 */ 330 addr_t failing_storage_address; /* 0x00f8 */
329 __u8 pad6[0x120-0x100]; /* 0x100 */ 331 __u8 pad_0x0100[0x0120-0x0100]; /* 0x0100 */
330 psw_t restart_old_psw; /* 0x120 */ 332 psw_t restart_old_psw; /* 0x0120 */
331 psw_t external_old_psw; /* 0x130 */ 333 psw_t external_old_psw; /* 0x0130 */
332 psw_t svc_old_psw; /* 0x140 */ 334 psw_t svc_old_psw; /* 0x0140 */
333 psw_t program_old_psw; /* 0x150 */ 335 psw_t program_old_psw; /* 0x0150 */
334 psw_t mcck_old_psw; /* 0x160 */ 336 psw_t mcck_old_psw; /* 0x0160 */
335 psw_t io_old_psw; /* 0x170 */ 337 psw_t io_old_psw; /* 0x0170 */
336 __u8 pad7[0x1a0-0x180]; /* 0x180 */ 338 __u8 pad_0x0180[0x01a0-0x0180]; /* 0x0180 */
337 psw_t restart_psw; /* 0x1a0 */ 339 psw_t restart_psw; /* 0x01a0 */
338 psw_t external_new_psw; /* 0x1b0 */ 340 psw_t external_new_psw; /* 0x01b0 */
339 psw_t svc_new_psw; /* 0x1c0 */ 341 psw_t svc_new_psw; /* 0x01c0 */
340 psw_t program_new_psw; /* 0x1d0 */ 342 psw_t program_new_psw; /* 0x01d0 */
341 psw_t mcck_new_psw; /* 0x1e0 */ 343 psw_t mcck_new_psw; /* 0x01e0 */
342 psw_t io_new_psw; /* 0x1f0 */ 344 psw_t io_new_psw; /* 0x01f0 */
343 psw_t return_psw; /* 0x200 */ 345
344 __u8 irb[64]; /* 0x210 */ 346 /* Entry/exit save area & return psws. */
345 __u64 sync_enter_timer; /* 0x250 */ 347 __u64 save_area[16]; /* 0x0200 */
346 __u64 async_enter_timer; /* 0x258 */ 348 psw_t return_psw; /* 0x0280 */
347 __u64 exit_timer; /* 0x260 */ 349 psw_t return_mcck_psw; /* 0x0290 */
348 __u64 user_timer; /* 0x268 */ 350
349 __u64 system_timer; /* 0x270 */ 351 /* CPU accounting and timing values. */
350 __u64 steal_timer; /* 0x278 */ 352 __u64 sync_enter_timer; /* 0x02a0 */
351 __u64 last_update_timer; /* 0x280 */ 353 __u64 async_enter_timer; /* 0x02a8 */
352 __u64 last_update_clock; /* 0x288 */ 354 __u64 exit_timer; /* 0x02b0 */
353 psw_t return_mcck_psw; /* 0x290 */ 355 __u64 user_timer; /* 0x02b8 */
354 __u8 pad8[0xc00-0x2a0]; /* 0x2a0 */ 356 __u64 system_timer; /* 0x02c0 */
355 /* System info area */ 357 __u64 steal_timer; /* 0x02c8 */
356 __u64 save_area[16]; /* 0xc00 */ 358 __u64 last_update_timer; /* 0x02d0 */
357 __u8 pad9[0xd40-0xc80]; /* 0xc80 */ 359 __u64 last_update_clock; /* 0x02d8 */
358 __u64 kernel_stack; /* 0xd40 */ 360
359 __u64 thread_info; /* 0xd48 */ 361 /* Current process. */
360 __u64 async_stack; /* 0xd50 */ 362 __u64 current_task; /* 0x02e0 */
361 __u64 kernel_asce; /* 0xd58 */ 363 __u64 thread_info; /* 0x02e8 */
362 __u64 user_asce; /* 0xd60 */ 364 __u64 kernel_stack; /* 0x02f0 */
363 __u64 panic_stack; /* 0xd68 */ 365
364 __u64 user_exec_asce; /* 0xd70 */ 366 /* Interrupt and panic stack. */
365 __u8 pad10[0xd80-0xd78]; /* 0xd78 */ 367 __u64 async_stack; /* 0x02f8 */
366 /* entry.S sensitive area start */ 368 __u64 panic_stack; /* 0x0300 */
367 struct cpuinfo_S390 cpu_data; /* 0xd80 */ 369
368 __u32 ipl_device; /* 0xdb8 */ 370 /* Address space pointer. */
369 __u32 pad11; /* 0xdbc */ 371 __u64 kernel_asce; /* 0x0308 */
370 /* entry.S sensitive area end */ 372 __u64 user_asce; /* 0x0310 */
371 373 __u64 user_exec_asce; /* 0x0318 */
372 /* SMP info area: defined by DJB */ 374
373 __u64 clock_comparator; /* 0xdc0 */ 375 /* SMP info area */
374 __u64 ext_call_fast; /* 0xdc8 */ 376 cpuid_t cpu_id; /* 0x0320 */
375 __u64 percpu_offset; /* 0xdd0 */ 377 __u32 cpu_nr; /* 0x0328 */
376 __u64 current_task; /* 0xdd8 */ 378 __u32 softirq_pending; /* 0x032c */
377 __u32 softirq_pending; /* 0xde0 */ 379 __u64 percpu_offset; /* 0x0330 */
378 __u32 pad_0x0de4; /* 0xde4 */ 380 __u64 ext_call_fast; /* 0x0338 */
379 __u64 int_clock; /* 0xde8 */ 381 __u64 int_clock; /* 0x0340 */
380 __u8 pad12[0xe00-0xdf0]; /* 0xdf0 */ 382 __u64 clock_comparator; /* 0x0348 */
381 383 __u64 vdso_per_cpu_data; /* 0x0350 */
382 /* 0xe00 is used as indicator for dump tools */ 384 __u8 pad_0x0358[0x0380-0x0358]; /* 0x0358 */
383 /* whether the kernel died with panic() or not */ 385
384 __u32 panic_magic; /* 0xe00 */ 386 /* Interrupt response block. */
387 __u8 irb[64]; /* 0x0380 */
385 388
386 /* Per cpu primary space access list */ 389 /* Per cpu primary space access list */
387 __u8 pad_0xe04[0xe38-0xe04]; /* 0xe04 */ 390 __u32 paste[16]; /* 0x03c0 */
388 __u64 vdso_per_cpu_data; /* 0xe38 */ 391
389 __u32 paste[16]; /* 0xe40 */ 392 __u8 pad_0x0400[0x0e00-0x0400]; /* 0x0400 */
390 393
391 __u8 pad13[0x11b8-0xe80]; /* 0xe80 */ 394 /*
392 395 * 0xe00 contains the address of the IPL Parameter Information
393 /* 64 bit extparam used for pfault, diag 250 etc */ 396 * block. Dump tools need IPIB for IPL after dump.
394 __u64 ext_params2; /* 0x11B8 */ 397 * Note: do not change the position of any fields in 0x0e00-0x0f00
395 398 */
396 __u8 pad14[0x1200-0x11C0]; /* 0x11C0 */ 399 __u64 ipib; /* 0x0e00 */
397 400 __u32 ipib_checksum; /* 0x0e08 */
398 /* System info area */ 401 __u8 pad_0x0e0c[0x11b8-0x0e0c]; /* 0x0e0c */
399 402
400 __u64 floating_pt_save_area[16]; /* 0x1200 */ 403 /* 64 bit extparam used for pfault/diag 250: defined by architecture */
401 __u64 gpregs_save_area[16]; /* 0x1280 */ 404 __u64 ext_params2; /* 0x11B8 */
402 __u32 st_status_fixed_logout[4]; /* 0x1300 */ 405 __u8 pad_0x11c0[0x1200-0x11C0]; /* 0x11C0 */
403 __u8 pad15[0x1318-0x1310]; /* 0x1310 */ 406
404 __u32 prefixreg_save_area; /* 0x1318 */ 407 /* CPU register save area: defined by architecture */
405 __u32 fpt_creg_save_area; /* 0x131c */ 408 __u64 floating_pt_save_area[16]; /* 0x1200 */
406 __u8 pad16[0x1324-0x1320]; /* 0x1320 */ 409 __u64 gpregs_save_area[16]; /* 0x1280 */
407 __u32 tod_progreg_save_area; /* 0x1324 */ 410 __u32 st_status_fixed_logout[4]; /* 0x1300 */
408 __u32 cpu_timer_save_area[2]; /* 0x1328 */ 411 __u8 pad_0x1310[0x1318-0x1310]; /* 0x1310 */
409 __u32 clock_comp_save_area[2]; /* 0x1330 */ 412 __u32 prefixreg_save_area; /* 0x1318 */
410 __u8 pad17[0x1340-0x1338]; /* 0x1338 */ 413 __u32 fpt_creg_save_area; /* 0x131c */
411 __u32 access_regs_save_area[16]; /* 0x1340 */ 414 __u8 pad_0x1320[0x1324-0x1320]; /* 0x1320 */
412 __u64 cregs_save_area[16]; /* 0x1380 */ 415 __u32 tod_progreg_save_area; /* 0x1324 */
416 __u32 cpu_timer_save_area[2]; /* 0x1328 */
417 __u32 clock_comp_save_area[2]; /* 0x1330 */
418 __u8 pad_0x1338[0x1340-0x1338]; /* 0x1338 */
419 __u32 access_regs_save_area[16]; /* 0x1340 */
420 __u64 cregs_save_area[16]; /* 0x1380 */
413 421
414 /* align to the top of the prefix area */ 422 /* align to the top of the prefix area */
415 423 __u8 pad_0x1400[0x2000-0x1400]; /* 0x1400 */
416 __u8 pad18[0x2000-0x1400]; /* 0x1400 */
417#endif /* !__s390x__ */ 424#endif /* !__s390x__ */
418} __attribute__((packed)); /* End structure*/ 425} __attribute__((packed)); /* End structure*/
419 426
@@ -433,8 +440,6 @@ static inline __u32 store_prefix(void)
433 return address; 440 return address;
434} 441}
435 442
436#define __PANIC_MAGIC 0xDEADC0DE
437
438#endif 443#endif
439 444
440#endif 445#endif
diff --git a/arch/s390/include/asm/mmu_context.h b/arch/s390/include/asm/mmu_context.h
index 28ec870655af..fc7edd6f41b6 100644
--- a/arch/s390/include/asm/mmu_context.h
+++ b/arch/s390/include/asm/mmu_context.h
@@ -74,7 +74,7 @@ static inline void update_mm(struct mm_struct *mm, struct task_struct *tsk)
74static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, 74static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
75 struct task_struct *tsk) 75 struct task_struct *tsk)
76{ 76{
77 cpu_set(smp_processor_id(), next->cpu_vm_mask); 77 cpumask_set_cpu(smp_processor_id(), mm_cpumask(next));
78 update_mm(next, tsk); 78 update_mm(next, tsk);
79} 79}
80 80
diff --git a/arch/s390/include/asm/nmi.h b/arch/s390/include/asm/nmi.h
new file mode 100644
index 000000000000..f4b60441adca
--- /dev/null
+++ b/arch/s390/include/asm/nmi.h
@@ -0,0 +1,66 @@
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/types.h>
15
16struct mci {
17 __u32 sd : 1; /* 00 system damage */
18 __u32 pd : 1; /* 01 instruction-processing damage */
19 __u32 sr : 1; /* 02 system recovery */
20 __u32 : 1; /* 03 */
21 __u32 cd : 1; /* 04 timing-facility damage */
22 __u32 ed : 1; /* 05 external damage */
23 __u32 : 1; /* 06 */
24 __u32 dg : 1; /* 07 degradation */
25 __u32 w : 1; /* 08 warning pending */
26 __u32 cp : 1; /* 09 channel-report pending */
27 __u32 sp : 1; /* 10 service-processor damage */
28 __u32 ck : 1; /* 11 channel-subsystem damage */
29 __u32 : 2; /* 12-13 */
30 __u32 b : 1; /* 14 backed up */
31 __u32 : 1; /* 15 */
32 __u32 se : 1; /* 16 storage error uncorrected */
33 __u32 sc : 1; /* 17 storage error corrected */
34 __u32 ke : 1; /* 18 storage-key error uncorrected */
35 __u32 ds : 1; /* 19 storage degradation */
36 __u32 wp : 1; /* 20 psw mwp validity */
37 __u32 ms : 1; /* 21 psw mask and key validity */
38 __u32 pm : 1; /* 22 psw program mask and cc validity */
39 __u32 ia : 1; /* 23 psw instruction address validity */
40 __u32 fa : 1; /* 24 failing storage address validity */
41 __u32 : 1; /* 25 */
42 __u32 ec : 1; /* 26 external damage code validity */
43 __u32 fp : 1; /* 27 floating point register validity */
44 __u32 gr : 1; /* 28 general register validity */
45 __u32 cr : 1; /* 29 control register validity */
46 __u32 : 1; /* 30 */
47 __u32 st : 1; /* 31 storage logical validity */
48 __u32 ie : 1; /* 32 indirect storage error */
49 __u32 ar : 1; /* 33 access register validity */
50 __u32 da : 1; /* 34 delayed access exception */
51 __u32 : 7; /* 35-41 */
52 __u32 pr : 1; /* 42 tod programmable register validity */
53 __u32 fc : 1; /* 43 fp control register validity */
54 __u32 ap : 1; /* 44 ancillary report */
55 __u32 : 1; /* 45 */
56 __u32 ct : 1; /* 46 cpu timer validity */
57 __u32 cc : 1; /* 47 clock comparator validity */
58 __u32 : 16; /* 47-63 */
59};
60
61struct pt_regs;
62
63extern void s390_handle_mcck(void);
64extern void s390_do_machine_check(struct pt_regs *regs);
65
66#endif /* _ASM_S390_NMI_H */
diff --git a/arch/s390/include/asm/processor.h b/arch/s390/include/asm/processor.h
index db4523fe38ac..61862b3ac794 100644
--- a/arch/s390/include/asm/processor.h
+++ b/arch/s390/include/asm/processor.h
@@ -42,22 +42,8 @@ static inline void get_cpu_id(cpuid_t *ptr)
42 asm volatile("stidp 0(%1)" : "=m" (*ptr) : "a" (ptr)); 42 asm volatile("stidp 0(%1)" : "=m" (*ptr) : "a" (ptr));
43} 43}
44 44
45struct cpuinfo_S390
46{
47 cpuid_t cpu_id;
48 __u16 cpu_addr;
49 __u16 cpu_nr;
50 unsigned long loops_per_jiffy;
51 unsigned long *pgd_quick;
52#ifdef __s390x__
53 unsigned long *pmd_quick;
54#endif /* __s390x__ */
55 unsigned long *pte_quick;
56 unsigned long pgtable_cache_sz;
57};
58
59extern void s390_adjust_jiffies(void); 45extern void s390_adjust_jiffies(void);
60extern void print_cpu_info(struct cpuinfo_S390 *); 46extern void print_cpu_info(void);
61extern int get_cpu_capability(unsigned int *); 47extern int get_cpu_capability(unsigned int *);
62 48
63/* 49/*
diff --git a/arch/s390/include/asm/ptrace.h b/arch/s390/include/asm/ptrace.h
index 8920025c3c02..f1b051630c50 100644
--- a/arch/s390/include/asm/ptrace.h
+++ b/arch/s390/include/asm/ptrace.h
@@ -172,6 +172,8 @@
172#define NUM_CRS 16 172#define NUM_CRS 16
173#define NUM_ACRS 16 173#define NUM_ACRS 16
174 174
175#define NUM_CR_WORDS 3
176
175#define FPR_SIZE 8 177#define FPR_SIZE 8
176#define FPC_SIZE 4 178#define FPC_SIZE 4
177#define FPC_PAD_SIZE 4 /* gcc insists on aligning the fpregs */ 179#define FPC_PAD_SIZE 4 /* gcc insists on aligning the fpregs */
@@ -334,7 +336,7 @@ struct pt_regs
334 */ 336 */
335typedef struct 337typedef struct
336{ 338{
337 unsigned long cr[3]; 339 unsigned long cr[NUM_CR_WORDS];
338} per_cr_words; 340} per_cr_words;
339 341
340#define PER_EM_MASK 0xE8000000UL 342#define PER_EM_MASK 0xE8000000UL
diff --git a/arch/s390/include/asm/qdio.h b/arch/s390/include/asm/qdio.h
index 27fc1746de15..402d6dcf0d26 100644
--- a/arch/s390/include/asm/qdio.h
+++ b/arch/s390/include/asm/qdio.h
@@ -314,6 +314,7 @@ typedef void qdio_handler_t(struct ccw_device *, unsigned int, int,
314 int, int, unsigned long); 314 int, int, unsigned long);
315 315
316/* qdio errors reported to the upper-layer program */ 316/* qdio errors reported to the upper-layer program */
317#define QDIO_ERROR_SIGA_TARGET 0x02
317#define QDIO_ERROR_SIGA_ACCESS_EXCEPTION 0x10 318#define QDIO_ERROR_SIGA_ACCESS_EXCEPTION 0x10
318#define QDIO_ERROR_SIGA_BUSY 0x20 319#define QDIO_ERROR_SIGA_BUSY 0x20
319#define QDIO_ERROR_ACTIVATE_CHECK_CONDITION 0x40 320#define QDIO_ERROR_ACTIVATE_CHECK_CONDITION 0x40
diff --git a/arch/s390/include/asm/smp.h b/arch/s390/include/asm/smp.h
index 024b91e06239..2009158a4502 100644
--- a/arch/s390/include/asm/smp.h
+++ b/arch/s390/include/asm/smp.h
@@ -50,12 +50,7 @@ extern void machine_power_off_smp(void);
50 50
51#define PROC_CHANGE_PENALTY 20 /* Schedule penalty */ 51#define PROC_CHANGE_PENALTY 20 /* Schedule penalty */
52 52
53#define raw_smp_processor_id() (S390_lowcore.cpu_data.cpu_nr) 53#define raw_smp_processor_id() (S390_lowcore.cpu_nr)
54
55static inline __u16 hard_smp_processor_id(void)
56{
57 return stap();
58}
59 54
60/* 55/*
61 * returns 1 if cpu is in stopped/check stopped state or not operational 56 * returns 1 if cpu is in stopped/check stopped state or not operational
diff --git a/arch/s390/include/asm/string.h b/arch/s390/include/asm/string.h
index d074673a6d9b..cd0241db5a46 100644
--- a/arch/s390/include/asm/string.h
+++ b/arch/s390/include/asm/string.h
@@ -100,6 +100,7 @@ static inline char *strcat(char *dst, const char *src)
100 100
101static inline char *strcpy(char *dst, const char *src) 101static inline char *strcpy(char *dst, const char *src)
102{ 102{
103#if __GNUC__ < 4
103 register int r0 asm("0") = 0; 104 register int r0 asm("0") = 0;
104 char *ret = dst; 105 char *ret = dst;
105 106
@@ -109,10 +110,14 @@ static inline char *strcpy(char *dst, const char *src)
109 : "+&a" (dst), "+&a" (src) : "d" (r0) 110 : "+&a" (dst), "+&a" (src) : "d" (r0)
110 : "cc", "memory"); 111 : "cc", "memory");
111 return ret; 112 return ret;
113#else
114 return __builtin_strcpy(dst, src);
115#endif
112} 116}
113 117
114static inline size_t strlen(const char *s) 118static inline size_t strlen(const char *s)
115{ 119{
120#if __GNUC__ < 4
116 register unsigned long r0 asm("0") = 0; 121 register unsigned long r0 asm("0") = 0;
117 const char *tmp = s; 122 const char *tmp = s;
118 123
@@ -121,6 +126,9 @@ static inline size_t strlen(const char *s)
121 " jo 0b" 126 " jo 0b"
122 : "+d" (r0), "+a" (tmp) : : "cc"); 127 : "+d" (r0), "+a" (tmp) : : "cc");
123 return r0 - (unsigned long) s; 128 return r0 - (unsigned long) s;
129#else
130 return __builtin_strlen(s);
131#endif
124} 132}
125 133
126static inline size_t strnlen(const char * s, size_t n) 134static inline size_t strnlen(const char * s, size_t n)
@@ -135,7 +143,13 @@ static inline size_t strnlen(const char * s, size_t n)
135 : "+a" (end), "+a" (tmp) : "d" (r0) : "cc"); 143 : "+a" (end), "+a" (tmp) : "d" (r0) : "cc");
136 return end - s; 144 return end - s;
137} 145}
138 146#else /* IN_ARCH_STRING_C */
147void *memchr(const void * s, int c, size_t n);
148void *memscan(void *s, int c, size_t n);
149char *strcat(char *dst, const char *src);
150char *strcpy(char *dst, const char *src);
151size_t strlen(const char *s);
152size_t strnlen(const char * s, size_t n);
139#endif /* !IN_ARCH_STRING_C */ 153#endif /* !IN_ARCH_STRING_C */
140 154
141#endif /* __KERNEL__ */ 155#endif /* __KERNEL__ */
diff --git a/arch/s390/include/asm/sysinfo.h b/arch/s390/include/asm/sysinfo.h
index ad93212d9e16..9d70057d828c 100644
--- a/arch/s390/include/asm/sysinfo.h
+++ b/arch/s390/include/asm/sysinfo.h
@@ -100,6 +100,7 @@ struct sysinfo_3_2_2 {
100 char reserved_1[24]; 100 char reserved_1[24];
101 101
102 } vm[8]; 102 } vm[8];
103 char reserved_544[3552];
103}; 104};
104 105
105static inline int stsi(void *sysinfo, int fc, int sel1, int sel2) 106static inline int stsi(void *sysinfo, int fc, int sel1, int sel2)
diff --git a/arch/s390/include/asm/tlbflush.h b/arch/s390/include/asm/tlbflush.h
index d60394b9745e..304cffa623e1 100644
--- a/arch/s390/include/asm/tlbflush.h
+++ b/arch/s390/include/asm/tlbflush.h
@@ -51,7 +51,7 @@ static inline void __tlb_flush_full(struct mm_struct *mm)
51 * If the process only ran on the local cpu, do a local flush. 51 * If the process only ran on the local cpu, do a local flush.
52 */ 52 */
53 local_cpumask = cpumask_of_cpu(smp_processor_id()); 53 local_cpumask = cpumask_of_cpu(smp_processor_id());
54 if (cpus_equal(mm->cpu_vm_mask, local_cpumask)) 54 if (cpumask_equal(mm_cpumask(mm), &local_cpumask))
55 __tlb_flush_local(); 55 __tlb_flush_local();
56 else 56 else
57 __tlb_flush_global(); 57 __tlb_flush_global();
@@ -73,7 +73,7 @@ static inline void __tlb_flush_idte(unsigned long asce)
73 73
74static inline void __tlb_flush_mm(struct mm_struct * mm) 74static inline void __tlb_flush_mm(struct mm_struct * mm)
75{ 75{
76 if (unlikely(cpus_empty(mm->cpu_vm_mask))) 76 if (unlikely(cpumask_empty(mm_cpumask(mm))))
77 return; 77 return;
78 /* 78 /*
79 * If the machine has IDTE we prefer to do a per mm flush 79 * If the machine has IDTE we prefer to do a per mm flush
diff --git a/arch/s390/include/asm/topology.h b/arch/s390/include/asm/topology.h
index c979c3b56ab0..5e0ad618dc45 100644
--- a/arch/s390/include/asm/topology.h
+++ b/arch/s390/include/asm/topology.h
@@ -5,7 +5,6 @@
5 5
6#define mc_capable() (1) 6#define mc_capable() (1)
7 7
8cpumask_t cpu_coregroup_map(unsigned int cpu);
9const struct cpumask *cpu_coregroup_mask(unsigned int cpu); 8const struct cpumask *cpu_coregroup_mask(unsigned int cpu);
10 9
11extern cpumask_t cpu_core_map[NR_CPUS]; 10extern cpumask_t cpu_core_map[NR_CPUS];
diff --git a/arch/s390/include/asm/vtoc.h b/arch/s390/include/asm/vtoc.h
index 3a5267d90d29..8406a2b3157a 100644
--- a/arch/s390/include/asm/vtoc.h
+++ b/arch/s390/include/asm/vtoc.h
@@ -39,7 +39,7 @@ struct vtoc_labeldate
39 __u16 day; 39 __u16 day;
40} __attribute__ ((packed)); 40} __attribute__ ((packed));
41 41
42struct vtoc_volume_label 42struct vtoc_volume_label_cdl
43{ 43{
44 char volkey[4]; /* volume key = volume label */ 44 char volkey[4]; /* volume key = volume label */
45 char vollbl[4]; /* volume label */ 45 char vollbl[4]; /* volume label */
@@ -56,6 +56,14 @@ struct vtoc_volume_label
56 char res3[29]; /* reserved */ 56 char res3[29]; /* reserved */
57} __attribute__ ((packed)); 57} __attribute__ ((packed));
58 58
59struct vtoc_volume_label_ldl {
60 char vollbl[4]; /* volume label */
61 char volid[6]; /* volume identifier */
62 char res3[69]; /* reserved */
63 char ldl_version; /* version number, valid for ldl format */
64 __u64 formatted_blocks; /* valid when ldl_version >= f2 */
65} __attribute__ ((packed));
66
59struct vtoc_extent 67struct vtoc_extent
60{ 68{
61 __u8 typeind; /* extent type indicator */ 69 __u8 typeind; /* extent type indicator */
@@ -140,7 +148,11 @@ struct vtoc_format4_label
140 char res2[10]; /* reserved */ 148 char res2[10]; /* reserved */
141 __u8 DS4EFLVL; /* extended free-space management level */ 149 __u8 DS4EFLVL; /* extended free-space management level */
142 struct vtoc_cchhb DS4EFPTR; /* pointer to extended free-space info */ 150 struct vtoc_cchhb DS4EFPTR; /* pointer to extended free-space info */
143 char res3[9]; /* reserved */ 151 char res3; /* reserved */
152 __u32 DS4DCYL; /* number of logical cyls */
153 char res4[2]; /* reserved */
154 __u8 DS4DEVF2; /* device flags */
155 char res5; /* reserved */
144} __attribute__ ((packed)); 156} __attribute__ ((packed));
145 157
146struct vtoc_ds5ext 158struct vtoc_ds5ext