Skip to content

Commit 347a8dc

Browse files
Martin SchwidefskyLinus Torvalds
authored andcommitted
[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>
1 parent 9bbc834 commit 347a8dc

60 files changed

Lines changed: 183 additions & 208 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎arch/s390/Kconfig‎

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -23,35 +23,27 @@ config GENERIC_BUST_SPINLOCK
2323

2424
mainmenu "Linux Kernel Configuration"
2525

26-
config ARCH_S390
26+
config S390
2727
bool
2828
default y
2929

3030
config UID16
3131
bool
3232
default y
33-
depends on ARCH_S390X = 'n'
33+
depends on !64BIT
3434

3535
source "init/Kconfig"
3636

3737
menu "Base setup"
3838

3939
comment "Processor type and features"
4040

41-
config ARCH_S390X
41+
config 64BIT
4242
bool "64 bit kernel"
4343
help
4444
Select this option if you have a 64 bit IBM zSeries machine
4545
and want to use the 64 bit addressing mode.
4646

47-
config 64BIT
48-
def_bool ARCH_S390X
49-
50-
config ARCH_S390_31
51-
bool
52-
depends on ARCH_S390X = 'n'
53-
default y
54-
5547
config SMP
5648
bool "Symmetric multi-processing support"
5749
---help---
@@ -101,28 +93,23 @@ config MATHEMU
10193
on older S/390 machines. Say Y unless you know your machine doesn't
10294
need this.
10395

104-
config S390_SUPPORT
96+
config COMPAT
10597
bool "Kernel support for 31 bit emulation"
106-
depends on ARCH_S390X
98+
depends on 64BIT
10799
help
108100
Select this option if you want to enable your system kernel to
109101
handle system-calls from ELF binaries for 31 bit ESA. This option
110102
(and some other stuff like libraries and such) is needed for
111103
executing 31 bit applications. It is safe to say "Y".
112104

113-
config COMPAT
114-
bool
115-
depends on S390_SUPPORT
116-
default y
117-
118105
config SYSVIPC_COMPAT
119106
bool
120107
depends on COMPAT && SYSVIPC
121108
default y
122109

123110
config BINFMT_ELF32
124111
tristate "Kernel support for 31 bit ELF binaries"
125-
depends on S390_SUPPORT
112+
depends on COMPAT
126113
help
127114
This allows you to run 32-bit Linux/ELF binaries on your zSeries
128115
in 64 bit mode. Everybody wants this; say Y.
@@ -135,7 +122,7 @@ choice
135122

136123
config MARCH_G5
137124
bool "S/390 model G5 and G6"
138-
depends on ARCH_S390_31
125+
depends on !64BIT
139126
help
140127
Select this to build a 31 bit kernel that works
141128
on all S/390 and zSeries machines.

‎arch/s390/Makefile‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,14 @@
1313
# Copyright (C) 1994 by Linus Torvalds
1414
#
1515

16-
ifdef CONFIG_ARCH_S390_31
16+
ifndef CONFIG_64BIT
1717
LDFLAGS := -m elf_s390
1818
CFLAGS += -m31
1919
AFLAGS += -m31
2020
UTS_MACHINE := s390
2121
STACK_SIZE := 8192
2222
CHECKFLAGS += -D__s390__
23-
endif
24-
25-
ifdef CONFIG_ARCH_S390X
23+
else
2624
LDFLAGS := -m elf64_s390
2725
MODFLAGS += -fpic -D__PIC__
2826
CFLAGS += -m64

‎arch/s390/appldata/appldata_base.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040

4141
#define TOD_MICRO 0x01000 /* nr. of TOD clock units
4242
for 1 microsecond */
43-
#ifndef CONFIG_ARCH_S390X
43+
#ifndef CONFIG_64BIT
4444

4545
#define APPLDATA_START_INTERVAL_REC 0x00 /* Function codes for */
4646
#define APPLDATA_STOP_REC 0x01 /* DIAG 0xDC */
@@ -54,13 +54,13 @@
5454
#define APPLDATA_GEN_EVENT_RECORD 0x82
5555
#define APPLDATA_START_CONFIG_REC 0x83
5656

57-
#endif /* CONFIG_ARCH_S390X */
57+
#endif /* CONFIG_64BIT */
5858

5959

6060
/*
6161
* Parameter list for DIAGNOSE X'DC'
6262
*/
63-
#ifndef CONFIG_ARCH_S390X
63+
#ifndef CONFIG_64BIT
6464
struct appldata_parameter_list {
6565
u16 diag; /* The DIAGNOSE code X'00DC' */
6666
u8 function; /* The function code for the DIAGNOSE */
@@ -82,7 +82,7 @@ struct appldata_parameter_list {
8282
u64 product_id_addr;
8383
u64 buffer_addr;
8484
};
85-
#endif /* CONFIG_ARCH_S390X */
85+
#endif /* CONFIG_64BIT */
8686

8787
/*
8888
* /proc entries (sysctl)

‎arch/s390/crypto/crypt_s390.h‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ struct crypt_s390_query_status {
112112
* [ret] is the variable to receive the error code
113113
* [ERR] is the error code value
114114
*/
115-
#ifndef __s390x__
115+
#ifndef CONFIG_64BIT
116116
#define __crypt_s390_fixup \
117117
".section .fixup,\"ax\" \n" \
118118
"7: lhi %0,%h[e1] \n" \
@@ -129,7 +129,7 @@ struct crypt_s390_query_status {
129129
" .long 0b,7b \n" \
130130
" .long 1b,8b \n" \
131131
".previous"
132-
#else /* __s390x__ */
132+
#else /* CONFIG_64BIT */
133133
#define __crypt_s390_fixup \
134134
".section .fixup,\"ax\" \n" \
135135
"7: lhi %0,%h[e1] \n" \
@@ -142,18 +142,18 @@ struct crypt_s390_query_status {
142142
" .quad 0b,7b \n" \
143143
" .quad 1b,8b \n" \
144144
".previous"
145-
#endif /* __s390x__ */
145+
#endif /* CONFIG_64BIT */
146146

147147
/*
148148
* Standard code for setting the result of s390 crypto instructions.
149149
* %0: the register which will receive the result
150150
* [result]: the register containing the result (e.g. second operand length
151151
* to compute number of processed bytes].
152152
*/
153-
#ifndef __s390x__
153+
#ifndef CONFIG_64BIT
154154
#define __crypt_s390_set_result \
155155
" lr %0,%[result] \n"
156-
#else /* __s390x__ */
156+
#else /* CONFIG_64BIT */
157157
#define __crypt_s390_set_result \
158158
" lgr %0,%[result] \n"
159159
#endif

‎arch/s390/defconfig‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
CONFIG_MMU=y
77
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
88
CONFIG_GENERIC_CALIBRATE_DELAY=y
9-
CONFIG_ARCH_S390=y
9+
CONFIG_S390=y
1010
CONFIG_UID16=y
1111

1212
#
@@ -89,9 +89,7 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
8989
#
9090
# Processor type and features
9191
#
92-
# CONFIG_ARCH_S390X is not set
9392
# CONFIG_64BIT is not set
94-
CONFIG_ARCH_S390_31=y
9593
CONFIG_SMP=y
9694
CONFIG_NR_CPUS=32
9795
CONFIG_HOTPLUG_CPU=y

‎arch/s390/kernel/Makefile‎

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,31 +8,26 @@ obj-y := bitmap.o traps.o time.o process.o \
88
setup.o sys_s390.o ptrace.o signal.o cpcmd.o ebcdic.o \
99
semaphore.o s390_ext.o debug.o profile.o irq.o reipl_diag.o
1010

11+
obj-y += $(if $(CONFIG_64BIT),entry64.o,entry.o)
12+
obj-y += $(if $(CONFIG_64BIT),reipl64.o,reipl.o)
13+
1114
extra-y += head.o init_task.o vmlinux.lds
1215

1316
obj-$(CONFIG_MODULES) += s390_ksyms.o module.o
1417
obj-$(CONFIG_SMP) += smp.o
1518

16-
obj-$(CONFIG_S390_SUPPORT) += compat_linux.o compat_signal.o \
19+
obj-$(CONFIG_COMPAT) += compat_linux.o compat_signal.o \
1720
compat_ioctl.o compat_wrapper.o \
1821
compat_exec_domain.o
1922
obj-$(CONFIG_BINFMT_ELF32) += binfmt_elf32.o
2023

21-
obj-$(CONFIG_ARCH_S390_31) += entry.o reipl.o
22-
obj-$(CONFIG_ARCH_S390X) += entry64.o reipl64.o
23-
2424
obj-$(CONFIG_VIRT_TIMER) += vtime.o
2525

2626
# Kexec part
2727
S390_KEXEC_OBJS := machine_kexec.o crash.o
28-
ifeq ($(CONFIG_ARCH_S390X),y)
29-
S390_KEXEC_OBJS += relocate_kernel64.o
30-
else
31-
S390_KEXEC_OBJS += relocate_kernel.o
32-
endif
28+
S390_KEXEC_OBJS += $(if $(CONFIG_64BIT),relocate_kernel64.o,relocate_kernel.o)
3329
obj-$(CONFIG_KEXEC) += $(S390_KEXEC_OBJS)
3430

35-
3631
#
3732
# This is just to get the dependencies...
3833
#

‎arch/s390/kernel/cpcmd.c‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ int __cpcmd(const char *cmd, char *response, int rlen, int *response_code)
3939

4040
if (response != NULL && rlen > 0) {
4141
memset(response, 0, rlen);
42-
#ifndef CONFIG_ARCH_S390X
42+
#ifndef CONFIG_64BIT
4343
asm volatile ( "lra 2,0(%2)\n"
4444
"lr 4,%3\n"
4545
"o 4,%6\n"
@@ -55,7 +55,7 @@ int __cpcmd(const char *cmd, char *response, int rlen, int *response_code)
5555
: "a" (cpcmd_buf), "d" (cmdlen),
5656
"a" (response), "d" (rlen), "m" (mask)
5757
: "cc", "2", "3", "4", "5" );
58-
#else /* CONFIG_ARCH_S390X */
58+
#else /* CONFIG_64BIT */
5959
asm volatile ( "lrag 2,0(%2)\n"
6060
"lgr 4,%3\n"
6161
"o 4,%6\n"
@@ -73,19 +73,19 @@ int __cpcmd(const char *cmd, char *response, int rlen, int *response_code)
7373
: "a" (cpcmd_buf), "d" (cmdlen),
7474
"a" (response), "d" (rlen), "m" (mask)
7575
: "cc", "2", "3", "4", "5" );
76-
#endif /* CONFIG_ARCH_S390X */
76+
#endif /* CONFIG_64BIT */
7777
EBCASC(response, rlen);
7878
} else {
7979
return_len = 0;
80-
#ifndef CONFIG_ARCH_S390X
80+
#ifndef CONFIG_64BIT
8181
asm volatile ( "lra 2,0(%1)\n"
8282
"lr 3,%2\n"
8383
"diag 2,3,0x8\n"
8484
"lr %0,3\n"
8585
: "=d" (return_code)
8686
: "a" (cpcmd_buf), "d" (cmdlen)
8787
: "2", "3" );
88-
#else /* CONFIG_ARCH_S390X */
88+
#else /* CONFIG_64BIT */
8989
asm volatile ( "lrag 2,0(%1)\n"
9090
"lgr 3,%2\n"
9191
"sam31\n"
@@ -95,7 +95,7 @@ int __cpcmd(const char *cmd, char *response, int rlen, int *response_code)
9595
: "=d" (return_code)
9696
: "a" (cpcmd_buf), "d" (cmdlen)
9797
: "2", "3" );
98-
#endif /* CONFIG_ARCH_S390X */
98+
#endif /* CONFIG_64BIT */
9999
}
100100
spin_unlock_irqrestore(&cpcmd_lock, flags);
101101
if (response_code != NULL)
@@ -105,7 +105,7 @@ int __cpcmd(const char *cmd, char *response, int rlen, int *response_code)
105105

106106
EXPORT_SYMBOL(__cpcmd);
107107

108-
#ifdef CONFIG_ARCH_S390X
108+
#ifdef CONFIG_64BIT
109109
int cpcmd(const char *cmd, char *response, int rlen, int *response_code)
110110
{
111111
char *lowbuf;
@@ -129,4 +129,4 @@ int cpcmd(const char *cmd, char *response, int rlen, int *response_code)
129129
}
130130

131131
EXPORT_SYMBOL(cpcmd);
132-
#endif /* CONFIG_ARCH_S390X */
132+
#endif /* CONFIG_64BIT */

‎arch/s390/kernel/entry64.S‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ sysc_nr_ok:
213213
mvc SP_ARGS(8,%r15),SP_R7(%r15)
214214
sysc_do_restart:
215215
larl %r10,sys_call_table
216-
#ifdef CONFIG_S390_SUPPORT
216+
#ifdef CONFIG_COMPAT
217217
tm __TI_flags+5(%r9),(_TIF_31BIT>>16) # running in 31 bit mode ?
218218
jno sysc_noemu
219219
larl %r10,sys_call_table_emu # use 31 bit emulation system calls
@@ -361,7 +361,7 @@ sys_clone_glue:
361361
la %r2,SP_PTREGS(%r15) # load pt_regs
362362
jg sys_clone # branch to sys_clone
363363

364-
#ifdef CONFIG_S390_SUPPORT
364+
#ifdef CONFIG_COMPAT
365365
sys32_clone_glue:
366366
la %r2,SP_PTREGS(%r15) # load pt_regs
367367
jg sys32_clone # branch to sys32_clone
@@ -383,7 +383,7 @@ sys_execve_glue:
383383
bnz 0(%r12) # it did fail -> store result in gpr2
384384
b 6(%r12) # SKIP STG 2,SP_R2(15) in
385385
# system_call/sysc_tracesys
386-
#ifdef CONFIG_S390_SUPPORT
386+
#ifdef CONFIG_COMPAT
387387
sys32_execve_glue:
388388
la %r2,SP_PTREGS(%r15) # load pt_regs
389389
lgr %r12,%r14 # save return address
@@ -398,7 +398,7 @@ sys_sigreturn_glue:
398398
la %r2,SP_PTREGS(%r15) # load pt_regs as parameter
399399
jg sys_sigreturn # branch to sys_sigreturn
400400

401-
#ifdef CONFIG_S390_SUPPORT
401+
#ifdef CONFIG_COMPAT
402402
sys32_sigreturn_glue:
403403
la %r2,SP_PTREGS(%r15) # load pt_regs as parameter
404404
jg sys32_sigreturn # branch to sys32_sigreturn
@@ -408,7 +408,7 @@ sys_rt_sigreturn_glue:
408408
la %r2,SP_PTREGS(%r15) # load pt_regs as parameter
409409
jg sys_rt_sigreturn # branch to sys_sigreturn
410410

411-
#ifdef CONFIG_S390_SUPPORT
411+
#ifdef CONFIG_COMPAT
412412
sys32_rt_sigreturn_glue:
413413
la %r2,SP_PTREGS(%r15) # load pt_regs as parameter
414414
jg sys32_rt_sigreturn # branch to sys32_sigreturn
@@ -429,7 +429,7 @@ sys_sigsuspend_glue:
429429
la %r14,6(%r14) # skip store of return value
430430
jg sys_sigsuspend # branch to sys_sigsuspend
431431

432-
#ifdef CONFIG_S390_SUPPORT
432+
#ifdef CONFIG_COMPAT
433433
sys32_sigsuspend_glue:
434434
llgfr %r4,%r4 # unsigned long
435435
lgr %r5,%r4 # move mask back
@@ -449,7 +449,7 @@ sys_rt_sigsuspend_glue:
449449
la %r14,6(%r14) # skip store of return value
450450
jg sys_rt_sigsuspend # branch to sys_rt_sigsuspend
451451

452-
#ifdef CONFIG_S390_SUPPORT
452+
#ifdef CONFIG_COMPAT
453453
sys32_rt_sigsuspend_glue:
454454
llgfr %r3,%r3 # size_t
455455
lgr %r4,%r3 # move sigsetsize parameter
@@ -464,7 +464,7 @@ sys_sigaltstack_glue:
464464
la %r4,SP_PTREGS(%r15) # load pt_regs as parameter
465465
jg sys_sigaltstack # branch to sys_sigreturn
466466

467-
#ifdef CONFIG_S390_SUPPORT
467+
#ifdef CONFIG_COMPAT
468468
sys32_sigaltstack_glue:
469469
la %r4,SP_PTREGS(%r15) # load pt_regs as parameter
470470
jg sys32_sigaltstack_wrapper # branch to sys_sigreturn
@@ -1009,7 +1009,7 @@ sys_call_table:
10091009
#include "syscalls.S"
10101010
#undef SYSCALL
10111011

1012-
#ifdef CONFIG_S390_SUPPORT
1012+
#ifdef CONFIG_COMPAT
10131013

10141014
#define SYSCALL(esa,esame,emu) .long emu
10151015
.globl sys_call_table_emu

‎arch/s390/kernel/head.S‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
#include <asm/thread_info.h>
3131
#include <asm/page.h>
3232

33-
#ifdef CONFIG_ARCH_S390X
33+
#ifdef CONFIG_64BIT
3434
#define ARCH_OFFSET 4
3535
#else
3636
#define ARCH_OFFSET 0
@@ -539,7 +539,7 @@ ipl_devno:
539539
.word 0
540540
.endm
541541

542-
#ifdef CONFIG_ARCH_S390X
542+
#ifdef CONFIG_64BIT
543543
#include "head64.S"
544544
#else
545545
#include "head31.S"

0 commit comments

Comments
 (0)