aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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
-rw-r--r--block/Kconfig2
-rw-r--r--crypto/Kconfig8
-rw-r--r--drivers/char/Kconfig2
-rw-r--r--drivers/char/hangcheck-timer.c2
-rw-r--r--drivers/char/watchdog/Kconfig2
-rw-r--r--drivers/input/evdev.c2
-rw-r--r--drivers/net/phy/Kconfig2
-rw-r--r--drivers/s390/block/Kconfig8
-rw-r--r--drivers/s390/block/dasd.c2
-rw-r--r--drivers/s390/block/dasd_diag.c2
-rw-r--r--drivers/s390/block/dasd_diag.h6
-rw-r--r--drivers/s390/block/dasd_eckd.c2
-rw-r--r--drivers/s390/block/dasd_fba.c2
-rw-r--r--drivers/s390/block/xpram.c4
-rw-r--r--drivers/s390/char/vmwatchdog.c2
-rw-r--r--drivers/s390/cio/cio.c2
-rw-r--r--drivers/s390/cio/device_id.c2
-rw-r--r--drivers/s390/cio/ioasm.h4
-rw-r--r--drivers/s390/cio/qdio.c2
-rw-r--r--drivers/s390/cio/qdio.h34
-rw-r--r--drivers/s390/crypto/z90hardware.c8
-rw-r--r--drivers/s390/net/Kconfig2
-rw-r--r--drivers/s390/net/claw.c6
-rw-r--r--drivers/s390/s390mach.c10
-rw-r--r--drivers/s390/sysinfo.c2
-rw-r--r--drivers/scsi/Kconfig2
-rw-r--r--fs/partitions/Kconfig2
-rw-r--r--fs/proc/array.c2
-rw-r--r--include/asm-s390/unistd.h2
-rw-r--r--include/linux/irq.h2
-rw-r--r--init/Kconfig2
-rw-r--r--init/do_mounts_rd.c4
-rw-r--r--kernel/panic.c4
-rw-r--r--kernel/sysctl.c6
-rw-r--r--lib/Kconfig.debug2
60 files changed, 183 insertions, 208 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 */
diff --git a/block/Kconfig b/block/Kconfig
index eb48edb80c1d..377f6dd20e17 100644
--- a/block/Kconfig
+++ b/block/Kconfig
@@ -5,7 +5,7 @@
5#for instance. 5#for instance.
6config LBD 6config LBD
7 bool "Support for Large Block Devices" 7 bool "Support for Large Block Devices"
8 depends on X86 || (MIPS && 32BIT) || PPC32 || ARCH_S390_31 || SUPERH || UML 8 depends on X86 || (MIPS && 32BIT) || PPC32 || (S390 && !64BIT) || SUPERH || UML
9 help 9 help
10 Say Y here if you want to attach large (bigger than 2TB) discs to 10 Say Y here if you want to attach large (bigger than 2TB) discs to
11 your machine, or if you want to have a raid or loopback device 11 your machine, or if you want to have a raid or loopback device
diff --git a/crypto/Kconfig b/crypto/Kconfig
index c696f7ab729e..52e1d4108a99 100644
--- a/crypto/Kconfig
+++ b/crypto/Kconfig
@@ -42,7 +42,7 @@ config CRYPTO_SHA1
42 42
43config CRYPTO_SHA1_S390 43config CRYPTO_SHA1_S390
44 tristate "SHA1 digest algorithm (s390)" 44 tristate "SHA1 digest algorithm (s390)"
45 depends on CRYPTO && ARCH_S390 45 depends on CRYPTO && S390
46 help 46 help
47 This is the s390 hardware accelerated implementation of the 47 This is the s390 hardware accelerated implementation of the
48 SHA-1 secure hash standard (FIPS 180-1/DFIPS 180-2). 48 SHA-1 secure hash standard (FIPS 180-1/DFIPS 180-2).
@@ -58,7 +58,7 @@ config CRYPTO_SHA256
58 58
59config CRYPTO_SHA256_S390 59config CRYPTO_SHA256_S390
60 tristate "SHA256 digest algorithm (s390)" 60 tristate "SHA256 digest algorithm (s390)"
61 depends on CRYPTO && ARCH_S390 61 depends on CRYPTO && S390
62 help 62 help
63 This is the s390 hardware accelerated implementation of the 63 This is the s390 hardware accelerated implementation of the
64 SHA256 secure hash standard (DFIPS 180-2). 64 SHA256 secure hash standard (DFIPS 180-2).
@@ -111,7 +111,7 @@ config CRYPTO_DES
111 111
112config CRYPTO_DES_S390 112config CRYPTO_DES_S390
113 tristate "DES and Triple DES cipher algorithms (s390)" 113 tristate "DES and Triple DES cipher algorithms (s390)"
114 depends on CRYPTO && ARCH_S390 114 depends on CRYPTO && S390
115 help 115 help
116 DES cipher algorithm (FIPS 46-2), and Triple DES EDE (FIPS 46-3). 116 DES cipher algorithm (FIPS 46-2), and Triple DES EDE (FIPS 46-3).
117 117
@@ -217,7 +217,7 @@ config CRYPTO_AES_X86_64
217 217
218config CRYPTO_AES_S390 218config CRYPTO_AES_S390
219 tristate "AES cipher algorithms (s390)" 219 tristate "AES cipher algorithms (s390)"
220 depends on CRYPTO && ARCH_S390 220 depends on CRYPTO && S390
221 help 221 help
222 This is the s390 hardware accelerated implementation of the 222 This is the s390 hardware accelerated implementation of the
223 AES cipher algorithms (FIPS-197). AES uses the Rijndael 223 AES cipher algorithms (FIPS-197). AES uses the Rijndael
diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig
index 84e68cdd451b..5ebd06b1b4ca 100644
--- a/drivers/char/Kconfig
+++ b/drivers/char/Kconfig
@@ -985,7 +985,7 @@ config HPET_MMAP
985 985
986config HANGCHECK_TIMER 986config HANGCHECK_TIMER
987 tristate "Hangcheck timer" 987 tristate "Hangcheck timer"
988 depends on X86 || IA64 || PPC64 || ARCH_S390 988 depends on X86 || IA64 || PPC64 || S390
989 help 989 help
990 The hangcheck-timer module detects when the system has gone 990 The hangcheck-timer module detects when the system has gone
991 out to lunch past a certain margin. It can reboot the system 991 out to lunch past a certain margin. It can reboot the system
diff --git a/drivers/char/hangcheck-timer.c b/drivers/char/hangcheck-timer.c
index 66e53dd450ff..40a67c86420c 100644
--- a/drivers/char/hangcheck-timer.c
+++ b/drivers/char/hangcheck-timer.c
@@ -120,7 +120,7 @@ __setup("hcheck_dump_tasks", hangcheck_parse_dump_tasks);
120#if defined(CONFIG_X86) 120#if defined(CONFIG_X86)
121# define HAVE_MONOTONIC 121# define HAVE_MONOTONIC
122# define TIMER_FREQ 1000000000ULL 122# define TIMER_FREQ 1000000000ULL
123#elif defined(CONFIG_ARCH_S390) 123#elif defined(CONFIG_S390)
124/* FA240000 is 1 Second in the IBM time universe (Page 4-38 Principles of Op for zSeries */ 124/* FA240000 is 1 Second in the IBM time universe (Page 4-38 Principles of Op for zSeries */
125# define TIMER_FREQ 0xFA240000ULL 125# define TIMER_FREQ 0xFA240000ULL
126#elif defined(CONFIG_IA64) 126#elif defined(CONFIG_IA64)
diff --git a/drivers/char/watchdog/Kconfig b/drivers/char/watchdog/Kconfig
index 344001b45af9..a6544790af60 100644
--- a/drivers/char/watchdog/Kconfig
+++ b/drivers/char/watchdog/Kconfig
@@ -438,7 +438,7 @@ config INDYDOG
438 438
439config ZVM_WATCHDOG 439config ZVM_WATCHDOG
440 tristate "z/VM Watchdog Timer" 440 tristate "z/VM Watchdog Timer"
441 depends on WATCHDOG && ARCH_S390 441 depends on WATCHDOG && S390
442 help 442 help
443 IBM s/390 and zSeries machines running under z/VM 5.1 or later 443 IBM s/390 and zSeries machines running under z/VM 5.1 or later
444 provide a virtual watchdog timer to their guest that cause a 444 provide a virtual watchdog timer to their guest that cause a
diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c
index 9f2352bd8348..a1e660e3531d 100644
--- a/drivers/input/evdev.c
+++ b/drivers/input/evdev.c
@@ -157,7 +157,7 @@ struct input_event_compat {
157# define COMPAT_TEST test_thread_flag(TIF_IA32) 157# define COMPAT_TEST test_thread_flag(TIF_IA32)
158#elif defined(CONFIG_IA64) 158#elif defined(CONFIG_IA64)
159# define COMPAT_TEST IS_IA32_PROCESS(ia64_task_regs(current)) 159# define COMPAT_TEST IS_IA32_PROCESS(ia64_task_regs(current))
160#elif defined(CONFIG_ARCH_S390) 160#elif defined(CONFIG_S390)
161# define COMPAT_TEST test_thread_flag(TIF_31BIT) 161# define COMPAT_TEST test_thread_flag(TIF_31BIT)
162#elif defined(CONFIG_MIPS) 162#elif defined(CONFIG_MIPS)
163# define COMPAT_TEST (current->thread.mflags & MF_32BIT_ADDR) 163# define COMPAT_TEST (current->thread.mflags & MF_32BIT_ADDR)
diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig
index c782a6329805..fa39b944bc46 100644
--- a/drivers/net/phy/Kconfig
+++ b/drivers/net/phy/Kconfig
@@ -6,7 +6,7 @@ menu "PHY device support"
6 6
7config PHYLIB 7config PHYLIB
8 tristate "PHY Device support and infrastructure" 8 tristate "PHY Device support and infrastructure"
9 depends on NET_ETHERNET && (BROKEN || !ARCH_S390) 9 depends on NET_ETHERNET && (BROKEN || !S390)
10 help 10 help
11 Ethernet controllers are usually attached to PHY 11 Ethernet controllers are usually attached to PHY
12 devices. This option provides infrastructure for 12 devices. This option provides infrastructure for
diff --git a/drivers/s390/block/Kconfig b/drivers/s390/block/Kconfig
index 6e7d7b06421d..6f50cc9323d9 100644
--- a/drivers/s390/block/Kconfig
+++ b/drivers/s390/block/Kconfig
@@ -1,11 +1,11 @@
1if ARCH_S390 1if S390
2 2
3comment "S/390 block device drivers" 3comment "S/390 block device drivers"
4 depends on ARCH_S390 4 depends on S390
5 5
6config BLK_DEV_XPRAM 6config BLK_DEV_XPRAM
7 tristate "XPRAM disk support" 7 tristate "XPRAM disk support"
8 depends on ARCH_S390 8 depends on S390
9 help 9 help
10 Select this option if you want to use your expanded storage on S/390 10 Select this option if you want to use your expanded storage on S/390
11 or zSeries as a disk. This is useful as a _fast_ swap device if you 11 or zSeries as a disk. This is useful as a _fast_ swap device if you
@@ -49,7 +49,7 @@ config DASD_FBA
49 49
50config DASD_DIAG 50config DASD_DIAG
51 tristate "Support for DIAG access to Disks" 51 tristate "Support for DIAG access to Disks"
52 depends on DASD && ( ARCH_S390X = 'n' || EXPERIMENTAL) 52 depends on DASD && ( 64BIT = 'n' || EXPERIMENTAL)
53 help 53 help
54 Select this option if you want to use Diagnose250 command to access 54 Select this option if you want to use Diagnose250 command to access
55 Disks under VM. If you are not running under VM or unsure what it is, 55 Disks under VM. If you are not running under VM or unsure what it is,
diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c
index 1141a5963b67..041e1a621885 100644
--- a/drivers/s390/block/dasd.c
+++ b/drivers/s390/block/dasd.c
@@ -604,7 +604,7 @@ dasd_smalloc_request(char *magic, int cplength, int datasize,
604void 604void
605dasd_kfree_request(struct dasd_ccw_req * cqr, struct dasd_device * device) 605dasd_kfree_request(struct dasd_ccw_req * cqr, struct dasd_device * device)
606{ 606{
607#ifdef CONFIG_ARCH_S390X 607#ifdef CONFIG_64BIT
608 struct ccw1 *ccw; 608 struct ccw1 *ccw;
609 609
610 /* Clear any idals used for the request. */ 610 /* Clear any idals used for the request. */
diff --git a/drivers/s390/block/dasd_diag.c b/drivers/s390/block/dasd_diag.c
index a33d4064b537..ba80fdea7ebf 100644
--- a/drivers/s390/block/dasd_diag.c
+++ b/drivers/s390/block/dasd_diag.c
@@ -75,7 +75,7 @@ dia250(void *iob, int cmd)
75 int rc; 75 int rc;
76 76
77 __asm__ __volatile__( 77 __asm__ __volatile__(
78#ifdef CONFIG_ARCH_S390X 78#ifdef CONFIG_64BIT
79 " lghi %0,3\n" 79 " lghi %0,3\n"
80 " lgr 0,%3\n" 80 " lgr 0,%3\n"
81 " diag 0,%2,0x250\n" 81 " diag 0,%2,0x250\n"
diff --git a/drivers/s390/block/dasd_diag.h b/drivers/s390/block/dasd_diag.h
index 37edf6e91715..a4f80bd735f1 100644
--- a/drivers/s390/block/dasd_diag.h
+++ b/drivers/s390/block/dasd_diag.h
@@ -45,7 +45,7 @@ struct dasd_diag_characteristics {
45} __attribute__ ((packed, aligned(4))); 45} __attribute__ ((packed, aligned(4)));
46 46
47 47
48#ifdef CONFIG_ARCH_S390X 48#ifdef CONFIG_64BIT
49#define DASD_DIAG_FLAGA_DEFAULT DASD_DIAG_FLAGA_FORMAT_64BIT 49#define DASD_DIAG_FLAGA_DEFAULT DASD_DIAG_FLAGA_FORMAT_64BIT
50 50
51typedef u64 blocknum_t; 51typedef u64 blocknum_t;
@@ -86,7 +86,7 @@ struct dasd_diag_rw_io {
86 struct dasd_diag_bio *bio_list; 86 struct dasd_diag_bio *bio_list;
87 u8 spare4[8]; 87 u8 spare4[8];
88} __attribute__ ((packed, aligned(8))); 88} __attribute__ ((packed, aligned(8)));
89#else /* CONFIG_ARCH_S390X */ 89#else /* CONFIG_64BIT */
90#define DASD_DIAG_FLAGA_DEFAULT 0x0 90#define DASD_DIAG_FLAGA_DEFAULT 0x0
91 91
92typedef u32 blocknum_t; 92typedef u32 blocknum_t;
@@ -125,4 +125,4 @@ struct dasd_diag_rw_io {
125 u32 interrupt_params; 125 u32 interrupt_params;
126 u8 spare3[20]; 126 u8 spare3[20];
127} __attribute__ ((packed, aligned(8))); 127} __attribute__ ((packed, aligned(8)));
128#endif /* CONFIG_ARCH_S390X */ 128#endif /* CONFIG_64BIT */
diff --git a/drivers/s390/block/dasd_eckd.c b/drivers/s390/block/dasd_eckd.c
index efc4cf62496e..96eb48258580 100644
--- a/drivers/s390/block/dasd_eckd.c
+++ b/drivers/s390/block/dasd_eckd.c
@@ -1041,7 +1041,7 @@ dasd_eckd_build_cp(struct dasd_device * device, struct request *req)
1041 /* Eckd can only do full blocks. */ 1041 /* Eckd can only do full blocks. */
1042 return ERR_PTR(-EINVAL); 1042 return ERR_PTR(-EINVAL);
1043 count += bv->bv_len >> (device->s2b_shift + 9); 1043 count += bv->bv_len >> (device->s2b_shift + 9);
1044#if defined(CONFIG_ARCH_S390X) 1044#if defined(CONFIG_64BIT)
1045 if (idal_is_needed (page_address(bv->bv_page), 1045 if (idal_is_needed (page_address(bv->bv_page),
1046 bv->bv_len)) 1046 bv->bv_len))
1047 cidaw += bv->bv_len >> (device->s2b_shift + 9); 1047 cidaw += bv->bv_len >> (device->s2b_shift + 9);
diff --git a/drivers/s390/block/dasd_fba.c b/drivers/s390/block/dasd_fba.c
index 9bac8d87a9cc..8ec75dc08e2c 100644
--- a/drivers/s390/block/dasd_fba.c
+++ b/drivers/s390/block/dasd_fba.c
@@ -271,7 +271,7 @@ dasd_fba_build_cp(struct dasd_device * device, struct request *req)
271 /* Fba can only do full blocks. */ 271 /* Fba can only do full blocks. */
272 return ERR_PTR(-EINVAL); 272 return ERR_PTR(-EINVAL);
273 count += bv->bv_len >> (device->s2b_shift + 9); 273 count += bv->bv_len >> (device->s2b_shift + 9);
274#if defined(CONFIG_ARCH_S390X) 274#if defined(CONFIG_64BIT)
275 if (idal_is_needed (page_address(bv->bv_page), 275 if (idal_is_needed (page_address(bv->bv_page),
276 bv->bv_len)) 276 bv->bv_len))
277 cidaw += bv->bv_len / blksize; 277 cidaw += bv->bv_len / blksize;
diff --git a/drivers/s390/block/xpram.c b/drivers/s390/block/xpram.c
index d428c909b8a0..bf3a67c3cc5e 100644
--- a/drivers/s390/block/xpram.c
+++ b/drivers/s390/block/xpram.c
@@ -160,7 +160,7 @@ static int xpram_page_in (unsigned long page_addr, unsigned int xpage_index)
160 "0: ipm %0\n" 160 "0: ipm %0\n"
161 " srl %0,28\n" 161 " srl %0,28\n"
162 "1:\n" 162 "1:\n"
163#ifndef CONFIG_ARCH_S390X 163#ifndef CONFIG_64BIT
164 ".section __ex_table,\"a\"\n" 164 ".section __ex_table,\"a\"\n"
165 " .align 4\n" 165 " .align 4\n"
166 " .long 0b,1b\n" 166 " .long 0b,1b\n"
@@ -208,7 +208,7 @@ static long xpram_page_out (unsigned long page_addr, unsigned int xpage_index)
208 "0: ipm %0\n" 208 "0: ipm %0\n"
209 " srl %0,28\n" 209 " srl %0,28\n"
210 "1:\n" 210 "1:\n"
211#ifndef CONFIG_ARCH_S390X 211#ifndef CONFIG_64BIT
212 ".section __ex_table,\"a\"\n" 212 ".section __ex_table,\"a\"\n"
213 " .align 4\n" 213 " .align 4\n"
214 " .long 0b,1b\n" 214 " .long 0b,1b\n"
diff --git a/drivers/s390/char/vmwatchdog.c b/drivers/s390/char/vmwatchdog.c
index 5473c23fcb52..5acc0ace3d7d 100644
--- a/drivers/s390/char/vmwatchdog.c
+++ b/drivers/s390/char/vmwatchdog.c
@@ -66,7 +66,7 @@ static int __diag288(enum vmwdt_func func, unsigned int timeout,
66 __cmdl = len; 66 __cmdl = len;
67 err = 0; 67 err = 0;
68 asm volatile ( 68 asm volatile (
69#ifdef __s390x__ 69#ifdef CONFIG_64BIT
70 "diag %2,%4,0x288\n" 70 "diag %2,%4,0x288\n"
71 "1: \n" 71 "1: \n"
72 ".section .fixup,\"ax\"\n" 72 ".section .fixup,\"ax\"\n"
diff --git a/drivers/s390/cio/cio.c b/drivers/s390/cio/cio.c
index 6f274f4f92eb..7376bc87206d 100644
--- a/drivers/s390/cio/cio.c
+++ b/drivers/s390/cio/cio.c
@@ -195,7 +195,7 @@ cio_start_key (struct subchannel *sch, /* subchannel structure */
195 sch->orb.spnd = sch->options.suspend; 195 sch->orb.spnd = sch->options.suspend;
196 sch->orb.ssic = sch->options.suspend && sch->options.inter; 196 sch->orb.ssic = sch->options.suspend && sch->options.inter;
197 sch->orb.lpm = (lpm != 0) ? (lpm & sch->opm) : sch->lpm; 197 sch->orb.lpm = (lpm != 0) ? (lpm & sch->opm) : sch->lpm;
198#ifdef CONFIG_ARCH_S390X 198#ifdef CONFIG_64BIT
199 /* 199 /*
200 * for 64 bit we always support 64 bit IDAWs with 4k page size only 200 * for 64 bit we always support 64 bit IDAWs with 4k page size only
201 */ 201 */
diff --git a/drivers/s390/cio/device_id.c b/drivers/s390/cio/device_id.c
index 3c77c3fd461d..04ceba343db8 100644
--- a/drivers/s390/cio/device_id.c
+++ b/drivers/s390/cio/device_id.c
@@ -27,7 +27,7 @@
27/* 27/*
28 * diag210 is used under VM to get information about a virtual device 28 * diag210 is used under VM to get information about a virtual device
29 */ 29 */
30#ifdef CONFIG_ARCH_S390X 30#ifdef CONFIG_64BIT
31int 31int
32diag210(struct diag210 * addr) 32diag210(struct diag210 * addr)
33{ 33{
diff --git a/drivers/s390/cio/ioasm.h b/drivers/s390/cio/ioasm.h
index 62b0e2ad507f..95a9462f9a91 100644
--- a/drivers/s390/cio/ioasm.h
+++ b/drivers/s390/cio/ioasm.h
@@ -50,7 +50,7 @@ static inline int stsch_err(struct subchannel_id schid,
50 "0: ipm %0\n" 50 "0: ipm %0\n"
51 " srl %0,28\n" 51 " srl %0,28\n"
52 "1:\n" 52 "1:\n"
53#ifdef CONFIG_ARCH_S390X 53#ifdef CONFIG_64BIT
54 ".section __ex_table,\"a\"\n" 54 ".section __ex_table,\"a\"\n"
55 " .align 8\n" 55 " .align 8\n"
56 " .quad 0b,1b\n" 56 " .quad 0b,1b\n"
@@ -95,7 +95,7 @@ static inline int msch_err(struct subchannel_id schid,
95 "0: ipm %0\n" 95 "0: ipm %0\n"
96 " srl %0,28\n" 96 " srl %0,28\n"
97 "1:\n" 97 "1:\n"
98#ifdef CONFIG_ARCH_S390X 98#ifdef CONFIG_64BIT
99 ".section __ex_table,\"a\"\n" 99 ".section __ex_table,\"a\"\n"
100 " .align 8\n" 100 " .align 8\n"
101 " .quad 0b,1b\n" 101 " .quad 0b,1b\n"
diff --git a/drivers/s390/cio/qdio.c b/drivers/s390/cio/qdio.c
index 035c77af9cd3..30a836ffc31f 100644
--- a/drivers/s390/cio/qdio.c
+++ b/drivers/s390/cio/qdio.c
@@ -2394,7 +2394,7 @@ tiqdio_check_chsc_availability(void)
2394 sprintf(dbf_text,"hydrati%1x", hydra_thinints); 2394 sprintf(dbf_text,"hydrati%1x", hydra_thinints);
2395 QDIO_DBF_TEXT0(0,setup,dbf_text); 2395 QDIO_DBF_TEXT0(0,setup,dbf_text);
2396 2396
2397#ifdef CONFIG_ARCH_S390X 2397#ifdef CONFIG_64BIT
2398 /* Check for QEBSM support in general (bit 58). */ 2398 /* Check for QEBSM support in general (bit 58). */
2399 is_passthrough = css_general_characteristics.qebsm; 2399 is_passthrough = css_general_characteristics.qebsm;
2400#endif 2400#endif
diff --git a/drivers/s390/cio/qdio.h b/drivers/s390/cio/qdio.h
index 43b840af5300..fa385e761fe1 100644
--- a/drivers/s390/cio/qdio.h
+++ b/drivers/s390/cio/qdio.h
@@ -271,7 +271,7 @@ static inline int
271do_sqbs(unsigned long sch, unsigned char state, int queue, 271do_sqbs(unsigned long sch, unsigned char state, int queue,
272 unsigned int *start, unsigned int *count) 272 unsigned int *start, unsigned int *count)
273{ 273{
274#ifdef CONFIG_ARCH_S390X 274#ifdef CONFIG_64BIT
275 register unsigned long _ccq asm ("0") = *count; 275 register unsigned long _ccq asm ("0") = *count;
276 register unsigned long _sch asm ("1") = sch; 276 register unsigned long _sch asm ("1") = sch;
277 unsigned long _queuestart = ((unsigned long)queue << 32) | *start; 277 unsigned long _queuestart = ((unsigned long)queue << 32) | *start;
@@ -295,7 +295,7 @@ static inline int
295do_eqbs(unsigned long sch, unsigned char *state, int queue, 295do_eqbs(unsigned long sch, unsigned char *state, int queue,
296 unsigned int *start, unsigned int *count) 296 unsigned int *start, unsigned int *count)
297{ 297{
298#ifdef CONFIG_ARCH_S390X 298#ifdef CONFIG_64BIT
299 register unsigned long _ccq asm ("0") = *count; 299 register unsigned long _ccq asm ("0") = *count;
300 register unsigned long _sch asm ("1") = sch; 300 register unsigned long _sch asm ("1") = sch;
301 unsigned long _queuestart = ((unsigned long)queue << 32) | *start; 301 unsigned long _queuestart = ((unsigned long)queue << 32) | *start;
@@ -323,7 +323,7 @@ do_siga_sync(struct subchannel_id schid, unsigned int mask1, unsigned int mask2)
323{ 323{
324 int cc; 324 int cc;
325 325
326#ifndef CONFIG_ARCH_S390X 326#ifndef CONFIG_64BIT
327 asm volatile ( 327 asm volatile (
328 "lhi 0,2 \n\t" 328 "lhi 0,2 \n\t"
329 "lr 1,%1 \n\t" 329 "lr 1,%1 \n\t"
@@ -336,7 +336,7 @@ do_siga_sync(struct subchannel_id schid, unsigned int mask1, unsigned int mask2)
336 : "d" (schid), "d" (mask1), "d" (mask2) 336 : "d" (schid), "d" (mask1), "d" (mask2)
337 : "cc", "0", "1", "2", "3" 337 : "cc", "0", "1", "2", "3"
338 ); 338 );
339#else /* CONFIG_ARCH_S390X */ 339#else /* CONFIG_64BIT */
340 asm volatile ( 340 asm volatile (
341 "lghi 0,2 \n\t" 341 "lghi 0,2 \n\t"
342 "llgfr 1,%1 \n\t" 342 "llgfr 1,%1 \n\t"
@@ -349,7 +349,7 @@ do_siga_sync(struct subchannel_id schid, unsigned int mask1, unsigned int mask2)
349 : "d" (schid), "d" (mask1), "d" (mask2) 349 : "d" (schid), "d" (mask1), "d" (mask2)
350 : "cc", "0", "1", "2", "3" 350 : "cc", "0", "1", "2", "3"
351 ); 351 );
352#endif /* CONFIG_ARCH_S390X */ 352#endif /* CONFIG_64BIT */
353 return cc; 353 return cc;
354} 354}
355 355
@@ -358,7 +358,7 @@ do_siga_input(struct subchannel_id schid, unsigned int mask)
358{ 358{
359 int cc; 359 int cc;
360 360
361#ifndef CONFIG_ARCH_S390X 361#ifndef CONFIG_64BIT
362 asm volatile ( 362 asm volatile (
363 "lhi 0,1 \n\t" 363 "lhi 0,1 \n\t"
364 "lr 1,%1 \n\t" 364 "lr 1,%1 \n\t"
@@ -370,7 +370,7 @@ do_siga_input(struct subchannel_id schid, unsigned int mask)
370 : "d" (schid), "d" (mask) 370 : "d" (schid), "d" (mask)
371 : "cc", "0", "1", "2", "memory" 371 : "cc", "0", "1", "2", "memory"
372 ); 372 );
373#else /* CONFIG_ARCH_S390X */ 373#else /* CONFIG_64BIT */
374 asm volatile ( 374 asm volatile (
375 "lghi 0,1 \n\t" 375 "lghi 0,1 \n\t"
376 "llgfr 1,%1 \n\t" 376 "llgfr 1,%1 \n\t"
@@ -382,7 +382,7 @@ do_siga_input(struct subchannel_id schid, unsigned int mask)
382 : "d" (schid), "d" (mask) 382 : "d" (schid), "d" (mask)
383 : "cc", "0", "1", "2", "memory" 383 : "cc", "0", "1", "2", "memory"
384 ); 384 );
385#endif /* CONFIG_ARCH_S390X */ 385#endif /* CONFIG_64BIT */
386 386
387 return cc; 387 return cc;
388} 388}
@@ -394,7 +394,7 @@ do_siga_output(unsigned long schid, unsigned long mask, __u32 *bb,
394 int cc; 394 int cc;
395 __u32 busy_bit; 395 __u32 busy_bit;
396 396
397#ifndef CONFIG_ARCH_S390X 397#ifndef CONFIG_64BIT
398 asm volatile ( 398 asm volatile (
399 "lhi 0,0 \n\t" 399 "lhi 0,0 \n\t"
400 "lr 1,%2 \n\t" 400 "lr 1,%2 \n\t"
@@ -424,7 +424,7 @@ do_siga_output(unsigned long schid, unsigned long mask, __u32 *bb,
424 "i" (QDIO_SIGA_ERROR_ACCESS_EXCEPTION) 424 "i" (QDIO_SIGA_ERROR_ACCESS_EXCEPTION)
425 : "cc", "0", "1", "2", "memory" 425 : "cc", "0", "1", "2", "memory"
426 ); 426 );
427#else /* CONFIG_ARCH_S390X */ 427#else /* CONFIG_64BIT */
428 asm volatile ( 428 asm volatile (
429 "llgfr 0,%5 \n\t" 429 "llgfr 0,%5 \n\t"
430 "lgr 1,%2 \n\t" 430 "lgr 1,%2 \n\t"
@@ -449,7 +449,7 @@ do_siga_output(unsigned long schid, unsigned long mask, __u32 *bb,
449 "i" (QDIO_SIGA_ERROR_ACCESS_EXCEPTION), "d" (fc) 449 "i" (QDIO_SIGA_ERROR_ACCESS_EXCEPTION), "d" (fc)
450 : "cc", "0", "1", "2", "memory" 450 : "cc", "0", "1", "2", "memory"
451 ); 451 );
452#endif /* CONFIG_ARCH_S390X */ 452#endif /* CONFIG_64BIT */
453 453
454 (*bb) = busy_bit; 454 (*bb) = busy_bit;
455 return cc; 455 return cc;
@@ -461,21 +461,21 @@ do_clear_global_summary(void)
461 461
462 unsigned long time; 462 unsigned long time;
463 463
464#ifndef CONFIG_ARCH_S390X 464#ifndef CONFIG_64BIT
465 asm volatile ( 465 asm volatile (
466 "lhi 1,3 \n\t" 466 "lhi 1,3 \n\t"
467 ".insn rre,0xb2650000,2,0 \n\t" 467 ".insn rre,0xb2650000,2,0 \n\t"
468 "lr %0,3 \n\t" 468 "lr %0,3 \n\t"
469 : "=d" (time) : : "cc", "1", "2", "3" 469 : "=d" (time) : : "cc", "1", "2", "3"
470 ); 470 );
471#else /* CONFIG_ARCH_S390X */ 471#else /* CONFIG_64BIT */
472 asm volatile ( 472 asm volatile (
473 "lghi 1,3 \n\t" 473 "lghi 1,3 \n\t"
474 ".insn rre,0xb2650000,2,0 \n\t" 474 ".insn rre,0xb2650000,2,0 \n\t"
475 "lgr %0,3 \n\t" 475 "lgr %0,3 \n\t"
476 : "=d" (time) : : "cc", "1", "2", "3" 476 : "=d" (time) : : "cc", "1", "2", "3"
477 ); 477 );
478#endif /* CONFIG_ARCH_S390X */ 478#endif /* CONFIG_64BIT */
479 479
480 return time; 480 return time;
481} 481}
@@ -542,11 +542,11 @@ struct qdio_perf_stats {
542 542
543#define MY_MODULE_STRING(x) #x 543#define MY_MODULE_STRING(x) #x
544 544
545#ifdef CONFIG_ARCH_S390X 545#ifdef CONFIG_64BIT
546#define QDIO_GET_ADDR(x) ((__u32)(unsigned long)x) 546#define QDIO_GET_ADDR(x) ((__u32)(unsigned long)x)
547#else /* CONFIG_ARCH_S390X */ 547#else /* CONFIG_64BIT */
548#define QDIO_GET_ADDR(x) ((__u32)(long)x) 548#define QDIO_GET_ADDR(x) ((__u32)(long)x)
549#endif /* CONFIG_ARCH_S390X */ 549#endif /* CONFIG_64BIT */
550 550
551struct qdio_q { 551struct qdio_q {
552 volatile struct slsb slsb; 552 volatile struct slsb slsb;
diff --git a/drivers/s390/crypto/z90hardware.c b/drivers/s390/crypto/z90hardware.c
index 7c3ed52e03e1..d7f7494a0cbe 100644
--- a/drivers/s390/crypto/z90hardware.c
+++ b/drivers/s390/crypto/z90hardware.c
@@ -785,7 +785,7 @@ testq(int q_nr, int *q_depth, int *dev_type, struct ap_status_word *stat)
785 int ccode; 785 int ccode;
786 786
787 asm volatile 787 asm volatile
788#ifdef __s390x__ 788#ifdef CONFIG_64BIT
789 (" llgfr 0,%4 \n" 789 (" llgfr 0,%4 \n"
790 " slgr 1,1 \n" 790 " slgr 1,1 \n"
791 " lgr 2,1 \n" 791 " lgr 2,1 \n"
@@ -855,7 +855,7 @@ resetq(int q_nr, struct ap_status_word *stat_p)
855 int ccode; 855 int ccode;
856 856
857 asm volatile 857 asm volatile
858#ifdef __s390x__ 858#ifdef CONFIG_64BIT
859 (" llgfr 0,%2 \n" 859 (" llgfr 0,%2 \n"
860 " lghi 1,1 \n" 860 " lghi 1,1 \n"
861 " sll 1,24 \n" 861 " sll 1,24 \n"
@@ -921,7 +921,7 @@ sen(int msg_len, unsigned char *msg_ext, struct ap_status_word *stat)
921 int ccode; 921 int ccode;
922 922
923 asm volatile 923 asm volatile
924#ifdef __s390x__ 924#ifdef CONFIG_64BIT
925 (" lgr 6,%3 \n" 925 (" lgr 6,%3 \n"
926 " llgfr 7,%2 \n" 926 " llgfr 7,%2 \n"
927 " llgt 0,0(6) \n" 927 " llgt 0,0(6) \n"
@@ -1000,7 +1000,7 @@ rec(int q_nr, int buff_l, unsigned char *rsp, unsigned char *id,
1000 int ccode; 1000 int ccode;
1001 1001
1002 asm volatile 1002 asm volatile
1003#ifdef __s390x__ 1003#ifdef CONFIG_64BIT
1004 (" llgfr 0,%2 \n" 1004 (" llgfr 0,%2 \n"
1005 " lgr 3,%4 \n" 1005 " lgr 3,%4 \n"
1006 " lgr 6,%3 \n" 1006 " lgr 6,%3 \n"
diff --git a/drivers/s390/net/Kconfig b/drivers/s390/net/Kconfig
index a7efc394515e..548854754921 100644
--- a/drivers/s390/net/Kconfig
+++ b/drivers/s390/net/Kconfig
@@ -1,5 +1,5 @@
1menu "S/390 network device drivers" 1menu "S/390 network device drivers"
2 depends on NETDEVICES && ARCH_S390 2 depends on NETDEVICES && S390
3 3
4config LCS 4config LCS
5 tristate "Lan Channel Station Interface" 5 tristate "Lan Channel Station Interface"
diff --git a/drivers/s390/net/claw.c b/drivers/s390/net/claw.c
index 6b63d21612ec..e70af7f39946 100644
--- a/drivers/s390/net/claw.c
+++ b/drivers/s390/net/claw.c
@@ -1603,7 +1603,7 @@ dumpit(char* buf, int len)
1603 __u32 ct, sw, rm, dup; 1603 __u32 ct, sw, rm, dup;
1604 char *ptr, *rptr; 1604 char *ptr, *rptr;
1605 char tbuf[82], tdup[82]; 1605 char tbuf[82], tdup[82];
1606#if (CONFIG_ARCH_S390X) 1606#if (CONFIG_64BIT)
1607 char addr[22]; 1607 char addr[22];
1608#else 1608#else
1609 char addr[12]; 1609 char addr[12];
@@ -1619,7 +1619,7 @@ dumpit(char* buf, int len)
1619 dup = 0; 1619 dup = 0;
1620 for ( ct=0; ct < len; ct++, ptr++, rptr++ ) { 1620 for ( ct=0; ct < len; ct++, ptr++, rptr++ ) {
1621 if (sw == 0) { 1621 if (sw == 0) {
1622#if (CONFIG_ARCH_S390X) 1622#if (CONFIG_64BIT)
1623 sprintf(addr, "%16.16lX",(unsigned long)rptr); 1623 sprintf(addr, "%16.16lX",(unsigned long)rptr);
1624#else 1624#else
1625 sprintf(addr, "%8.8X",(__u32)rptr); 1625 sprintf(addr, "%8.8X",(__u32)rptr);
@@ -1634,7 +1634,7 @@ dumpit(char* buf, int len)
1634 if (sw == 8) { 1634 if (sw == 8) {
1635 strcat(bhex, " "); 1635 strcat(bhex, " ");
1636 } 1636 }
1637#if (CONFIG_ARCH_S390X) 1637#if (CONFIG_64BIT)
1638 sprintf(tbuf,"%2.2lX", (unsigned long)*ptr); 1638 sprintf(tbuf,"%2.2lX", (unsigned long)*ptr);
1639#else 1639#else
1640 sprintf(tbuf,"%2.2X", (__u32)*ptr); 1640 sprintf(tbuf,"%2.2X", (__u32)*ptr);
diff --git a/drivers/s390/s390mach.c b/drivers/s390/s390mach.c
index 7dad597ff86e..3bf466603512 100644
--- a/drivers/s390/s390mach.c
+++ b/drivers/s390/s390mach.c
@@ -246,7 +246,7 @@ s390_revalidate_registers(struct mci *mci)
246 */ 246 */
247 kill_task = 1; 247 kill_task = 1;
248 248
249#ifndef __s390x__ 249#ifndef CONFIG_64BIT
250 asm volatile("ld 0,0(%0)\n" 250 asm volatile("ld 0,0(%0)\n"
251 "ld 2,8(%0)\n" 251 "ld 2,8(%0)\n"
252 "ld 4,16(%0)\n" 252 "ld 4,16(%0)\n"
@@ -255,7 +255,7 @@ s390_revalidate_registers(struct mci *mci)
255#endif 255#endif
256 256
257 if (MACHINE_HAS_IEEE) { 257 if (MACHINE_HAS_IEEE) {
258#ifdef __s390x__ 258#ifdef CONFIG_64BIT
259 fpt_save_area = &S390_lowcore.floating_pt_save_area; 259 fpt_save_area = &S390_lowcore.floating_pt_save_area;
260 fpt_creg_save_area = &S390_lowcore.fpt_creg_save_area; 260 fpt_creg_save_area = &S390_lowcore.fpt_creg_save_area;
261#else 261#else
@@ -314,7 +314,7 @@ s390_revalidate_registers(struct mci *mci)
314 */ 314 */
315 s390_handle_damage("invalid control registers."); 315 s390_handle_damage("invalid control registers.");
316 else 316 else
317#ifdef __s390x__ 317#ifdef CONFIG_64BIT
318 asm volatile("lctlg 0,15,0(%0)" 318 asm volatile("lctlg 0,15,0(%0)"
319 : : "a" (&S390_lowcore.cregs_save_area)); 319 : : "a" (&S390_lowcore.cregs_save_area));
320#else 320#else
@@ -327,7 +327,7 @@ s390_revalidate_registers(struct mci *mci)
327 * can't write something sensible into that register. 327 * can't write something sensible into that register.
328 */ 328 */
329 329
330#ifdef __s390x__ 330#ifdef CONFIG_64BIT
331 /* 331 /*
332 * See if we can revalidate the TOD programmable register with its 332 * See if we can revalidate the TOD programmable register with its
333 * old contents (should be zero) otherwise set it to zero. 333 * old contents (should be zero) otherwise set it to zero.
@@ -384,7 +384,7 @@ s390_do_machine_check(struct pt_regs *regs)
384 if (mci->b) { 384 if (mci->b) {
385 /* Processing backup -> verify if we can survive this */ 385 /* Processing backup -> verify if we can survive this */
386 u64 z_mcic, o_mcic, t_mcic; 386 u64 z_mcic, o_mcic, t_mcic;
387#ifdef __s390x__ 387#ifdef CONFIG_64BIT
388 z_mcic = (1ULL<<63 | 1ULL<<59 | 1ULL<<29); 388 z_mcic = (1ULL<<63 | 1ULL<<59 | 1ULL<<29);
389 o_mcic = (1ULL<<43 | 1ULL<<42 | 1ULL<<41 | 1ULL<<40 | 389 o_mcic = (1ULL<<43 | 1ULL<<42 | 1ULL<<41 | 1ULL<<40 |
390 1ULL<<36 | 1ULL<<35 | 1ULL<<34 | 1ULL<<32 | 390 1ULL<<36 | 1ULL<<35 | 1ULL<<34 | 1ULL<<32 |
diff --git a/drivers/s390/sysinfo.c b/drivers/s390/sysinfo.c
index 87c2db1bd4f5..66da840c9316 100644
--- a/drivers/s390/sysinfo.c
+++ b/drivers/s390/sysinfo.c
@@ -106,7 +106,7 @@ static inline int stsi (void *sysinfo,
106{ 106{
107 int cc, retv; 107 int cc, retv;
108 108
109#ifndef CONFIG_ARCH_S390X 109#ifndef CONFIG_64BIT
110 __asm__ __volatile__ ( "lr\t0,%2\n" 110 __asm__ __volatile__ ( "lr\t0,%2\n"
111 "\tlr\t1,%3\n" 111 "\tlr\t1,%3\n"
112 "\tstsi\t0(%4)\n" 112 "\tstsi\t0(%4)\n"
diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig
index 4c42065dea88..9e8254f0256c 100644
--- a/drivers/scsi/Kconfig
+++ b/drivers/scsi/Kconfig
@@ -1815,7 +1815,7 @@ config SCSI_SUNESP
1815 1815
1816config ZFCP 1816config ZFCP
1817 tristate "FCP host bus adapter driver for IBM eServer zSeries" 1817 tristate "FCP host bus adapter driver for IBM eServer zSeries"
1818 depends on ARCH_S390 && QDIO && SCSI 1818 depends on S390 && QDIO && SCSI
1819 select SCSI_FC_ATTRS 1819 select SCSI_FC_ATTRS
1820 help 1820 help
1821 If you want to access SCSI devices attached to your IBM eServer 1821 If you want to access SCSI devices attached to your IBM eServer
diff --git a/fs/partitions/Kconfig b/fs/partitions/Kconfig
index 656bc43431b9..e227a04261ab 100644
--- a/fs/partitions/Kconfig
+++ b/fs/partitions/Kconfig
@@ -85,7 +85,7 @@ config ATARI_PARTITION
85 85
86config IBM_PARTITION 86config IBM_PARTITION
87 bool "IBM disk label and partition support" 87 bool "IBM disk label and partition support"
88 depends on PARTITION_ADVANCED && ARCH_S390 88 depends on PARTITION_ADVANCED && S390
89 help 89 help
90 Say Y here if you would like to be able to read the hard disk 90 Say Y here if you would like to be able to read the hard disk
91 partition table format used by IBM DASD disks operating under CMS. 91 partition table format used by IBM DASD disks operating under CMS.
diff --git a/fs/proc/array.c b/fs/proc/array.c
index 3e1239e4b303..5e9251f65317 100644
--- a/fs/proc/array.c
+++ b/fs/proc/array.c
@@ -308,7 +308,7 @@ int proc_pid_status(struct task_struct *task, char * buffer)
308 buffer = task_sig(task, buffer); 308 buffer = task_sig(task, buffer);
309 buffer = task_cap(task, buffer); 309 buffer = task_cap(task, buffer);
310 buffer = cpuset_task_status_allowed(task, buffer); 310 buffer = cpuset_task_status_allowed(task, buffer);
311#if defined(CONFIG_ARCH_S390) 311#if defined(CONFIG_S390)
312 buffer = task_show_regs(task, buffer); 312 buffer = task_show_regs(task, buffer);
313#endif 313#endif
314 return buffer - orig; 314 return buffer - orig;
diff --git a/include/asm-s390/unistd.h b/include/asm-s390/unistd.h
index f97d92691f17..2861cdc243ad 100644
--- a/include/asm-s390/unistd.h
+++ b/include/asm-s390/unistd.h
@@ -539,7 +539,7 @@ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, \
539#define __ARCH_WANT_SYS_SIGPENDING 539#define __ARCH_WANT_SYS_SIGPENDING
540#define __ARCH_WANT_SYS_SIGPROCMASK 540#define __ARCH_WANT_SYS_SIGPROCMASK
541#define __ARCH_WANT_SYS_RT_SIGACTION 541#define __ARCH_WANT_SYS_RT_SIGACTION
542# ifdef CONFIG_ARCH_S390_31 542# ifndef CONFIG_64BIT
543# define __ARCH_WANT_STAT64 543# define __ARCH_WANT_STAT64
544# define __ARCH_WANT_SYS_TIME 544# define __ARCH_WANT_SYS_TIME
545# endif 545# endif
diff --git a/include/linux/irq.h b/include/linux/irq.h
index 60f8bc78a35a..6c5d4c898ccb 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -12,7 +12,7 @@
12#include <linux/config.h> 12#include <linux/config.h>
13#include <linux/smp.h> 13#include <linux/smp.h>
14 14
15#if !defined(CONFIG_ARCH_S390) 15#if !defined(CONFIG_S390)
16 16
17#include <linux/linkage.h> 17#include <linux/linkage.h>
18#include <linux/cache.h> 18#include <linux/cache.h>
diff --git a/init/Kconfig b/init/Kconfig
index 24e0f7c756c0..ba42f3793a84 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -189,7 +189,7 @@ config AUDIT
189 189
190config AUDITSYSCALL 190config AUDITSYSCALL
191 bool "Enable system-call auditing support" 191 bool "Enable system-call auditing support"
192 depends on AUDIT && (X86 || PPC || PPC64 || ARCH_S390 || IA64 || UML || SPARC64) 192 depends on AUDIT && (X86 || PPC || PPC64 || S390 || IA64 || UML || SPARC64)
193 default y if SECURITY_SELINUX 193 default y if SECURITY_SELINUX
194 help 194 help
195 Enable low-overhead system-call auditing infrastructure that 195 Enable low-overhead system-call auditing infrastructure that
diff --git a/init/do_mounts_rd.c b/init/do_mounts_rd.c
index c10b08a80982..c2683fcd792d 100644
--- a/init/do_mounts_rd.c
+++ b/init/do_mounts_rd.c
@@ -145,7 +145,7 @@ int __init rd_load_image(char *from)
145 int nblocks, i, disk; 145 int nblocks, i, disk;
146 char *buf = NULL; 146 char *buf = NULL;
147 unsigned short rotate = 0; 147 unsigned short rotate = 0;
148#if !defined(CONFIG_ARCH_S390) && !defined(CONFIG_PPC_ISERIES) 148#if !defined(CONFIG_S390) && !defined(CONFIG_PPC_ISERIES)
149 char rotator[4] = { '|' , '/' , '-' , '\\' }; 149 char rotator[4] = { '|' , '/' , '-' , '\\' };
150#endif 150#endif
151 151
@@ -237,7 +237,7 @@ int __init rd_load_image(char *from)
237 } 237 }
238 sys_read(in_fd, buf, BLOCK_SIZE); 238 sys_read(in_fd, buf, BLOCK_SIZE);
239 sys_write(out_fd, buf, BLOCK_SIZE); 239 sys_write(out_fd, buf, BLOCK_SIZE);
240#if !defined(CONFIG_ARCH_S390) && !defined(CONFIG_PPC_ISERIES) 240#if !defined(CONFIG_S390) && !defined(CONFIG_PPC_ISERIES)
241 if (!(i % 16)) { 241 if (!(i % 16)) {
242 printk("%c\b", rotator[rotate & 0x3]); 242 printk("%c\b", rotator[rotate & 0x3]);
243 rotate++; 243 rotate++;
diff --git a/kernel/panic.c b/kernel/panic.c
index aabc5f86fa3f..c5c4ab255834 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -60,7 +60,7 @@ NORET_TYPE void panic(const char * fmt, ...)
60 long i; 60 long i;
61 static char buf[1024]; 61 static char buf[1024];
62 va_list args; 62 va_list args;
63#if defined(CONFIG_ARCH_S390) 63#if defined(CONFIG_S390)
64 unsigned long caller = (unsigned long) __builtin_return_address(0); 64 unsigned long caller = (unsigned long) __builtin_return_address(0);
65#endif 65#endif
66 66
@@ -125,7 +125,7 @@ NORET_TYPE void panic(const char * fmt, ...)
125 printk(KERN_EMERG "Press Stop-A (L1-A) to return to the boot prom\n"); 125 printk(KERN_EMERG "Press Stop-A (L1-A) to return to the boot prom\n");
126 } 126 }
127#endif 127#endif
128#if defined(CONFIG_ARCH_S390) 128#if defined(CONFIG_S390)
129 disabled_wait(caller); 129 disabled_wait(caller);
130#endif 130#endif
131 local_irq_enable(); 131 local_irq_enable();
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 345f4a1d533f..a85047bb5739 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -108,7 +108,7 @@ extern int pwrsw_enabled;
108extern int unaligned_enabled; 108extern int unaligned_enabled;
109#endif 109#endif
110 110
111#ifdef CONFIG_ARCH_S390 111#ifdef CONFIG_S390
112#ifdef CONFIG_MATHEMU 112#ifdef CONFIG_MATHEMU
113extern int sysctl_ieee_emulation_warnings; 113extern int sysctl_ieee_emulation_warnings;
114#endif 114#endif
@@ -542,7 +542,7 @@ static ctl_table kern_table[] = {
542 .extra1 = &minolduid, 542 .extra1 = &minolduid,
543 .extra2 = &maxolduid, 543 .extra2 = &maxolduid,
544 }, 544 },
545#ifdef CONFIG_ARCH_S390 545#ifdef CONFIG_S390
546#ifdef CONFIG_MATHEMU 546#ifdef CONFIG_MATHEMU
547 { 547 {
548 .ctl_name = KERN_IEEE_EMULATION_WARNINGS, 548 .ctl_name = KERN_IEEE_EMULATION_WARNINGS,
@@ -644,7 +644,7 @@ static ctl_table kern_table[] = {
644 .mode = 0644, 644 .mode = 0644,
645 .proc_handler = &proc_dointvec, 645 .proc_handler = &proc_dointvec,
646 }, 646 },
647#if defined(CONFIG_ARCH_S390) 647#if defined(CONFIG_S390)
648 { 648 {
649 .ctl_name = KERN_SPIN_RETRY, 649 .ctl_name = KERN_SPIN_RETRY,
650 .procname = "spin_retry", 650 .procname = "spin_retry",
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 1cedc2356b78..80598cfd728c 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -32,7 +32,7 @@ config MAGIC_SYSRQ
32config LOG_BUF_SHIFT 32config LOG_BUF_SHIFT
33 int "Kernel log buffer size (16 => 64KB, 17 => 128KB)" if DEBUG_KERNEL 33 int "Kernel log buffer size (16 => 64KB, 17 => 128KB)" if DEBUG_KERNEL
34 range 12 21 34 range 12 21
35 default 17 if ARCH_S390 35 default 17 if S390
36 default 16 if X86_NUMAQ || IA64 36 default 16 if X86_NUMAQ || IA64
37 default 15 if SMP 37 default 15 if SMP
38 default 14 38 default 14