s390 (10/16): s390/s390x unification - part 1.
Subsystems (3)
PATCH 1/1 s390 (10/16): s390/s390x unification - part 1.
Merge s390x and s390 to one architecture.
diffstat:
Makefile | 4 arch/s390/Kconfig | 97 ++- arch/s390/Makefile | 22 arch/s390/boot/Makefile | 17 arch/s390/defconfig | 6 arch/s390/kernel/Makefile | 26 arch/s390/kernel/binfmt_elf32.c | 214 ++++++ arch/s390/kernel/compat_exec.c | 93 ++ arch/s390/kernel/compat_exec_domain.c | 30 arch/s390/kernel/compat_ioctl.c | 1084 ++++++++++++++++++++++++++++++++++ 10 files changed, 1539 insertions(+), 54 deletions(-)
Makefile +3 -1
@@ -33,7 +33,9 @@ # then ARCH is assigned, getting whatever value it gets normally, and # SUBARCH is subsequently ignored. -SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/) +SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \ + -e s/arm.*/arm/ -e s/sa110/arm/ \ + -e s/s390x/s390/ ) ARCH := $(SUBARCH) # Remove hyphens since they have special meaning in RPM filenames
arch/s390/Kconfig +64 -33
152 lines not on this page · raw message
arch/s390/Makefile +18 -4
@@ -13,14 +13,28 @@ # Copyright (C) 1994 by Linus Torvalds # +ifdef CONFIG_ARCH_S390_31 LDFLAGS := -m elf_s390 -OBJCOPYFLAGS := -O binary -LDFLAGS_vmlinux := -e start LDFLAGS_BLOB := --format binary --oformat elf32-s390 +CFLAGS += -m31 +UTS_MACHINE := s390 +endif + +ifdef CONFIG_ARCH_S390X +LDFLAGS := -m elf64_s390 +MODFLAGS += -fpic -D__PIC__ +LDFLAGS_BLOB := --format binary --oformat elf64-s390 +CFLAGS += -m64 +UTS_MACHINE := s390x +endif -CFLAGS += -pipe -fno-strength-reduce -finline-limit=10000 -Wno-sign-compare +OBJCOPYFLAGS := -O binary +LDFLAGS_vmlinux := -e start +CFLAGS += -pipe -fno-strength-reduce -finline-limit-10000 -Wno-sign-compare -head-y := arch/$(ARCH)/kernel/head.o arch/$(ARCH)/kernel/init_task.o +head-$(CONFIG_ARCH_S390_31) += arch/$(ARCH)/kernel/head.o +head-$(CONFIG_ARCH_S390X) += arch/$(ARCH)/kernel/head64.o +head-y += arch/$(ARCH)/kernel/init_task.o core-y += arch/$(ARCH)/mm/ arch/$(ARCH)/kernel/ libs-y += arch/$(ARCH)/lib/
arch/s390/boot/Makefile +8 -9
@@ -2,18 +2,17 @@ # Makefile for the linux s390-specific parts of the memory manager. # -targets := image listing -EXTRA_AFLAGS := -traditional -quiet_cmd_listing = OBJDUMP $@ - cmd_listing = $(OBJDUMP) --disassemble --disassemble-all \ - --disassemble-zeroes --reloc vmlinux > $@ +COMPILE_VERSION := __linux_compile_version_id__`hostname | \ + tr -c '[0-9A-Za-z]' '_'`__`date | \ + tr -c '[0-9A-Za-z]' '_'`_t -$(obj)/image: vmlinux FORCE - $(call if_changed,objcopy) +EXTRA_CFLAGS := -DCOMPILE_VERSION=$(COMPILE_VERSION) -gstabs -I . +EXTRA_AFLAGS := -traditional -$(obj)/listing: vmlinux FORCE - $(call if_changed,listing) +targets := image +$(obj)/image: vmlinux FORCE + $(call if_changed,objcopy) install: $(CONFIGURE) $(obj)/image sh -x $(obj)/install.sh $(KERNELRELEASE) $(obj)/image \
arch/s390/defconfig +4 -2
@@ -2,9 +2,9 @@ # Automatically generated make config: don't edit # CONFIG_MMU=y -CONFIG_UID16=y CONFIG_RWSEM_XCHGADD_ALGORITHM=y CONFIG_ARCH_S390=y +CONFIG_UID16=y # # Code maturity level options
@@ -36,9 +36,11 @@ # # Processor type and features # +# CONFIG_ARCH_S390X is not set +CONFIG_ARCH_S390_31=y CONFIG_SMP=y -CONFIG_MATHEMU=y CONFIG_NR_CPUS=32 +CONFIG_MATHEMU=y # # I/O subsystem configuration
arch/s390/kernel/Makefile +21 -5
@@ -2,17 +2,33 @@ # Makefile for the linux kernel. # -extra-y := head.o init_task.o EXTRA_AFLAGS := -traditional -obj-y := entry.o bitmap.o traps.o time.o process.o \ +obj-y := bitmap.o traps.o time.o process.o \ setup.o sys_s390.o ptrace.o signal.o cpcmd.o ebcdic.o \ - semaphore.o reipl.o s390_ext.o debug.o + semaphore.o s390_ext.o debug.o + +extra-$(CONFIG_ARCH_S390_31) += head.o +extra-$(CONFIG_ARCH_S390X) += head64.o +extra-y += init_task.o obj-$(CONFIG_MODULES) += s390_ksyms.o module.o obj-$(CONFIG_SMP) += smp.o +obj-$(CONFIG_S390_SUPPORT) += compat_linux.o compat_signal.o \ + compat_ioctl.o compat_wrapper.o \ + compat_exec.o compat_exec_domain.o +obj-$(CONFIG_BINFMT_ELF32) += binfmt_elf32.o + +obj-$(CONFIG_ARCH_S390_31) += entry.o reipl.o +obj-$(CONFIG_ARCH_S390X) += entry64.o reipl64.o + +ifdef CONFIG_ARCH_S390X +$(obj)%.o: $(patsubst arch/s390/%,arch/s390x/%,$(src))%.c + $(call if_changed_dep,cc_o_c) +endif + # -# Kernel debugging +# This is just to get the dependencies... # -obj-$(CONFIG_REMOTE_DEBUG) += gdb-stub.o #gdb-low.o +binfmt_elf32.o: $(TOPDIR)/fs/binfmt_elf.c
arch/s390/kernel/binfmt_elf32.c +214 -0
214 lines not on this page · raw message
arch/s390/kernel/compat_exec.c +93 -0
93 lines not on this page · raw message
arch/s390/kernel/compat_exec_domain.c +30 -0
@@ -0,0 +1,30 @@ +/* +* Support for 32-bit Linux for S390 personality. +* +* Copyright (C) 2000 IBM Deutschland Entwicklung GmbH, IBM Corporation +* Author(s): Gerhard Tonn ([email protected]) +* +* +*/ + +#include <linux/kernel.h> +#include <linux/init.h> +#include <linux/personality.h> +#include <linux/sched.h> + +struct exec_domain s390_exec_domain; + +static int __init +s390_init (void ) +{ + s390_exec_domain.name ="Linux/s390" ; + s390_exec_domain.handler =NULL ; + s390_exec_domain.pers_low =PER_LINUX32 ; + s390_exec_domain.pers_high =PER_LINUX32 ; + s390_exec_domain.signal_map = default_exec_domain.signal_map; + s390_exec_domain.signal_invmap = default_exec_domain.signal_invmap; +register_exec_domain (&s390_exec_domain); +return 0 ; +} + +__initcall (s390_init);
arch/s390/kernel/compat_ioctl.c +1084 -0
1,084 lines not on this page · raw message