Subject: [PATCH 24/91] um: merge arch/um/sys-{i386,x86_64}/asm
Subsystems (2)
Signed-off-by Al Viro <[email protected]>
---
arch/um/Makefile | 4 +-
arch/um/sys-i386/asm/elf.h | 125 -----------
arch/um/sys-i386/asm/module.h | 13 --
arch/um/sys-i386/asm/vm-flags.h | 14 --
arch/um/{sys-i386 => sys-x86}/asm/archparam.h | 8 +-
arch/um/sys-x86/asm/checksum.h | 10 +
.../asm/checksum.h => sys-x86/asm/checksum_32.h} | 0
.../asm/checksum.h => sys-x86/asm/checksum_64.h} | 0
arch/um/sys-x86/asm/elf.h | 221 ++++++++++++++++++++
arch/um/sys-x86/asm/module.h | 23 ++
arch/um/sys-x86/asm/processor.h | 15 ++
.../asm/processor.h => sys-x86/asm/processor_32.h} | 9 +-
.../asm/processor.h => sys-x86/asm/processor_64.h} | 5 -
arch/um/sys-x86/asm/ptrace.h | 5 +
.../asm/ptrace.h => sys-x86/asm/ptrace_32.h} | 0
.../asm/ptrace.h => sys-x86/asm/ptrace_64.h} | 0
arch/um/{sys-x86_64 => sys-x86}/asm/vm-flags.h | 14 +-
arch/um/sys-x86_64/asm/archparam.h | 16 --
arch/um/sys-x86_64/asm/elf.h | 132 ------------
arch/um/sys-x86_64/asm/module.h | 20 --
20 files changed, 296 insertions(+), 338 deletions(-)
delete mode 100644 arch/um/sys-i386/asm/elf.h
delete mode 100644 arch/um/sys-i386/asm/module.h
delete mode 100644 arch/um/sys-i386/asm/vm-flags.h
rename arch/um/{sys-i386 => sys-x86}/asm/archparam.h (62%)
create mode 100644 arch/um/sys-x86/asm/checksum.h
rename arch/um/{sys-i386/asm/checksum.h => sys-x86/asm/checksum_32.h} (100%)
rename arch/um/{sys-x86_64/asm/checksum.h => sys-x86/asm/checksum_64.h} (100%)
create mode 100644 arch/um/sys-x86/asm/elf.h
create mode 100644 arch/um/sys-x86/asm/module.h
create mode 100644 arch/um/sys-x86/asm/processor.h
rename arch/um/{sys-i386/asm/processor.h => sys-x86/asm/processor_32.h} (91%)
rename arch/um/{sys-x86_64/asm/processor.h => sys-x86/asm/processor_64.h} (91%)
create mode 100644 arch/um/sys-x86/asm/ptrace.h
rename arch/um/{sys-i386/asm/ptrace.h => sys-x86/asm/ptrace_32.h} (100%)
rename arch/um/{sys-x86_64/asm/ptrace.h => sys-x86/asm/ptrace_64.h} (100%)
rename arch/um/{sys-x86_64 => sys-x86}/asm/vm-flags.h (58%)
delete mode 100644 arch/um/sys-x86_64/asm/archparam.h
delete mode 100644 arch/um/sys-x86_64/asm/elf.h
delete mode 100644 arch/um/sys-x86_64/asm/module.harch/um/Makefile +2 -2
@@ -21,10 +21,12 @@ core-y += $(ARCH_DIR)/kernel/ \ MODE_INCLUDE += -I$(srctree)/$(ARCH_DIR)/include/shared/skas include $(srctree)/$(ARCH_DIR)/Makefile-skas +include $(srctree)/$(ARCH_DIR)/Makefile-$(SUBARCH) SHARED_HEADERS := $(ARCH_DIR)/include/shared ARCH_INCLUDE := -I$(srctree)/$(SHARED_HEADERS) ARCH_INCLUDE += -I$(srctree)/$(ARCH_DIR)/sys-$(SUBARCH)/shared +KBUILD_CPPFLAGS += -I$(srctree)/$(ARCH_DIR)/sys-$(HEADER_ARCH) KBUILD_CPPFLAGS += -I$(srctree)/$(ARCH_DIR)/sys-$(SUBARCH) # -Dvmap=kernel_vmap prevents anything from referencing the libpcap.o symbol so
@@ -46,8 +48,6 @@ USER_CFLAGS = $(patsubst $(KERNEL_DEFINES),,$(patsubst -D__KERNEL__,,\ $(patsubst -I%,,$(KBUILD_CFLAGS)))) $(ARCH_INCLUDE) $(MODE_INCLUDE) \ $(filter -I%,$(CFLAGS)) -D_FILE_OFFSET_BITS=64 -idirafter include -include $(srctree)/$(ARCH_DIR)/Makefile-$(SUBARCH) - #This will adjust *FLAGS accordingly to the platform. include $(srctree)/$(ARCH_DIR)/Makefile-os-$(OS)
arch/um/sys-i386/asm/elf.h deleted +0 -125
125 lines not on this page · raw message
arch/um/sys-i386/asm/module.h deleted +0 -13
@@ -1,13 +0,0 @@ -#ifndef __UM_MODULE_I386_H -#define __UM_MODULE_I386_H - -/* UML is simple */ -struct mod_arch_specific -{ -}; - -#define Elf_Shdr Elf32_Shdr -#define Elf_Sym Elf32_Sym -#define Elf_Ehdr Elf32_Ehdr - -#endif
arch/um/sys-i386/asm/vm-flags.h deleted +0 -14
@@ -1,14 +0,0 @@ -/* -* Copyright (C) 2004 Jeff Dike ([email protected]) -* Licensed under the GPL -*/ - -#ifndef __VM_FLAGS_I386_H -#define __VM_FLAGS_I386_H - -#define VM_DATA_DEFAULT_FLAGS \ - (VM_READ | VM_WRITE | \ - ((current->personality & READ_IMPLIES_EXEC) ? VM_EXEC : 0 ) | \ - VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) - -#endif
arch/um/sys-x86/asm/archparam.h renamed from arch/um/sys-i386/asm/archparam.h +6 -2
@@ -1,10 +1,13 @@/* * Copyright (C) 2000 - 2003 Jeff Dike ([email protected]) +* Copyright 2003 PathScale, Inc. * Licensed under the GPL */ -#ifndef __UM_ARCHPARAM_I386_H -#define __UM_ARCHPARAM_I386_H +#ifndef __UM_ARCHPARAM_H +#define __UM_ARCHPARAM_H + +#ifdef CONFIG_X86_32 #ifdef CONFIG_X86_PAE #define LAST_PKMAP 512
@@ -14,3 +17,4 @@#endif +#endif
arch/um/sys-x86/asm/checksum.h new file +10 -0
@@ -0,0 +1,10 @@ +#ifndef __UM_CHECKSUM_H +#define __UM_CHECKSUM_H + +#ifdef CONFIG_X86_32 +# include "checksum_32.h" +#else +# include "checksum_64.h" +#endif + +#endif
arch/um/sys-x86/asm/checksum_32.h renamed from arch/um/sys-i386/asm/checksum.h +0 -0
arch/um/sys-x86/asm/checksum_64.h renamed from arch/um/sys-x86_64/asm/checksum.h +0 -0
arch/um/sys-x86/asm/elf.h new file +221 -0
221 lines not on this page · raw message
arch/um/sys-x86/asm/module.h new file +23 -0
@@ -0,0 +1,23 @@ +#ifndef __UM_MODULE_H +#define __UM_MODULE_H + +/* UML is simple */ +struct mod_arch_specific +{ +}; + +#ifdef CONFIG_X86_32 + +#define Elf_Shdr Elf32_Shdr +#define Elf_Sym Elf32_Sym +#define Elf_Ehdr Elf32_Ehdr + +#else + +#define Elf_Shdr Elf64_Shdr +#define Elf_Sym Elf64_Sym +#define Elf_Ehdr Elf64_Ehdr + +#endif + +#endif
arch/um/sys-x86/asm/processor.h new file +15 -0
@@ -0,0 +1,15 @@ +#ifndef __UM_PROCESSOR_H +#define __UM_PROCESSOR_H + +/* include faultinfo structure */ +#include <sysdep/faultinfo.h> + +#ifdef CONFIG_X86_32 +# include "processor_32.h" +#else +# include "processor_64.h" +#endif + +#include <asm/processor-generic.h> + +#endif
arch/um/sys-x86/asm/processor_32.h renamed from arch/um/sys-i386/asm/processor.h +2 -7
@@ -6,15 +6,12 @@ #ifndef __UM_PROCESSOR_I386_H #define __UM_PROCESSOR_I386_H -#include "linux/string.h" +#include <linux/string.h> #include <sysdep/host_ldt.h> -#include "asm/segment.h" +#include <asm/segment.h> extern int host_has_cmov; -/* include faultinfo structure */ -#include "sysdep/faultinfo.h" - struct uml_tls_struct { struct user_desc tls; unsigned flushed:1;
@@ -73,6 +70,4 @@ static inline void rep_nop(void)#define KSTK_ESP (tsk) KSTK_REG(tsk, UESP)#define KSTK_EBP (tsk) KSTK_REG(tsk, EBP) -#include "asm/processor-generic.h" -#endif
arch/um/sys-x86/asm/processor_64.h renamed from arch/um/sys-x86_64/asm/processor.h +0 -5
@@ -7,9 +7,6 @@ #ifndef __UM_PROCESSOR_X86_64_H #define __UM_PROCESSOR_X86_64_H -/* include faultinfo structure */ -#include "sysdep/faultinfo.h" - struct arch_thread { unsigned long debugregs[8]; int debugregs_seq;
@@ -51,6 +48,4 @@ static inline void arch_copy_thread(struct arch_thread *from,#define KSTK_EIP (tsk) KSTK_REG(tsk, RIP)#define KSTK_ESP (tsk) KSTK_REG(tsk, RSP) -#include "asm/processor-generic.h" -#endif
arch/um/sys-x86/asm/ptrace.h new file +5 -0
@@ -0,0 +1,5 @@ +#ifdef CONFIG_X86_32 +# include "ptrace_32.h" +#else +# include "ptrace_64.h" +#endif
arch/um/sys-x86/asm/ptrace_32.h renamed from arch/um/sys-i386/asm/ptrace.h +0 -0
arch/um/sys-x86/asm/ptrace_64.h renamed from arch/um/sys-x86_64/asm/ptrace.h +0 -0
arch/um/sys-x86/asm/vm-flags.h renamed from arch/um/sys-x86_64/asm/vm-flags.h +12 -2
@@ -4,8 +4,17 @@* Licensed under the GPL */ -#ifndef __VM_FLAGS_X86_64_H -#define __VM_FLAGS_X86_64_H +#ifndef __VM_FLAGS_X86_H +#define __VM_FLAGS_X86_H + +#ifdef CONFIG_X86_32 + +#define VM_DATA_DEFAULT_FLAGS \ + (VM_READ | VM_WRITE | \ + ((current->personality & READ_IMPLIES_EXEC) ? VM_EXEC : 0 ) | \ + VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) + +#else #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
@@ -13,3 +22,4 @@ VM_EXEC | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)#endif +#endif
arch/um/sys-x86_64/asm/archparam.h deleted +0 -16
@@ -1,16 +0,0 @@ -/* -* Copyright 2003 PathScale, Inc. -* -* Licensed under the GPL -*/ - -#ifndef __UM_ARCHPARAM_X86_64_H -#define __UM_ARCHPARAM_X86_64_H - - -/* No user-accessible fixmap addresses, i.e. vsyscall */ -#define FIXADDR_USER_START 0 -#define FIXADDR_USER_END 0 - -#endif -
arch/um/sys-x86_64/asm/elf.h deleted +0 -132
132 lines not on this page · raw message
arch/um/sys-x86_64/asm/module.h deleted +0 -20
@@ -1,20 +0,0 @@ -/* -* Copyright 2003 PathScale, Inc. -* -* Licensed under the GPL -*/ - -#ifndef __UM_MODULE_X86_64_H -#define __UM_MODULE_X86_64_H - -/* UML is simple */ -struct mod_arch_specific -{ -}; - -#define Elf_Shdr Elf64_Shdr -#define Elf_Sym Elf64_Sym -#define Elf_Ehdr Elf64_Ehdr - -#endif -
Signature · 1 line
1.7.2.5