aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390
diff options
context:
space:
mode:
authorMartin Schwidefsky <schwidefsky@de.ibm.com>2006-01-06 03:19:28 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-06 11:33:53 -0500
commit347a8dc3b815f0c0fa62a1df075184ffe4cbdcf1 (patch)
treea6ec76690127e87fe6efa42b6238caadd6c07e7b /arch/s390
parent9bbc8346fb21fad3f678220b067450e436e45dbf (diff)
[PATCH] s390: cleanup Kconfig
Sanitize some s390 Kconfig options. We have ARCH_S390, ARCH_S390X, ARCH_S390_31, 64BIT, S390_SUPPORT and COMPAT. Replace these 6 options by S390, 64BIT and COMPAT. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/s390')
-rw-r--r--arch/s390/Kconfig27
-rw-r--r--arch/s390/Makefile6
-rw-r--r--arch/s390/appldata/appldata_base.c8
-rw-r--r--arch/s390/crypto/crypt_s390.h10
-rw-r--r--arch/s390/defconfig4
-rw-r--r--arch/s390/kernel/Makefile15
-rw-r--r--arch/s390/kernel/cpcmd.c16
-rw-r--r--arch/s390/kernel/entry64.S18
-rw-r--r--arch/s390/kernel/head.S4
-rw-r--r--arch/s390/kernel/module.c12
-rw-r--r--arch/s390/kernel/process.c12
-rw-r--r--arch/s390/kernel/ptrace.c24
-rw-r--r--arch/s390/kernel/reipl_diag.c2
-rw-r--r--arch/s390/kernel/setup.c14
-rw-r--r--arch/s390/kernel/signal.c2
-rw-r--r--arch/s390/kernel/smp.c8
-rw-r--r--arch/s390/kernel/sys_s390.c12
-rw-r--r--arch/s390/kernel/traps.c10
-rw-r--r--arch/s390/kernel/vmlinux.lds.S2
-rw-r--r--arch/s390/lib/Makefile5
-rw-r--r--arch/s390/lib/spinlock.c2
-rw-r--r--arch/s390/mm/extmem.c2
-rw-r--r--arch/s390/mm/fault.c18
-rw-r--r--arch/s390/mm/init.c8
-rw-r--r--arch/s390/mm/mmap.c2
25 files changed, 109 insertions, 134 deletions
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
index 1846fbfd6bf2..6fe532d82417 100644
--- a/arch/s390/Kconfig
+++ b/arch/s390/Kconfig
@@ -23,14 +23,14 @@ config GENERIC_BUST_SPINLOCK
23 23
24mainmenu "Linux Kernel Configuration" 24mainmenu "Linux Kernel Configuration"
25 25
26config ARCH_S390 26config S390
27 bool 27 bool
28 default y 28 default y
29 29
30config UID16 30config UID16
31 bool 31 bool
32 default y 32 default y
33 depends on ARCH_S390X = 'n' 33 depends on !64BIT
34 34
35source "init/Kconfig" 35source "init/Kconfig"
36 36
@@ -38,20 +38,12 @@ menu "Base setup"
38 38
39comment "Processor type and features" 39comment "Processor type and features"
40 40
41config ARCH_S390X 41config 64BIT
42 bool "64 bit kernel" 42 bool "64 bit kernel"
43 help 43 help
44 Select this option if you have a 64 bit IBM zSeries machine 44 Select this option if you have a 64 bit IBM zSeries machine
45 and want to use the 64 bit addressing mode. 45 and want to use the 64 bit addressing mode.
46 46
47config 64BIT
48 def_bool ARCH_S390X
49
50config ARCH_S390_31
51 bool
52 depends on ARCH_S390X = 'n'
53 default y
54
55config SMP 47config SMP
56 bool "Symmetric multi-processing support" 48 bool "Symmetric multi-processing support"
57 ---help--- 49 ---help---
@@ -101,20 +93,15 @@ config MATHEMU
101 on older S/390 machines. Say Y unless you know your machine doesn't 93 on older S/390 machines. Say Y unless you know your machine doesn't
102 need this. 94 need this.
103 95
104config S390_SUPPORT 96config COMPAT
105 bool "Kernel support for 31 bit emulation" 97 bool "Kernel support for 31 bit emulation"
106 depends on ARCH_S390X 98 depends on 64BIT
107 help 99 help
108 Select this option if you want to enable your system kernel to 100 Select this option if you want to enable your system kernel to
109 handle system-calls from ELF binaries for 31 bit ESA. This option 101 handle system-calls from ELF binaries for 31 bit ESA. This option
110 (and some other stuff like libraries and such) is needed for 102 (and some other stuff like libraries and such) is needed for
111 executing 31 bit applications. It is safe to say "Y". 103 executing 31 bit applications. It is safe to say "Y".
112 104
113config COMPAT
114 bool
115 depends on S390_SUPPORT
116 default y
117
118config SYSVIPC_COMPAT 105config SYSVIPC_COMPAT
119 bool 106 bool
120 depends on COMPAT && SYSVIPC 107 depends on COMPAT && SYSVIPC
@@ -122,7 +109,7 @@ config SYSVIPC_COMPAT
122 109
123config BINFMT_ELF32 110config BINFMT_ELF32
124 tristate "Kernel support for 31 bit ELF binaries" 111 tristate "Kernel support for 31 bit ELF binaries"
125 depends on S390_SUPPORT 112 depends on COMPAT
126 help 113 help
127 This allows you to run 32-bit Linux/ELF binaries on your zSeries 114 This allows you to run 32-bit Linux/ELF binaries on your zSeries
128 in 64 bit mode. Everybody wants this; say Y. 115 in 64 bit mode. Everybody wants this; say Y.
@@ -135,7 +122,7 @@ choice
135 122
136config MARCH_G5 123config MARCH_G5
137 bool "S/390 model G5 and G6" 124 bool "S/390 model G5 and G6"
138 depends on ARCH_S390_31 125 depends on !64BIT
139 help 126 help
140 Select this to build a 31 bit kernel that works 127 Select this to build a 31 bit kernel that works
141 on all S/390 and zSeries machines. 128 on all S/390 and zSeries machines.
diff --git a/arch/s390/Makefile b/arch/s390/Makefile
index 73a09a6ee6c8..6c6b197898d0 100644
--- a/arch/s390/Makefile
+++ b/arch/s390/Makefile
@@ -13,16 +13,14 @@
13# Copyright (C) 1994 by Linus Torvalds 13# Copyright (C) 1994 by Linus Torvalds
14# 14#
15 15
16ifdef CONFIG_ARCH_S390_31 16ifndef CONFIG_64BIT
17LDFLAGS := -m elf_s390 17LDFLAGS := -m elf_s390
18CFLAGS += -m31 18CFLAGS += -m31
19AFLAGS += -m31 19AFLAGS += -m31
20UTS_MACHINE := s390 20UTS_MACHINE := s390
21STACK_SIZE := 8192 21STACK_SIZE := 8192
22CHECKFLAGS += -D__s390__ 22CHECKFLAGS += -D__s390__
23endif 23else
24
25ifdef CONFIG_ARCH_S390X
26LDFLAGS := -m elf64_s390 24LDFLAGS := -m elf64_s390
27MODFLAGS += -fpic -D__PIC__ 25MODFLAGS += -fpic -D__PIC__
28CFLAGS += -m64 26CFLAGS += -m64
diff --git a/arch/s390/appldata/appldata_base.c b/arch/s390/appldata/appldata_base.c
index dee6ab54984d..d06a8d71c71d 100644
--- a/arch/s390/appldata/appldata_base.c
+++ b/arch/s390/appldata/appldata_base.c
@@ -40,7 +40,7 @@
40 40
41#define TOD_MICRO 0x01000 /* nr. of TOD clock units 41#define TOD_MICRO 0x01000 /* nr. of TOD clock units
42 for 1 microsecond */ 42 for 1 microsecond */
43#ifndef CONFIG_ARCH_S390X 43#ifndef CONFIG_64BIT
44 44
45#define APPLDATA_START_INTERVAL_REC 0x00 /* Function codes for */ 45#define APPLDATA_START_INTERVAL_REC 0x00 /* Function codes for */
46#define APPLDATA_STOP_REC 0x01 /* DIAG 0xDC */ 46#define APPLDATA_STOP_REC 0x01 /* DIAG 0xDC */
@@ -54,13 +54,13 @@
54#define APPLDATA_GEN_EVENT_RECORD 0x82 54#define APPLDATA_GEN_EVENT_RECORD 0x82
55#define APPLDATA_START_CONFIG_REC 0x83 55#define APPLDATA_START_CONFIG_REC 0x83
56 56
57#endif /* CONFIG_ARCH_S390X */ 57#endif /* CONFIG_64BIT */
58 58
59 59
60/* 60/*
61 * Parameter list for DIAGNOSE X'DC' 61 * Parameter list for DIAGNOSE X'DC'
62 */ 62 */
63#ifndef CONFIG_ARCH_S390X 63#ifndef CONFIG_64BIT
64struct appldata_parameter_list { 64struct appldata_parameter_list {
65 u16 diag; /* The DIAGNOSE code X'00DC' */ 65 u16 diag; /* The DIAGNOSE code X'00DC' */
66 u8 function; /* The function code for the DIAGNOSE */ 66 u8 function; /* The function code for the DIAGNOSE */
@@ -82,7 +82,7 @@ struct appldata_parameter_list {
82 u64 product_id_addr; 82 u64 product_id_addr;
83 u64 buffer_addr; 83 u64 buffer_addr;
84}; 84};
85#endif /* CONFIG_ARCH_S390X */ 85#endif /* CONFIG_64BIT */
86 86
87/* 87/*
88 * /proc entries (sysctl) 88 * /proc entries (sysctl)
diff --git a/arch/s390/crypto/crypt_s390.h b/arch/s390/crypto/crypt_s390.h
index d6712cfa6def..d1c259a7fe33 100644
--- a/arch/s390/crypto/crypt_s390.h
+++ b/arch/s390/crypto/crypt_s390.h
@@ -112,7 +112,7 @@ struct crypt_s390_query_status {
112 * [ret] is the variable to receive the error code 112 * [ret] is the variable to receive the error code
113 * [ERR] is the error code value 113 * [ERR] is the error code value
114 */ 114 */
115#ifndef __s390x__ 115#ifndef CONFIG_64BIT
116#define __crypt_s390_fixup \ 116#define __crypt_s390_fixup \
117 ".section .fixup,\"ax\" \n" \ 117 ".section .fixup,\"ax\" \n" \
118 "7: lhi %0,%h[e1] \n" \ 118 "7: lhi %0,%h[e1] \n" \
@@ -129,7 +129,7 @@ struct crypt_s390_query_status {
129 " .long 0b,7b \n" \ 129 " .long 0b,7b \n" \
130 " .long 1b,8b \n" \ 130 " .long 1b,8b \n" \
131 ".previous" 131 ".previous"
132#else /* __s390x__ */ 132#else /* CONFIG_64BIT */
133#define __crypt_s390_fixup \ 133#define __crypt_s390_fixup \
134 ".section .fixup,\"ax\" \n" \ 134 ".section .fixup,\"ax\" \n" \
135 "7: lhi %0,%h[e1] \n" \ 135 "7: lhi %0,%h[e1] \n" \
@@ -142,7 +142,7 @@ struct crypt_s390_query_status {
142 " .quad 0b,7b \n" \ 142 " .quad 0b,7b \n" \
143 " .quad 1b,8b \n" \ 143 " .quad 1b,8b \n" \
144 ".previous" 144 ".previous"
145#endif /* __s390x__ */ 145#endif /* CONFIG_64BIT */
146 146
147/* 147/*
148 * Standard code for setting the result of s390 crypto instructions. 148 * Standard code for setting the result of s390 crypto instructions.
@@ -150,10 +150,10 @@ struct crypt_s390_query_status {
150 * [result]: the register containing the result (e.g. second operand length 150 * [result]: the register containing the result (e.g. second operand length
151 * to compute number of processed bytes]. 151 * to compute number of processed bytes].
152 */ 152 */
153#ifndef __s390x__ 153#ifndef CONFIG_64BIT
154#define __crypt_s390_set_result \ 154#define __crypt_s390_set_result \
155 " lr %0,%[result] \n" 155 " lr %0,%[result] \n"
156#else /* __s390x__ */ 156#else /* CONFIG_64BIT */
157#define __crypt_s390_set_result \ 157#define __crypt_s390_set_result \
158 " lgr %0,%[result] \n" 158 " lgr %0,%[result] \n"
159#endif 159#endif
diff --git a/arch/s390/defconfig b/arch/s390/defconfig
index f195c7ea1d7b..7d23edc6facb 100644
--- a/arch/s390/defconfig
+++ b/arch/s390/defconfig
@@ -6,7 +6,7 @@
6CONFIG_MMU=y 6CONFIG_MMU=y
7CONFIG_RWSEM_XCHGADD_ALGORITHM=y 7CONFIG_RWSEM_XCHGADD_ALGORITHM=y
8CONFIG_GENERIC_CALIBRATE_DELAY=y 8CONFIG_GENERIC_CALIBRATE_DELAY=y
9CONFIG_ARCH_S390=y 9CONFIG_S390=y
10CONFIG_UID16=y 10CONFIG_UID16=y
11 11
12# 12#
@@ -89,9 +89,7 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
89# 89#
90# Processor type and features 90# Processor type and features
91# 91#
92# CONFIG_ARCH_S390X is not set
93# CONFIG_64BIT is not set 92# CONFIG_64BIT is not set
94CONFIG_ARCH_S390_31=y
95CONFIG_SMP=y 93CONFIG_SMP=y
96CONFIG_NR_CPUS=32 94CONFIG_NR_CPUS=32
97CONFIG_HOTPLUG_CPU=y 95CONFIG_HOTPLUG_CPU=y
diff --git a/arch/s390/kernel/Makefile b/arch/s390/kernel/Makefile
index 7434c32bc631..4865e4b49464 100644
--- a/arch/s390/kernel/Makefile
+++ b/arch/s390/kernel/Makefile
@@ -8,31 +8,26 @@ obj-y := bitmap.o traps.o time.o process.o \
8 setup.o sys_s390.o ptrace.o signal.o cpcmd.o ebcdic.o \ 8 setup.o sys_s390.o ptrace.o signal.o cpcmd.o ebcdic.o \
9 semaphore.o s390_ext.o debug.o profile.o irq.o reipl_diag.o 9 semaphore.o s390_ext.o debug.o profile.o irq.o reipl_diag.o
10 10
11obj-y += $(if $(CONFIG_64BIT),entry64.o,entry.o)
12obj-y += $(if $(CONFIG_64BIT),reipl64.o,reipl.o)
13
11extra-y += head.o init_task.o vmlinux.lds 14extra-y += head.o init_task.o vmlinux.lds
12 15
13obj-$(CONFIG_MODULES) += s390_ksyms.o module.o 16obj-$(CONFIG_MODULES) += s390_ksyms.o module.o
14obj-$(CONFIG_SMP) += smp.o 17obj-$(CONFIG_SMP) += smp.o
15 18
16obj-$(CONFIG_S390_SUPPORT) += compat_linux.o compat_signal.o \ 19obj-$(CONFIG_COMPAT) += compat_linux.o compat_signal.o \
17 compat_ioctl.o compat_wrapper.o \ 20 compat_ioctl.o compat_wrapper.o \
18 compat_exec_domain.o 21 compat_exec_domain.o
19obj-$(CONFIG_BINFMT_ELF32) += binfmt_elf32.o 22obj-$(CONFIG_BINFMT_ELF32) += binfmt_elf32.o
20 23
21obj-$(CONFIG_ARCH_S390_31) += entry.o reipl.o
22obj-$(CONFIG_ARCH_S390X) += entry64.o reipl64.o
23
24obj-$(CONFIG_VIRT_TIMER) += vtime.o 24obj-$(CONFIG_VIRT_TIMER) += vtime.o
25 25
26# Kexec part 26# Kexec part
27S390_KEXEC_OBJS := machine_kexec.o crash.o 27S390_KEXEC_OBJS := machine_kexec.o crash.o
28ifeq ($(CONFIG_ARCH_S390X),y) 28S390_KEXEC_OBJS += $(if $(CONFIG_64BIT),relocate_kernel64.o,relocate_kernel.o)
29S390_KEXEC_OBJS += relocate_kernel64.o
30else
31S390_KEXEC_OBJS += relocate_kernel.o
32endif
33obj-$(CONFIG_KEXEC) += $(S390_KEXEC_OBJS) 29obj-$(CONFIG_KEXEC) += $(S390_KEXEC_OBJS)
34 30
35
36# 31#
37# This is just to get the dependencies... 32# This is just to get the dependencies...
38# 33#
diff --git a/arch/s390/kernel/cpcmd.c b/arch/s390/kernel/cpcmd.c
index d47fecb42cc5..4ef44e536b2c 100644
--- a/arch/s390/kernel/cpcmd.c
+++ b/arch/s390/kernel/cpcmd.c
@@ -39,7 +39,7 @@ int __cpcmd(const char *cmd, char *response, int rlen, int *response_code)
39 39
40 if (response != NULL && rlen > 0) { 40 if (response != NULL && rlen > 0) {
41 memset(response, 0, rlen); 41 memset(response, 0, rlen);
42#ifndef CONFIG_ARCH_S390X 42#ifndef CONFIG_64BIT
43 asm volatile ( "lra 2,0(%2)\n" 43 asm volatile ( "lra 2,0(%2)\n"
44 "lr 4,%3\n" 44 "lr 4,%3\n"
45 "o 4,%6\n" 45 "o 4,%6\n"
@@ -55,7 +55,7 @@ int __cpcmd(const char *cmd, char *response, int rlen, int *response_code)
55 : "a" (cpcmd_buf), "d" (cmdlen), 55 : "a" (cpcmd_buf), "d" (cmdlen),
56 "a" (response), "d" (rlen), "m" (mask) 56 "a" (response), "d" (rlen), "m" (mask)
57 : "cc", "2", "3", "4", "5" ); 57 : "cc", "2", "3", "4", "5" );
58#else /* CONFIG_ARCH_S390X */ 58#else /* CONFIG_64BIT */
59 asm volatile ( "lrag 2,0(%2)\n" 59 asm volatile ( "lrag 2,0(%2)\n"
60 "lgr 4,%3\n" 60 "lgr 4,%3\n"
61 "o 4,%6\n" 61 "o 4,%6\n"
@@ -73,11 +73,11 @@ int __cpcmd(const char *cmd, char *response, int rlen, int *response_code)
73 : "a" (cpcmd_buf), "d" (cmdlen), 73 : "a" (cpcmd_buf), "d" (cmdlen),
74 "a" (response), "d" (rlen), "m" (mask) 74 "a" (response), "d" (rlen), "m" (mask)
75 : "cc", "2", "3", "4", "5" ); 75 : "cc", "2", "3", "4", "5" );
76#endif /* CONFIG_ARCH_S390X */ 76#endif /* CONFIG_64BIT */
77 EBCASC(response, rlen); 77 EBCASC(response, rlen);
78 } else { 78 } else {
79 return_len = 0; 79 return_len = 0;
80#ifndef CONFIG_ARCH_S390X 80#ifndef CONFIG_64BIT
81 asm volatile ( "lra 2,0(%1)\n" 81 asm volatile ( "lra 2,0(%1)\n"
82 "lr 3,%2\n" 82 "lr 3,%2\n"
83 "diag 2,3,0x8\n" 83 "diag 2,3,0x8\n"
@@ -85,7 +85,7 @@ int __cpcmd(const char *cmd, char *response, int rlen, int *response_code)
85 : "=d" (return_code) 85 : "=d" (return_code)
86 : "a" (cpcmd_buf), "d" (cmdlen) 86 : "a" (cpcmd_buf), "d" (cmdlen)
87 : "2", "3" ); 87 : "2", "3" );
88#else /* CONFIG_ARCH_S390X */ 88#else /* CONFIG_64BIT */
89 asm volatile ( "lrag 2,0(%1)\n" 89 asm volatile ( "lrag 2,0(%1)\n"
90 "lgr 3,%2\n" 90 "lgr 3,%2\n"
91 "sam31\n" 91 "sam31\n"
@@ -95,7 +95,7 @@ int __cpcmd(const char *cmd, char *response, int rlen, int *response_code)
95 : "=d" (return_code) 95 : "=d" (return_code)
96 : "a" (cpcmd_buf), "d" (cmdlen) 96 : "a" (cpcmd_buf), "d" (cmdlen)
97 : "2", "3" ); 97 : "2", "3" );
98#endif /* CONFIG_ARCH_S390X */ 98#endif /* CONFIG_64BIT */
99 } 99 }
100 spin_unlock_irqrestore(&cpcmd_lock, flags); 100 spin_unlock_irqrestore(&cpcmd_lock, flags);
101 if (response_code != NULL) 101 if (response_code != NULL)
@@ -105,7 +105,7 @@ int __cpcmd(const char *cmd, char *response, int rlen, int *response_code)
105 105
106EXPORT_SYMBOL(__cpcmd); 106EXPORT_SYMBOL(__cpcmd);
107 107
108#ifdef CONFIG_ARCH_S390X 108#ifdef CONFIG_64BIT
109int cpcmd(const char *cmd, char *response, int rlen, int *response_code) 109int cpcmd(const char *cmd, char *response, int rlen, int *response_code)
110{ 110{
111 char *lowbuf; 111 char *lowbuf;
@@ -129,4 +129,4 @@ int cpcmd(const char *cmd, char *response, int rlen, int *response_code)
129} 129}
130 130
131EXPORT_SYMBOL(cpcmd); 131EXPORT_SYMBOL(cpcmd);
132#endif /* CONFIG_ARCH_S390X */ 132#endif /* CONFIG_64BIT */
diff --git a/arch/s390/kernel/entry64.S b/arch/s390/kernel/entry64.S
index 4eb71ffcf484..369ab4413ec7 100644
--- a/arch/s390/kernel/entry64.S
+++ b/arch/s390/kernel/entry64.S
@@ -213,7 +213,7 @@ sysc_nr_ok:
213 mvc SP_ARGS(8,%r15),SP_R7(%r15) 213 mvc SP_ARGS(8,%r15),SP_R7(%r15)
214sysc_do_restart: 214sysc_do_restart:
215 larl %r10,sys_call_table 215 larl %r10,sys_call_table
216#ifdef CONFIG_S390_SUPPORT 216#ifdef CONFIG_COMPAT
217 tm __TI_flags+5(%r9),(_TIF_31BIT>>16) # running in 31 bit mode ? 217 tm __TI_flags+5(%r9),(_TIF_31BIT>>16) # running in 31 bit mode ?
218 jno sysc_noemu 218 jno sysc_noemu
219 larl %r10,sys_call_table_emu # use 31 bit emulation system calls 219 larl %r10,sys_call_table_emu # use 31 bit emulation system calls
@@ -361,7 +361,7 @@ sys_clone_glue:
361 la %r2,SP_PTREGS(%r15) # load pt_regs 361 la %r2,SP_PTREGS(%r15) # load pt_regs
362 jg sys_clone # branch to sys_clone 362 jg sys_clone # branch to sys_clone
363 363
364#ifdef CONFIG_S390_SUPPORT 364#ifdef CONFIG_COMPAT
365sys32_clone_glue: 365sys32_clone_glue:
366 la %r2,SP_PTREGS(%r15) # load pt_regs 366 la %r2,SP_PTREGS(%r15) # load pt_regs
367 jg sys32_clone # branch to sys32_clone 367 jg sys32_clone # branch to sys32_clone
@@ -383,7 +383,7 @@ sys_execve_glue:
383 bnz 0(%r12) # it did fail -> store result in gpr2 383 bnz 0(%r12) # it did fail -> store result in gpr2
384 b 6(%r12) # SKIP STG 2,SP_R2(15) in 384 b 6(%r12) # SKIP STG 2,SP_R2(15) in
385 # system_call/sysc_tracesys 385 # system_call/sysc_tracesys
386#ifdef CONFIG_S390_SUPPORT 386#ifdef CONFIG_COMPAT
387sys32_execve_glue: 387sys32_execve_glue:
388 la %r2,SP_PTREGS(%r15) # load pt_regs 388 la %r2,SP_PTREGS(%r15) # load pt_regs
389 lgr %r12,%r14 # save return address 389 lgr %r12,%r14 # save return address
@@ -398,7 +398,7 @@ sys_sigreturn_glue:
398 la %r2,SP_PTREGS(%r15) # load pt_regs as parameter 398 la %r2,SP_PTREGS(%r15) # load pt_regs as parameter
399 jg sys_sigreturn # branch to sys_sigreturn 399 jg sys_sigreturn # branch to sys_sigreturn
400 400
401#ifdef CONFIG_S390_SUPPORT 401#ifdef CONFIG_COMPAT
402sys32_sigreturn_glue: 402sys32_sigreturn_glue:
403 la %r2,SP_PTREGS(%r15) # load pt_regs as parameter 403 la %r2,SP_PTREGS(%r15) # load pt_regs as parameter
404 jg sys32_sigreturn # branch to sys32_sigreturn 404 jg sys32_sigreturn # branch to sys32_sigreturn
@@ -408,7 +408,7 @@ sys_rt_sigreturn_glue:
408 la %r2,SP_PTREGS(%r15) # load pt_regs as parameter 408 la %r2,SP_PTREGS(%r15) # load pt_regs as parameter
409 jg sys_rt_sigreturn # branch to sys_sigreturn 409 jg sys_rt_sigreturn # branch to sys_sigreturn
410 410
411#ifdef CONFIG_S390_SUPPORT 411#ifdef CONFIG_COMPAT
412sys32_rt_sigreturn_glue: 412sys32_rt_sigreturn_glue:
413 la %r2,SP_PTREGS(%r15) # load pt_regs as parameter 413 la %r2,SP_PTREGS(%r15) # load pt_regs as parameter
414 jg sys32_rt_sigreturn # branch to sys32_sigreturn 414 jg sys32_rt_sigreturn # branch to sys32_sigreturn
@@ -429,7 +429,7 @@ sys_sigsuspend_glue:
429 la %r14,6(%r14) # skip store of return value 429 la %r14,6(%r14) # skip store of return value
430 jg sys_sigsuspend # branch to sys_sigsuspend 430 jg sys_sigsuspend # branch to sys_sigsuspend
431 431
432#ifdef CONFIG_S390_SUPPORT 432#ifdef CONFIG_COMPAT
433sys32_sigsuspend_glue: 433sys32_sigsuspend_glue:
434 llgfr %r4,%r4 # unsigned long 434 llgfr %r4,%r4 # unsigned long
435 lgr %r5,%r4 # move mask back 435 lgr %r5,%r4 # move mask back
@@ -449,7 +449,7 @@ sys_rt_sigsuspend_glue:
449 la %r14,6(%r14) # skip store of return value 449 la %r14,6(%r14) # skip store of return value
450 jg sys_rt_sigsuspend # branch to sys_rt_sigsuspend 450 jg sys_rt_sigsuspend # branch to sys_rt_sigsuspend
451 451
452#ifdef CONFIG_S390_SUPPORT 452#ifdef CONFIG_COMPAT
453sys32_rt_sigsuspend_glue: 453sys32_rt_sigsuspend_glue:
454 llgfr %r3,%r3 # size_t 454 llgfr %r3,%r3 # size_t
455 lgr %r4,%r3 # move sigsetsize parameter 455 lgr %r4,%r3 # move sigsetsize parameter
@@ -464,7 +464,7 @@ sys_sigaltstack_glue:
464 la %r4,SP_PTREGS(%r15) # load pt_regs as parameter 464 la %r4,SP_PTREGS(%r15) # load pt_regs as parameter
465 jg sys_sigaltstack # branch to sys_sigreturn 465 jg sys_sigaltstack # branch to sys_sigreturn
466 466
467#ifdef CONFIG_S390_SUPPORT 467#ifdef CONFIG_COMPAT
468sys32_sigaltstack_glue: 468sys32_sigaltstack_glue:
469 la %r4,SP_PTREGS(%r15) # load pt_regs as parameter 469 la %r4,SP_PTREGS(%r15) # load pt_regs as parameter
470 jg sys32_sigaltstack_wrapper # branch to sys_sigreturn 470 jg sys32_sigaltstack_wrapper # branch to sys_sigreturn
@@ -1009,7 +1009,7 @@ sys_call_table:
1009#include "syscalls.S" 1009#include "syscalls.S"
1010#undef SYSCALL 1010#undef SYSCALL
1011 1011
1012#ifdef CONFIG_S390_SUPPORT 1012#ifdef CONFIG_COMPAT
1013 1013
1014#define SYSCALL(esa,esame,emu) .long emu 1014#define SYSCALL(esa,esame,emu) .long emu
1015 .globl sys_call_table_emu 1015 .globl sys_call_table_emu
diff --git a/arch/s390/kernel/head.S b/arch/s390/kernel/head.S
index d31a97c89f68..ea88d066bf04 100644
--- a/arch/s390/kernel/head.S
+++ b/arch/s390/kernel/head.S
@@ -30,7 +30,7 @@
30#include <asm/thread_info.h> 30#include <asm/thread_info.h>
31#include <asm/page.h> 31#include <asm/page.h>
32 32
33#ifdef CONFIG_ARCH_S390X 33#ifdef CONFIG_64BIT
34#define ARCH_OFFSET 4 34#define ARCH_OFFSET 4
35#else 35#else
36#define ARCH_OFFSET 0 36#define ARCH_OFFSET 0
@@ -539,7 +539,7 @@ ipl_devno:
539 .word 0 539 .word 0
540.endm 540.endm
541 541
542#ifdef CONFIG_ARCH_S390X 542#ifdef CONFIG_64BIT
543#include "head64.S" 543#include "head64.S"
544#else 544#else
545#include "head31.S" 545#include "head31.S"
diff --git a/arch/s390/kernel/module.c b/arch/s390/kernel/module.c
index 607d506689c8..c271cdab58e2 100644
--- a/arch/s390/kernel/module.c
+++ b/arch/s390/kernel/module.c
@@ -37,11 +37,11 @@
37#define DEBUGP(fmt , ...) 37#define DEBUGP(fmt , ...)
38#endif 38#endif
39 39
40#ifndef CONFIG_ARCH_S390X 40#ifndef CONFIG_64BIT
41#define PLT_ENTRY_SIZE 12 41#define PLT_ENTRY_SIZE 12
42#else /* CONFIG_ARCH_S390X */ 42#else /* CONFIG_64BIT */
43#define PLT_ENTRY_SIZE 20 43#define PLT_ENTRY_SIZE 20
44#endif /* CONFIG_ARCH_S390X */ 44#endif /* CONFIG_64BIT */
45 45
46void *module_alloc(unsigned long size) 46void *module_alloc(unsigned long size)
47{ 47{
@@ -294,17 +294,17 @@ apply_rela(Elf_Rela *rela, Elf_Addr base, Elf_Sym *symtab,
294 unsigned int *ip; 294 unsigned int *ip;
295 ip = me->module_core + me->arch.plt_offset + 295 ip = me->module_core + me->arch.plt_offset +
296 info->plt_offset; 296 info->plt_offset;
297#ifndef CONFIG_ARCH_S390X 297#ifndef CONFIG_64BIT
298 ip[0] = 0x0d105810; /* basr 1,0; l 1,6(1); br 1 */ 298 ip[0] = 0x0d105810; /* basr 1,0; l 1,6(1); br 1 */
299 ip[1] = 0x100607f1; 299 ip[1] = 0x100607f1;
300 ip[2] = val; 300 ip[2] = val;
301#else /* CONFIG_ARCH_S390X */ 301#else /* CONFIG_64BIT */
302 ip[0] = 0x0d10e310; /* basr 1,0; lg 1,10(1); br 1 */ 302 ip[0] = 0x0d10e310; /* basr 1,0; lg 1,10(1); br 1 */
303 ip[1] = 0x100a0004; 303 ip[1] = 0x100a0004;
304 ip[2] = 0x07f10000; 304 ip[2] = 0x07f10000;
305 ip[3] = (unsigned int) (val >> 32); 305 ip[3] = (unsigned int) (val >> 32);
306 ip[4] = (unsigned int) val; 306 ip[4] = (unsigned int) val;
307#endif /* CONFIG_ARCH_S390X */ 307#endif /* CONFIG_64BIT */
308 info->plt_initialized = 1; 308 info->plt_initialized = 1;
309 } 309 }
310 if (r_type == R_390_PLTOFF16 || 310 if (r_type == R_390_PLTOFF16 ||
diff --git a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c
index 78b64fe5e7c2..a942bf2d58e9 100644
--- a/arch/s390/kernel/process.c
+++ b/arch/s390/kernel/process.c
@@ -235,7 +235,7 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long new_stackp,
235 /* Save access registers to new thread structure. */ 235 /* Save access registers to new thread structure. */
236 save_access_regs(&p->thread.acrs[0]); 236 save_access_regs(&p->thread.acrs[0]);
237 237
238#ifndef CONFIG_ARCH_S390X 238#ifndef CONFIG_64BIT
239 /* 239 /*
240 * save fprs to current->thread.fp_regs to merge them with 240 * save fprs to current->thread.fp_regs to merge them with
241 * the emulated registers and then copy the result to the child. 241 * the emulated registers and then copy the result to the child.
@@ -247,7 +247,7 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long new_stackp,
247 /* Set a new TLS ? */ 247 /* Set a new TLS ? */
248 if (clone_flags & CLONE_SETTLS) 248 if (clone_flags & CLONE_SETTLS)
249 p->thread.acrs[0] = regs->gprs[6]; 249 p->thread.acrs[0] = regs->gprs[6];
250#else /* CONFIG_ARCH_S390X */ 250#else /* CONFIG_64BIT */
251 /* Save the fpu registers to new thread structure. */ 251 /* Save the fpu registers to new thread structure. */
252 save_fp_regs(&p->thread.fp_regs); 252 save_fp_regs(&p->thread.fp_regs);
253 p->thread.user_seg = __pa((unsigned long) p->mm->pgd) | _REGION_TABLE; 253 p->thread.user_seg = __pa((unsigned long) p->mm->pgd) | _REGION_TABLE;
@@ -260,7 +260,7 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long new_stackp,
260 p->thread.acrs[1] = (unsigned int) regs->gprs[6]; 260 p->thread.acrs[1] = (unsigned int) regs->gprs[6];
261 } 261 }
262 } 262 }
263#endif /* CONFIG_ARCH_S390X */ 263#endif /* CONFIG_64BIT */
264 /* start new process with ar4 pointing to the correct address space */ 264 /* start new process with ar4 pointing to the correct address space */
265 p->thread.mm_segment = get_fs(); 265 p->thread.mm_segment = get_fs();
266 /* Don't copy debug registers */ 266 /* Don't copy debug registers */
@@ -339,16 +339,16 @@ out:
339 */ 339 */
340int dump_fpu (struct pt_regs * regs, s390_fp_regs *fpregs) 340int dump_fpu (struct pt_regs * regs, s390_fp_regs *fpregs)
341{ 341{
342#ifndef CONFIG_ARCH_S390X 342#ifndef CONFIG_64BIT
343 /* 343 /*
344 * save fprs to current->thread.fp_regs to merge them with 344 * save fprs to current->thread.fp_regs to merge them with
345 * the emulated registers and then copy the result to the dump. 345 * the emulated registers and then copy the result to the dump.
346 */ 346 */
347 save_fp_regs(&current->thread.fp_regs); 347 save_fp_regs(&current->thread.fp_regs);
348 memcpy(fpregs, &current->thread.fp_regs, sizeof(s390_fp_regs)); 348 memcpy(fpregs, &current->thread.fp_regs, sizeof(s390_fp_regs));
349#else /* CONFIG_ARCH_S390X */ 349#else /* CONFIG_64BIT */
350 save_fp_regs(fpregs); 350 save_fp_regs(fpregs);
351#endif /* CONFIG_ARCH_S390X */ 351#endif /* CONFIG_64BIT */
352 return 1; 352 return 1;
353} 353}
354 354
diff --git a/arch/s390/kernel/ptrace.c b/arch/s390/kernel/ptrace.c
index 06afa3103ace..8ecda6d66de4 100644
--- a/arch/s390/kernel/ptrace.c
+++ b/arch/s390/kernel/ptrace.c
@@ -42,7 +42,7 @@
42#include <asm/uaccess.h> 42#include <asm/uaccess.h>
43#include <asm/unistd.h> 43#include <asm/unistd.h>
44 44
45#ifdef CONFIG_S390_SUPPORT 45#ifdef CONFIG_COMPAT
46#include "compat_ptrace.h" 46#include "compat_ptrace.h"
47#endif 47#endif
48 48
@@ -59,7 +59,7 @@ FixPerRegisters(struct task_struct *task)
59 59
60 if (per_info->single_step) { 60 if (per_info->single_step) {
61 per_info->control_regs.bits.starting_addr = 0; 61 per_info->control_regs.bits.starting_addr = 0;
62#ifdef CONFIG_S390_SUPPORT 62#ifdef CONFIG_COMPAT
63 if (test_thread_flag(TIF_31BIT)) 63 if (test_thread_flag(TIF_31BIT))
64 per_info->control_regs.bits.ending_addr = 0x7fffffffUL; 64 per_info->control_regs.bits.ending_addr = 0x7fffffffUL;
65 else 65 else
@@ -112,7 +112,7 @@ ptrace_disable(struct task_struct *child)
112 clear_single_step(child); 112 clear_single_step(child);
113} 113}
114 114
115#ifndef CONFIG_ARCH_S390X 115#ifndef CONFIG_64BIT
116# define __ADDR_MASK 3 116# define __ADDR_MASK 3
117#else 117#else
118# define __ADDR_MASK 7 118# define __ADDR_MASK 7
@@ -138,7 +138,7 @@ peek_user(struct task_struct *child, addr_t addr, addr_t data)
138 * an alignment of 4. Programmers from hell... 138 * an alignment of 4. Programmers from hell...
139 */ 139 */
140 mask = __ADDR_MASK; 140 mask = __ADDR_MASK;
141#ifdef CONFIG_ARCH_S390X 141#ifdef CONFIG_64BIT
142 if (addr >= (addr_t) &dummy->regs.acrs && 142 if (addr >= (addr_t) &dummy->regs.acrs &&
143 addr < (addr_t) &dummy->regs.orig_gpr2) 143 addr < (addr_t) &dummy->regs.orig_gpr2)
144 mask = 3; 144 mask = 3;
@@ -160,7 +160,7 @@ peek_user(struct task_struct *child, addr_t addr, addr_t data)
160 * access registers are stored in the thread structure 160 * access registers are stored in the thread structure
161 */ 161 */
162 offset = addr - (addr_t) &dummy->regs.acrs; 162 offset = addr - (addr_t) &dummy->regs.acrs;
163#ifdef CONFIG_ARCH_S390X 163#ifdef CONFIG_64BIT
164 /* 164 /*
165 * Very special case: old & broken 64 bit gdb reading 165 * Very special case: old & broken 64 bit gdb reading
166 * from acrs[15]. Result is a 64 bit value. Read the 166 * from acrs[15]. Result is a 64 bit value. Read the
@@ -218,7 +218,7 @@ poke_user(struct task_struct *child, addr_t addr, addr_t data)
218 * an alignment of 4. Programmers from hell indeed... 218 * an alignment of 4. Programmers from hell indeed...
219 */ 219 */
220 mask = __ADDR_MASK; 220 mask = __ADDR_MASK;
221#ifdef CONFIG_ARCH_S390X 221#ifdef CONFIG_64BIT
222 if (addr >= (addr_t) &dummy->regs.acrs && 222 if (addr >= (addr_t) &dummy->regs.acrs &&
223 addr < (addr_t) &dummy->regs.orig_gpr2) 223 addr < (addr_t) &dummy->regs.orig_gpr2)
224 mask = 3; 224 mask = 3;
@@ -231,13 +231,13 @@ poke_user(struct task_struct *child, addr_t addr, addr_t data)
231 * psw and gprs are stored on the stack 231 * psw and gprs are stored on the stack
232 */ 232 */
233 if (addr == (addr_t) &dummy->regs.psw.mask && 233 if (addr == (addr_t) &dummy->regs.psw.mask &&
234#ifdef CONFIG_S390_SUPPORT 234#ifdef CONFIG_COMPAT
235 data != PSW_MASK_MERGE(PSW_USER32_BITS, data) && 235 data != PSW_MASK_MERGE(PSW_USER32_BITS, data) &&
236#endif 236#endif
237 data != PSW_MASK_MERGE(PSW_USER_BITS, data)) 237 data != PSW_MASK_MERGE(PSW_USER_BITS, data))
238 /* Invalid psw mask. */ 238 /* Invalid psw mask. */
239 return -EINVAL; 239 return -EINVAL;
240#ifndef CONFIG_ARCH_S390X 240#ifndef CONFIG_64BIT
241 if (addr == (addr_t) &dummy->regs.psw.addr) 241 if (addr == (addr_t) &dummy->regs.psw.addr)
242 /* I'd like to reject addresses without the 242 /* I'd like to reject addresses without the
243 high order bit but older gdb's rely on it */ 243 high order bit but older gdb's rely on it */
@@ -250,7 +250,7 @@ poke_user(struct task_struct *child, addr_t addr, addr_t data)
250 * access registers are stored in the thread structure 250 * access registers are stored in the thread structure
251 */ 251 */
252 offset = addr - (addr_t) &dummy->regs.acrs; 252 offset = addr - (addr_t) &dummy->regs.acrs;
253#ifdef CONFIG_ARCH_S390X 253#ifdef CONFIG_64BIT
254 /* 254 /*
255 * Very special case: old & broken 64 bit gdb writing 255 * Very special case: old & broken 64 bit gdb writing
256 * to acrs[15] with a 64 bit value. Ignore the lower 256 * to acrs[15] with a 64 bit value. Ignore the lower
@@ -357,7 +357,7 @@ do_ptrace_normal(struct task_struct *child, long request, long addr, long data)
357 return ptrace_request(child, request, addr, data); 357 return ptrace_request(child, request, addr, data);
358} 358}
359 359
360#ifdef CONFIG_S390_SUPPORT 360#ifdef CONFIG_COMPAT
361/* 361/*
362 * Now the fun part starts... a 31 bit program running in the 362 * Now the fun part starts... a 31 bit program running in the
363 * 31 bit emulation tracing another program. PTRACE_PEEKTEXT, 363 * 31 bit emulation tracing another program. PTRACE_PEEKTEXT,
@@ -629,7 +629,7 @@ do_ptrace(struct task_struct *child, long request, long addr, long data)
629 return peek_user(child, addr, data); 629 return peek_user(child, addr, data);
630 if (request == PTRACE_POKEUSR && addr == PT_IEEE_IP) 630 if (request == PTRACE_POKEUSR && addr == PT_IEEE_IP)
631 return poke_user(child, addr, data); 631 return poke_user(child, addr, data);
632#ifdef CONFIG_S390_SUPPORT 632#ifdef CONFIG_COMPAT
633 if (request == PTRACE_PEEKUSR && 633 if (request == PTRACE_PEEKUSR &&
634 addr == PT32_IEEE_IP && test_thread_flag(TIF_31BIT)) 634 addr == PT32_IEEE_IP && test_thread_flag(TIF_31BIT))
635 return peek_user_emu31(child, addr, data); 635 return peek_user_emu31(child, addr, data);
@@ -695,7 +695,7 @@ do_ptrace(struct task_struct *child, long request, long addr, long data)
695 695
696 /* Do requests that differ for 31/64 bit */ 696 /* Do requests that differ for 31/64 bit */
697 default: 697 default:
698#ifdef CONFIG_S390_SUPPORT 698#ifdef CONFIG_COMPAT
699 if (test_thread_flag(TIF_31BIT)) 699 if (test_thread_flag(TIF_31BIT))
700 return do_ptrace_emu31(child, request, addr, data); 700 return do_ptrace_emu31(child, request, addr, data);
701#endif 701#endif
diff --git a/arch/s390/kernel/reipl_diag.c b/arch/s390/kernel/reipl_diag.c
index 83cb42bc0b76..1f33951ba439 100644
--- a/arch/s390/kernel/reipl_diag.c
+++ b/arch/s390/kernel/reipl_diag.c
@@ -26,7 +26,7 @@ void reipl_diag(void)
26 " st %%r4,%0\n" 26 " st %%r4,%0\n"
27 " st %%r5,%1\n" 27 " st %%r5,%1\n"
28 ".section __ex_table,\"a\"\n" 28 ".section __ex_table,\"a\"\n"
29#ifdef __s390x__ 29#ifdef CONFIG_64BIT
30 " .align 8\n" 30 " .align 8\n"
31 " .quad 0b, 0b\n" 31 " .quad 0b, 0b\n"
32#else 32#else
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c
index 31e7b19348b7..b03847d100d9 100644
--- a/arch/s390/kernel/setup.c
+++ b/arch/s390/kernel/setup.c
@@ -427,7 +427,7 @@ setup_lowcore(void)
427 __alloc_bootmem(PAGE_SIZE, PAGE_SIZE, 0) + PAGE_SIZE; 427 __alloc_bootmem(PAGE_SIZE, PAGE_SIZE, 0) + PAGE_SIZE;
428 lc->current_task = (unsigned long) init_thread_union.thread_info.task; 428 lc->current_task = (unsigned long) init_thread_union.thread_info.task;
429 lc->thread_info = (unsigned long) &init_thread_union; 429 lc->thread_info = (unsigned long) &init_thread_union;
430#ifndef CONFIG_ARCH_S390X 430#ifndef CONFIG_64BIT
431 if (MACHINE_HAS_IEEE) { 431 if (MACHINE_HAS_IEEE) {
432 lc->extended_save_area_addr = (__u32) 432 lc->extended_save_area_addr = (__u32)
433 __alloc_bootmem(PAGE_SIZE, PAGE_SIZE, 0); 433 __alloc_bootmem(PAGE_SIZE, PAGE_SIZE, 0);
@@ -562,21 +562,21 @@ setup_arch(char **cmdline_p)
562 /* 562 /*
563 * print what head.S has found out about the machine 563 * print what head.S has found out about the machine
564 */ 564 */
565#ifndef CONFIG_ARCH_S390X 565#ifndef CONFIG_64BIT
566 printk((MACHINE_IS_VM) ? 566 printk((MACHINE_IS_VM) ?
567 "We are running under VM (31 bit mode)\n" : 567 "We are running under VM (31 bit mode)\n" :
568 "We are running native (31 bit mode)\n"); 568 "We are running native (31 bit mode)\n");
569 printk((MACHINE_HAS_IEEE) ? 569 printk((MACHINE_HAS_IEEE) ?
570 "This machine has an IEEE fpu\n" : 570 "This machine has an IEEE fpu\n" :
571 "This machine has no IEEE fpu\n"); 571 "This machine has no IEEE fpu\n");
572#else /* CONFIG_ARCH_S390X */ 572#else /* CONFIG_64BIT */
573 printk((MACHINE_IS_VM) ? 573 printk((MACHINE_IS_VM) ?
574 "We are running under VM (64 bit mode)\n" : 574 "We are running under VM (64 bit mode)\n" :
575 "We are running native (64 bit mode)\n"); 575 "We are running native (64 bit mode)\n");
576#endif /* CONFIG_ARCH_S390X */ 576#endif /* CONFIG_64BIT */
577 577
578 ROOT_DEV = Root_RAM0; 578 ROOT_DEV = Root_RAM0;
579#ifndef CONFIG_ARCH_S390X 579#ifndef CONFIG_64BIT
580 memory_end = memory_size & ~0x400000UL; /* align memory end to 4MB */ 580 memory_end = memory_size & ~0x400000UL; /* align memory end to 4MB */
581 /* 581 /*
582 * We need some free virtual space to be able to do vmalloc. 582 * We need some free virtual space to be able to do vmalloc.
@@ -585,9 +585,9 @@ setup_arch(char **cmdline_p)
585 */ 585 */
586 if (memory_end > 1920*1024*1024) 586 if (memory_end > 1920*1024*1024)
587 memory_end = 1920*1024*1024; 587 memory_end = 1920*1024*1024;
588#else /* CONFIG_ARCH_S390X */ 588#else /* CONFIG_64BIT */
589 memory_end = memory_size & ~0x200000UL; /* detected in head.s */ 589 memory_end = memory_size & ~0x200000UL; /* detected in head.s */
590#endif /* CONFIG_ARCH_S390X */ 590#endif /* CONFIG_64BIT */
591 591
592 init_mm.start_code = PAGE_OFFSET; 592 init_mm.start_code = PAGE_OFFSET;
593 init_mm.end_code = (unsigned long) &_etext; 593 init_mm.end_code = (unsigned long) &_etext;
diff --git a/arch/s390/kernel/signal.c b/arch/s390/kernel/signal.c
index 13592d00a10f..6ae4a77270b5 100644
--- a/arch/s390/kernel/signal.c
+++ b/arch/s390/kernel/signal.c
@@ -501,7 +501,7 @@ int do_signal(struct pt_regs *regs, sigset_t *oldset)
501 501
502 if (signr > 0) { 502 if (signr > 0) {
503 /* Whee! Actually deliver the signal. */ 503 /* Whee! Actually deliver the signal. */
504#ifdef CONFIG_S390_SUPPORT 504#ifdef CONFIG_COMPAT
505 if (test_thread_flag(TIF_31BIT)) { 505 if (test_thread_flag(TIF_31BIT)) {
506 extern void handle_signal32(unsigned long sig, 506 extern void handle_signal32(unsigned long sig,
507 struct k_sigaction *ka, 507 struct k_sigaction *ka,
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c
index bd5b311006be..e10f4ca00499 100644
--- a/arch/s390/kernel/smp.c
+++ b/arch/s390/kernel/smp.c
@@ -402,7 +402,7 @@ static void smp_ext_bitcall_others(ec_bit_sig sig)
402 } 402 }
403} 403}
404 404
405#ifndef CONFIG_ARCH_S390X 405#ifndef CONFIG_64BIT
406/* 406/*
407 * this function sends a 'purge tlb' signal to another CPU. 407 * this function sends a 'purge tlb' signal to another CPU.
408 */ 408 */
@@ -416,7 +416,7 @@ void smp_ptlb_all(void)
416 on_each_cpu(smp_ptlb_callback, NULL, 0, 1); 416 on_each_cpu(smp_ptlb_callback, NULL, 0, 1);
417} 417}
418EXPORT_SYMBOL(smp_ptlb_all); 418EXPORT_SYMBOL(smp_ptlb_all);
419#endif /* ! CONFIG_ARCH_S390X */ 419#endif /* ! CONFIG_64BIT */
420 420
421/* 421/*
422 * this function sends a 'reschedule' IPI to another CPU. 422 * this function sends a 'reschedule' IPI to another CPU.
@@ -783,7 +783,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
783 if (stack == 0ULL) 783 if (stack == 0ULL)
784 panic("smp_boot_cpus failed to allocate memory\n"); 784 panic("smp_boot_cpus failed to allocate memory\n");
785 lowcore_ptr[i]->panic_stack = stack + (PAGE_SIZE); 785 lowcore_ptr[i]->panic_stack = stack + (PAGE_SIZE);
786#ifndef __s390x__ 786#ifndef CONFIG_64BIT
787 if (MACHINE_HAS_IEEE) { 787 if (MACHINE_HAS_IEEE) {
788 lowcore_ptr[i]->extended_save_area_addr = 788 lowcore_ptr[i]->extended_save_area_addr =
789 (__u32) __get_free_pages(GFP_KERNEL,0); 789 (__u32) __get_free_pages(GFP_KERNEL,0);
@@ -793,7 +793,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
793 } 793 }
794#endif 794#endif
795 } 795 }
796#ifndef __s390x__ 796#ifndef CONFIG_64BIT
797 if (MACHINE_HAS_IEEE) 797 if (MACHINE_HAS_IEEE)
798 ctl_set_bit(14, 29); /* enable extended save area */ 798 ctl_set_bit(14, 29); /* enable extended save area */
799#endif 799#endif
diff --git a/arch/s390/kernel/sys_s390.c b/arch/s390/kernel/sys_s390.c
index efe6b83b53f7..6a63553493c5 100644
--- a/arch/s390/kernel/sys_s390.c
+++ b/arch/s390/kernel/sys_s390.c
@@ -26,9 +26,7 @@
26#include <linux/mman.h> 26#include <linux/mman.h>
27#include <linux/file.h> 27#include <linux/file.h>
28#include <linux/utsname.h> 28#include <linux/utsname.h>
29#ifdef CONFIG_ARCH_S390X
30#include <linux/personality.h> 29#include <linux/personality.h>
31#endif /* CONFIG_ARCH_S390X */
32 30
33#include <asm/uaccess.h> 31#include <asm/uaccess.h>
34#include <asm/ipc.h> 32#include <asm/ipc.h>
@@ -121,7 +119,7 @@ out:
121 return error; 119 return error;
122} 120}
123 121
124#ifndef CONFIG_ARCH_S390X 122#ifndef CONFIG_64BIT
125struct sel_arg_struct { 123struct sel_arg_struct {
126 unsigned long n; 124 unsigned long n;
127 fd_set *inp, *outp, *exp; 125 fd_set *inp, *outp, *exp;
@@ -138,7 +136,7 @@ asmlinkage long old_select(struct sel_arg_struct __user *arg)
138 return sys_select(a.n, a.inp, a.outp, a.exp, a.tvp); 136 return sys_select(a.n, a.inp, a.outp, a.exp, a.tvp);
139 137
140} 138}
141#endif /* CONFIG_ARCH_S390X */ 139#endif /* CONFIG_64BIT */
142 140
143/* 141/*
144 * sys_ipc() is the de-multiplexer for the SysV IPC calls.. 142 * sys_ipc() is the de-multiplexer for the SysV IPC calls..
@@ -211,7 +209,7 @@ asmlinkage long sys_ipc(uint call, int first, unsigned long second,
211 return -EINVAL; 209 return -EINVAL;
212} 210}
213 211
214#ifdef CONFIG_ARCH_S390X 212#ifdef CONFIG_64BIT
215asmlinkage long s390x_newuname(struct new_utsname __user *name) 213asmlinkage long s390x_newuname(struct new_utsname __user *name)
216{ 214{
217 int ret = sys_newuname(name); 215 int ret = sys_newuname(name);
@@ -235,12 +233,12 @@ asmlinkage long s390x_personality(unsigned long personality)
235 233
236 return ret; 234 return ret;
237} 235}
238#endif /* CONFIG_ARCH_S390X */ 236#endif /* CONFIG_64BIT */
239 237
240/* 238/*
241 * Wrapper function for sys_fadvise64/fadvise64_64 239 * Wrapper function for sys_fadvise64/fadvise64_64
242 */ 240 */
243#ifndef CONFIG_ARCH_S390X 241#ifndef CONFIG_64BIT
244 242
245asmlinkage long 243asmlinkage long
246s390_fadvise64(int fd, u32 offset_high, u32 offset_low, size_t len, int advice) 244s390_fadvise64(int fd, u32 offset_high, u32 offset_low, size_t len, int advice)
diff --git a/arch/s390/kernel/traps.c b/arch/s390/kernel/traps.c
index c5bd36fae56b..95d109968619 100644
--- a/arch/s390/kernel/traps.c
+++ b/arch/s390/kernel/traps.c
@@ -67,13 +67,13 @@ extern pgm_check_handler_t do_monitor_call;
67 67
68#define stack_pointer ({ void **sp; asm("la %0,0(15)" : "=&d" (sp)); sp; }) 68#define stack_pointer ({ void **sp; asm("la %0,0(15)" : "=&d" (sp)); sp; })
69 69
70#ifndef CONFIG_ARCH_S390X 70#ifndef CONFIG_64BIT
71#define FOURLONG "%08lx %08lx %08lx %08lx\n" 71#define FOURLONG "%08lx %08lx %08lx %08lx\n"
72static int kstack_depth_to_print = 12; 72static int kstack_depth_to_print = 12;
73#else /* CONFIG_ARCH_S390X */ 73#else /* CONFIG_64BIT */
74#define FOURLONG "%016lx %016lx %016lx %016lx\n" 74#define FOURLONG "%016lx %016lx %016lx %016lx\n"
75static int kstack_depth_to_print = 20; 75static int kstack_depth_to_print = 20;
76#endif /* CONFIG_ARCH_S390X */ 76#endif /* CONFIG_64BIT */
77 77
78/* 78/*
79 * For show_trace we have tree different stack to consider: 79 * For show_trace we have tree different stack to consider:
@@ -702,12 +702,12 @@ void __init trap_init(void)
702 pgm_check_table[0x11] = &do_dat_exception; 702 pgm_check_table[0x11] = &do_dat_exception;
703 pgm_check_table[0x12] = &translation_exception; 703 pgm_check_table[0x12] = &translation_exception;
704 pgm_check_table[0x13] = &special_op_exception; 704 pgm_check_table[0x13] = &special_op_exception;
705#ifdef CONFIG_ARCH_S390X 705#ifdef CONFIG_64BIT
706 pgm_check_table[0x38] = &do_dat_exception; 706 pgm_check_table[0x38] = &do_dat_exception;
707 pgm_check_table[0x39] = &do_dat_exception; 707 pgm_check_table[0x39] = &do_dat_exception;
708 pgm_check_table[0x3A] = &do_dat_exception; 708 pgm_check_table[0x3A] = &do_dat_exception;
709 pgm_check_table[0x3B] = &do_dat_exception; 709 pgm_check_table[0x3B] = &do_dat_exception;
710#endif /* CONFIG_ARCH_S390X */ 710#endif /* CONFIG_64BIT */
711 pgm_check_table[0x15] = &operand_exception; 711 pgm_check_table[0x15] = &operand_exception;
712 pgm_check_table[0x1C] = &space_switch_exception; 712 pgm_check_table[0x1C] = &space_switch_exception;
713 pgm_check_table[0x1D] = &hfp_sqrt_exception; 713 pgm_check_table[0x1D] = &hfp_sqrt_exception;
diff --git a/arch/s390/kernel/vmlinux.lds.S b/arch/s390/kernel/vmlinux.lds.S
index 89fdb3808bc0..9289face3027 100644
--- a/arch/s390/kernel/vmlinux.lds.S
+++ b/arch/s390/kernel/vmlinux.lds.S
@@ -5,7 +5,7 @@
5#include <asm-generic/vmlinux.lds.h> 5#include <asm-generic/vmlinux.lds.h>
6#include <linux/config.h> 6#include <linux/config.h>
7 7
8#ifndef CONFIG_ARCH_S390X 8#ifndef CONFIG_64BIT
9OUTPUT_FORMAT("elf32-s390", "elf32-s390", "elf32-s390") 9OUTPUT_FORMAT("elf32-s390", "elf32-s390", "elf32-s390")
10OUTPUT_ARCH(s390) 10OUTPUT_ARCH(s390)
11ENTRY(_start) 11ENTRY(_start)
diff --git a/arch/s390/lib/Makefile b/arch/s390/lib/Makefile
index b701efa1f00e..d9b97b3c597f 100644
--- a/arch/s390/lib/Makefile
+++ b/arch/s390/lib/Makefile
@@ -4,6 +4,5 @@
4 4
5EXTRA_AFLAGS := -traditional 5EXTRA_AFLAGS := -traditional
6 6
7lib-y += delay.o string.o 7lib-y += delay.o string.o spinlock.o
8lib-$(CONFIG_ARCH_S390_31) += uaccess.o spinlock.o 8lib-y += $(if $(CONFIG_64BIT),uaccess64.o,uaccess.o)
9lib-$(CONFIG_ARCH_S390X) += uaccess64.o spinlock.o
diff --git a/arch/s390/lib/spinlock.c b/arch/s390/lib/spinlock.c
index 2dc14e9c8327..68d79c502081 100644
--- a/arch/s390/lib/spinlock.c
+++ b/arch/s390/lib/spinlock.c
@@ -29,7 +29,7 @@ __setup("spin_retry=", spin_retry_setup);
29static inline void 29static inline void
30_diag44(void) 30_diag44(void)
31{ 31{
32#ifdef __s390x__ 32#ifdef CONFIG_64BIT
33 if (MACHINE_HAS_DIAG44) 33 if (MACHINE_HAS_DIAG44)
34#endif 34#endif
35 asm volatile("diag 0,0,0x44"); 35 asm volatile("diag 0,0,0x44");
diff --git a/arch/s390/mm/extmem.c b/arch/s390/mm/extmem.c
index 506a33b51e4f..a9566bcab682 100644
--- a/arch/s390/mm/extmem.c
+++ b/arch/s390/mm/extmem.c
@@ -143,7 +143,7 @@ dcss_diag (__u8 func, void *parameter,
143 rx = (unsigned long) parameter; 143 rx = (unsigned long) parameter;
144 ry = (unsigned long) func; 144 ry = (unsigned long) func;
145 __asm__ __volatile__( 145 __asm__ __volatile__(
146#ifdef CONFIG_ARCH_S390X 146#ifdef CONFIG_64BIT
147 " sam31\n" // switch to 31 bit 147 " sam31\n" // switch to 31 bit
148 " diag %0,%1,0x64\n" 148 " diag %0,%1,0x64\n"
149 " sam64\n" // switch back to 64 bit 149 " sam64\n" // switch back to 64 bit
diff --git a/arch/s390/mm/fault.c b/arch/s390/mm/fault.c
index fb2607c369ed..81ade401b073 100644
--- a/arch/s390/mm/fault.c
+++ b/arch/s390/mm/fault.c
@@ -31,17 +31,17 @@
31#include <asm/uaccess.h> 31#include <asm/uaccess.h>
32#include <asm/pgtable.h> 32#include <asm/pgtable.h>
33 33
34#ifndef CONFIG_ARCH_S390X 34#ifndef CONFIG_64BIT
35#define __FAIL_ADDR_MASK 0x7ffff000 35#define __FAIL_ADDR_MASK 0x7ffff000
36#define __FIXUP_MASK 0x7fffffff 36#define __FIXUP_MASK 0x7fffffff
37#define __SUBCODE_MASK 0x0200 37#define __SUBCODE_MASK 0x0200
38#define __PF_RES_FIELD 0ULL 38#define __PF_RES_FIELD 0ULL
39#else /* CONFIG_ARCH_S390X */ 39#else /* CONFIG_64BIT */
40#define __FAIL_ADDR_MASK -4096L 40#define __FAIL_ADDR_MASK -4096L
41#define __FIXUP_MASK ~0L 41#define __FIXUP_MASK ~0L
42#define __SUBCODE_MASK 0x0600 42#define __SUBCODE_MASK 0x0600
43#define __PF_RES_FIELD 0x8000000000000000ULL 43#define __PF_RES_FIELD 0x8000000000000000ULL
44#endif /* CONFIG_ARCH_S390X */ 44#endif /* CONFIG_64BIT */
45 45
46#ifdef CONFIG_SYSCTL 46#ifdef CONFIG_SYSCTL
47extern int sysctl_userprocess_debug; 47extern int sysctl_userprocess_debug;
@@ -393,11 +393,11 @@ int pfault_init(void)
393 "2:\n" 393 "2:\n"
394 ".section __ex_table,\"a\"\n" 394 ".section __ex_table,\"a\"\n"
395 " .align 4\n" 395 " .align 4\n"
396#ifndef CONFIG_ARCH_S390X 396#ifndef CONFIG_64BIT
397 " .long 0b,1b\n" 397 " .long 0b,1b\n"
398#else /* CONFIG_ARCH_S390X */ 398#else /* CONFIG_64BIT */
399 " .quad 0b,1b\n" 399 " .quad 0b,1b\n"
400#endif /* CONFIG_ARCH_S390X */ 400#endif /* CONFIG_64BIT */
401 ".previous" 401 ".previous"
402 : "=d" (rc) : "a" (&refbk), "m" (refbk) : "cc" ); 402 : "=d" (rc) : "a" (&refbk), "m" (refbk) : "cc" );
403 __ctl_set_bit(0, 9); 403 __ctl_set_bit(0, 9);
@@ -417,11 +417,11 @@ void pfault_fini(void)
417 "0:\n" 417 "0:\n"
418 ".section __ex_table,\"a\"\n" 418 ".section __ex_table,\"a\"\n"
419 " .align 4\n" 419 " .align 4\n"
420#ifndef CONFIG_ARCH_S390X 420#ifndef CONFIG_64BIT
421 " .long 0b,0b\n" 421 " .long 0b,0b\n"
422#else /* CONFIG_ARCH_S390X */ 422#else /* CONFIG_64BIT */
423 " .quad 0b,0b\n" 423 " .quad 0b,0b\n"
424#endif /* CONFIG_ARCH_S390X */ 424#endif /* CONFIG_64BIT */
425 ".previous" 425 ".previous"
426 : : "a" (&refbk), "m" (refbk) : "cc" ); 426 : : "a" (&refbk), "m" (refbk) : "cc" );
427} 427}
diff --git a/arch/s390/mm/init.c b/arch/s390/mm/init.c
index 6ec5cd981e74..df953383724d 100644
--- a/arch/s390/mm/init.c
+++ b/arch/s390/mm/init.c
@@ -44,7 +44,7 @@ void diag10(unsigned long addr)
44{ 44{
45 if (addr >= 0x7ff00000) 45 if (addr >= 0x7ff00000)
46 return; 46 return;
47#ifdef __s390x__ 47#ifdef CONFIG_64BIT
48 asm volatile ( 48 asm volatile (
49 " sam31\n" 49 " sam31\n"
50 " diag %0,%0,0x10\n" 50 " diag %0,%0,0x10\n"
@@ -106,7 +106,7 @@ extern unsigned long __initdata zholes_size[];
106 * paging_init() sets up the page tables 106 * paging_init() sets up the page tables
107 */ 107 */
108 108
109#ifndef CONFIG_ARCH_S390X 109#ifndef CONFIG_64BIT
110void __init paging_init(void) 110void __init paging_init(void)
111{ 111{
112 pgd_t * pg_dir; 112 pgd_t * pg_dir;
@@ -175,7 +175,7 @@ void __init paging_init(void)
175 return; 175 return;
176} 176}
177 177
178#else /* CONFIG_ARCH_S390X */ 178#else /* CONFIG_64BIT */
179void __init paging_init(void) 179void __init paging_init(void)
180{ 180{
181 pgd_t * pg_dir; 181 pgd_t * pg_dir;
@@ -256,7 +256,7 @@ void __init paging_init(void)
256 256
257 return; 257 return;
258} 258}
259#endif /* CONFIG_ARCH_S390X */ 259#endif /* CONFIG_64BIT */
260 260
261void __init mem_init(void) 261void __init mem_init(void)
262{ 262{
diff --git a/arch/s390/mm/mmap.c b/arch/s390/mm/mmap.c
index fb187e5a54b4..356257c171de 100644
--- a/arch/s390/mm/mmap.c
+++ b/arch/s390/mm/mmap.c
@@ -50,7 +50,7 @@ static inline unsigned long mmap_base(void)
50 50
51static inline int mmap_is_legacy(void) 51static inline int mmap_is_legacy(void)
52{ 52{
53#ifdef CONFIG_ARCH_S390X 53#ifdef CONFIG_64BIT
54 /* 54 /*
55 * Force standard allocation for 64 bit programs. 55 * Force standard allocation for 64 bit programs.
56 */ 56 */