Skip to content

Commit 5c48b10

Browse files
Al Virorichardweinberger
authored andcommitted
um: take arch/um/sys-x86 to arch/x86/um
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Richard Weinberger <richard@nod.at>
1 parent 7bbe720 commit 5c48b10

93 files changed

Lines changed: 24 additions & 25 deletions

Some content is hidden

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

‎arch/um/Makefile‎

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,17 @@ ifeq ($(SUBARCH),x86_64)
3030
HEADER_ARCH := x86
3131
endif
3232

33+
HOST_DIR := arch/$(HEADER_ARCH)
34+
3335
include $(srctree)/$(ARCH_DIR)/Makefile-skas
34-
include $(srctree)/$(ARCH_DIR)/Makefile-$(HEADER_ARCH)
36+
include $(srctree)/$(HOST_DIR)/Makefile.um
37+
38+
core-y += $(HOST_DIR)/um/
3539

3640
SHARED_HEADERS := $(ARCH_DIR)/include/shared
3741
ARCH_INCLUDE := -I$(srctree)/$(SHARED_HEADERS)
38-
ARCH_INCLUDE += -I$(srctree)/$(ARCH_DIR)/sys-$(HEADER_ARCH)/shared
39-
KBUILD_CPPFLAGS += -I$(srctree)/$(ARCH_DIR)/sys-$(HEADER_ARCH)
42+
ARCH_INCLUDE += -I$(srctree)/$(HOST_DIR)/um/shared
43+
KBUILD_CPPFLAGS += -I$(srctree)/$(HOST_DIR)/um
4044

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

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

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

93-
KBUILD_KCONFIG := arch/um/Kconfig.$(HEADER_ARCH)
97+
KBUILD_KCONFIG := $(HOST_DIR)/um/Kconfig
9498

9599
archprepare: include/generated/user_constants.h
96100

@@ -131,8 +135,8 @@ archclean:
131135

132136
# Generated files
133137

134-
$(ARCH_DIR)/sys-$(HEADER_ARCH)/user-offsets.s: FORCE
135-
$(Q)$(MAKE) $(build)=$(ARCH_DIR)/sys-$(HEADER_ARCH) $@
138+
$(HOST_DIR)/um/user-offsets.s: FORCE
139+
$(Q)$(MAKE) $(build)=$(HOST_DIR)/um $@
136140

137141
define filechk_gen-asm-offsets
138142
(set -e; \
@@ -147,7 +151,7 @@ define filechk_gen-asm-offsets
147151
echo ""; )
148152
endef
149153

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

153-
export SUBARCH USER_CFLAGS CFLAGS_NO_HARDENING OS HEADER_ARCH DEV_NULL_PATH
157+
export SUBARCH USER_CFLAGS CFLAGS_NO_HARDENING OS DEV_NULL_PATH

‎arch/um/os-Linux/Makefile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

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

1010
obj-$(CONFIG_ARCH_REUSE_HOST_VSYSCALL_AREA) += elf_aux.o
1111

‎arch/um/scripts/Makefile.rules‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,3 @@ $(UNPROFILE_OBJS) : CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ \
2525
define unprofile
2626
$(patsubst -pg,,$(patsubst -fprofile-arcs -ftest-coverage,,$(1)))
2727
endef
28-
29-
ifdef subarch-obj-y
30-
obj-y += subarch.o
31-
subarch-y = $(addprefix ../../$(HEADER_ARCH)/,$(subarch-obj-y))
32-
endif
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
core-y += arch/um/sys-x86/ arch/x86/crypto/
1+
core-y += arch/x86/crypto/
22

33
ifeq ($(CONFIG_X86_32),y)
44
START := 0x8048000
File renamed without changes.
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,28 +11,28 @@ endif
1111
obj-y = bug.o bugs_$(BITS).o delay_$(BITS).o fault.o ksyms.o ldt.o \
1212
ptrace_$(BITS).o ptrace_user.o setjmp_$(BITS).o signal_$(BITS).o \
1313
stub_$(BITS).o stub_segv.o syscalls_$(BITS).o \
14-
sys_call_table_$(BITS).o sysrq_$(BITS).o tls_$(BITS).o mem_$(BITS).o
14+
sys_call_table_$(BITS).o sysrq_$(BITS).o tls_$(BITS).o \
15+
mem_$(BITS).o subarch.o os-$(OS)/
1516

1617
ifeq ($(CONFIG_X86_32),y)
1718

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

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

2626
else
2727

2828
obj-y += vdso/
2929

30-
subarch-obj-y = lib/csum-partial_64.o lib/memcpy_64.o lib/thunk_64.o \
31-
lib/rwsem.o
30+
subarch-y = ../lib/csum-partial_64.o ../lib/memcpy_64.o ../lib/thunk_64.o \
31+
../lib/rwsem.o
3232

3333
endif
3434

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

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

0 commit comments

Comments
 (0)