Skip to content

Commit

Permalink
um: take arch/um/sys-x86 to arch/x86/um
Browse files Browse the repository at this point in the history
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Richard Weinberger <richard@nod.at>
  • Loading branch information
Al Viro authored and richardweinberger committed Nov 2, 2011
1 parent 7bbe720 commit 5c48b10
Show file tree
Hide file tree
Showing 93 changed files with 24 additions and 25 deletions.
22 changes: 13 additions & 9 deletions arch/um/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,17 @@ ifeq ($(SUBARCH),x86_64)
HEADER_ARCH := x86
endif

HOST_DIR := arch/$(HEADER_ARCH)

include $(srctree)/$(ARCH_DIR)/Makefile-skas
include $(srctree)/$(ARCH_DIR)/Makefile-$(HEADER_ARCH)
include $(srctree)/$(HOST_DIR)/Makefile.um

core-y += $(HOST_DIR)/um/

SHARED_HEADERS := $(ARCH_DIR)/include/shared
ARCH_INCLUDE := -I$(srctree)/$(SHARED_HEADERS)
ARCH_INCLUDE += -I$(srctree)/$(ARCH_DIR)/sys-$(HEADER_ARCH)/shared
KBUILD_CPPFLAGS += -I$(srctree)/$(ARCH_DIR)/sys-$(HEADER_ARCH)
ARCH_INCLUDE += -I$(srctree)/$(HOST_DIR)/um/shared
KBUILD_CPPFLAGS += -I$(srctree)/$(HOST_DIR)/um

# -Dvmap=kernel_vmap prevents anything from referencing the libpcap.o symbol so
# named - it's a common symbol in libpcap, so we get a binary which crashes.
Expand All @@ -60,7 +64,7 @@ USER_CFLAGS = $(patsubst $(KERNEL_DEFINES),,$(patsubst -D__KERNEL__,,\
#This will adjust *FLAGS accordingly to the platform.
include $(srctree)/$(ARCH_DIR)/Makefile-os-$(OS)

KBUILD_CPPFLAGS += -I$(srctree)/arch/$(HEADER_ARCH)/include
KBUILD_CPPFLAGS += -I$(srctree)/$(HOST_DIR)/include

# -Derrno=kernel_errno - This turns all kernel references to errno into
# kernel_errno to separate them from the libc errno. This allows -fno-common
Expand Down Expand Up @@ -90,7 +94,7 @@ define archhelp
echo ' find in the kernel root.'
endef

KBUILD_KCONFIG := arch/um/Kconfig.$(HEADER_ARCH)
KBUILD_KCONFIG := $(HOST_DIR)/um/Kconfig

archprepare: include/generated/user_constants.h

Expand Down Expand Up @@ -131,8 +135,8 @@ archclean:

# Generated files

$(ARCH_DIR)/sys-$(HEADER_ARCH)/user-offsets.s: FORCE
$(Q)$(MAKE) $(build)=$(ARCH_DIR)/sys-$(HEADER_ARCH) $@
$(HOST_DIR)/um/user-offsets.s: FORCE
$(Q)$(MAKE) $(build)=$(HOST_DIR)/um $@

define filechk_gen-asm-offsets
(set -e; \
Expand All @@ -147,7 +151,7 @@ define filechk_gen-asm-offsets
echo ""; )
endef

include/generated/user_constants.h: $(ARCH_DIR)/sys-$(HEADER_ARCH)/user-offsets.s
include/generated/user_constants.h: $(HOST_DIR)/um/user-offsets.s
$(call filechk,gen-asm-offsets)

export SUBARCH USER_CFLAGS CFLAGS_NO_HARDENING OS HEADER_ARCH DEV_NULL_PATH
export SUBARCH USER_CFLAGS CFLAGS_NO_HARDENING OS DEV_NULL_PATH
2 changes: 1 addition & 1 deletion arch/um/os-Linux/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

obj-y = aio.o execvp.o file.o helper.o irq.o main.o mem.o process.o \
registers.o sigio.o signal.o start_up.o time.o tty.o \
umid.o tls.o user_syms.o util.o drivers/ sys-$(HEADER_ARCH)/ skas/
umid.o tls.o user_syms.o util.o drivers/ skas/

obj-$(CONFIG_ARCH_REUSE_HOST_VSYSCALL_AREA) += elf_aux.o

Expand Down
5 changes: 0 additions & 5 deletions arch/um/scripts/Makefile.rules
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,3 @@ $(UNPROFILE_OBJS) : CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ \
define unprofile
$(patsubst -pg,,$(patsubst -fprofile-arcs -ftest-coverage,,$(1)))
endef

ifdef subarch-obj-y
obj-y += subarch.o
subarch-y = $(addprefix ../../$(HEADER_ARCH)/,$(subarch-obj-y))
endif
2 changes: 1 addition & 1 deletion arch/um/Makefile-x86 → arch/x86/Makefile.um
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
core-y += arch/um/sys-x86/ arch/x86/crypto/
core-y += arch/x86/crypto/

ifeq ($(CONFIG_X86_32),y)
START := 0x8048000
Expand Down
File renamed without changes.
16 changes: 8 additions & 8 deletions arch/um/sys-x86/Makefile → arch/x86/um/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,28 +11,28 @@ endif
obj-y = bug.o bugs_$(BITS).o delay_$(BITS).o fault.o ksyms.o ldt.o \
ptrace_$(BITS).o ptrace_user.o setjmp_$(BITS).o signal_$(BITS).o \
stub_$(BITS).o stub_segv.o syscalls_$(BITS).o \
sys_call_table_$(BITS).o sysrq_$(BITS).o tls_$(BITS).o mem_$(BITS).o
sys_call_table_$(BITS).o sysrq_$(BITS).o tls_$(BITS).o \
mem_$(BITS).o subarch.o os-$(OS)/

ifeq ($(CONFIG_X86_32),y)

obj-y += checksum_32.o
obj-$(CONFIG_BINFMT_ELF) += elfcore.o

subarch-obj-y = lib/string_32.o lib/atomic64_32.o lib/atomic64_cx8_32.o
subarch-obj-$(CONFIG_RWSEM_XCHGADD_ALGORITHM) += lib/rwsem.o
subarch-obj-$(CONFIG_HIGHMEM) += mm/highmem_32.o
subarch-obj-$(CONFIG_MODULES) += kernel/module.o
subarch-y = ../lib/string_32.o ../lib/atomic64_32.o ../lib/atomic64_cx8_32.o
subarch-$(CONFIG_RWSEM_XCHGADD_ALGORITHM) += ../lib/rwsem.o
subarch-$(CONFIG_HIGHMEM) += ../mm/highmem_32.o

else

obj-y += vdso/

subarch-obj-y = lib/csum-partial_64.o lib/memcpy_64.o lib/thunk_64.o \
lib/rwsem.o
subarch-y = ../lib/csum-partial_64.o ../lib/memcpy_64.o ../lib/thunk_64.o \
../lib/rwsem.o

endif

subarch-obj-$(CONFIG_MODULES) += kernel/module.o
subarch-$(CONFIG_MODULES) += ../kernel/module.o

USER_OBJS := bugs_$(BITS).o ptrace_user.o fault.o

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion arch/um/sys-x86/vdso/vdso.S → arch/x86/um/vdso/vdso.S
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ __INITDATA

.globl vdso_start, vdso_end
vdso_start:
.incbin "arch/um/sys-x86/vdso/vdso.so"
.incbin "arch/x86/um/vdso/vdso.so"
vdso_end:

__FINIT
File renamed without changes.
File renamed without changes.

0 comments on commit 5c48b10

Please sign in to comment.