aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorAl Viro <viro@ftp.linux.org.uk>2011-08-18 15:03:19 -0400
committerRichard Weinberger <richard@nod.at>2011-11-02 09:14:51 -0400
commit6582b7f7743da6ce3e3714e9e8b18e0e073d4acd (patch)
tree649346d2333865ccd4bb4d560ceb50c39139c5c2 /arch
parent858ba94499b4f48e9eb0be7cf0092f1ea9460fef (diff)
um: merge arch/um/sys-{i386,x86_64}
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'arch')
-rw-r--r--arch/um/Makefile6
-rw-r--r--arch/um/Makefile-i3862
-rw-r--r--arch/um/Makefile-x86_642
-rw-r--r--arch/um/sys-i386/Makefile24
-rw-r--r--arch/um/sys-i386/bug.c21
-rw-r--r--arch/um/sys-i386/ksyms.c5
-rw-r--r--arch/um/sys-i386/user-offsets.c53
-rw-r--r--arch/um/sys-x86/Makefile45
-rw-r--r--arch/um/sys-x86/bug.c (renamed from arch/um/sys-x86_64/bug.c)0
-rw-r--r--arch/um/sys-x86/bugs_32.c (renamed from arch/um/sys-i386/bugs.c)0
-rw-r--r--arch/um/sys-x86/bugs_64.c (renamed from arch/um/sys-x86_64/bugs.c)0
-rw-r--r--arch/um/sys-x86/checksum_32.S (renamed from arch/um/sys-i386/checksum.S)0
-rw-r--r--arch/um/sys-x86/delay_32.c (renamed from arch/um/sys-i386/delay.c)0
-rw-r--r--arch/um/sys-x86/delay_64.c (renamed from arch/um/sys-x86_64/delay.c)0
-rw-r--r--arch/um/sys-x86/elfcore.c (renamed from arch/um/sys-i386/elfcore.c)0
-rw-r--r--arch/um/sys-x86/fault.c (renamed from arch/um/sys-i386/fault.c)0
-rw-r--r--arch/um/sys-x86/ksyms.c (renamed from arch/um/sys-x86_64/ksyms.c)2
-rw-r--r--arch/um/sys-x86/ldt.c (renamed from arch/um/sys-i386/ldt.c)0
-rw-r--r--arch/um/sys-x86/mem_32.c (renamed from arch/um/sys-i386/mem.c)0
-rw-r--r--arch/um/sys-x86/mem_64.c (renamed from arch/um/sys-x86_64/mem.c)0
-rw-r--r--arch/um/sys-x86/ptrace_32.c (renamed from arch/um/sys-i386/ptrace.c)0
-rw-r--r--arch/um/sys-x86/ptrace_64.c (renamed from arch/um/sys-x86_64/ptrace.c)0
-rw-r--r--arch/um/sys-x86/ptrace_user.c (renamed from arch/um/sys-i386/ptrace_user.c)2
-rw-r--r--arch/um/sys-x86/setjmp_32.S (renamed from arch/um/sys-i386/setjmp.S)0
-rw-r--r--arch/um/sys-x86/setjmp_64.S (renamed from arch/um/sys-x86_64/setjmp.S)0
-rw-r--r--arch/um/sys-x86/signal_32.c (renamed from arch/um/sys-i386/signal.c)0
-rw-r--r--arch/um/sys-x86/signal_64.c (renamed from arch/um/sys-x86_64/signal.c)0
-rw-r--r--arch/um/sys-x86/stub_32.S (renamed from arch/um/sys-i386/stub.S)0
-rw-r--r--arch/um/sys-x86/stub_64.S (renamed from arch/um/sys-x86_64/stub.S)0
-rw-r--r--arch/um/sys-x86/stub_segv_32.c (renamed from arch/um/sys-i386/stub_segv.c)0
-rw-r--r--arch/um/sys-x86/stub_segv_64.c (renamed from arch/um/sys-x86_64/stub_segv.c)0
-rw-r--r--arch/um/sys-x86/sys_call_table_32.S (renamed from arch/um/sys-i386/sys_call_table.S)0
-rw-r--r--arch/um/sys-x86/sys_call_table_64.c (renamed from arch/um/sys-x86_64/syscall_table.c)0
-rw-r--r--arch/um/sys-x86/syscalls_32.c (renamed from arch/um/sys-i386/syscalls.c)0
-rw-r--r--arch/um/sys-x86/syscalls_64.c (renamed from arch/um/sys-x86_64/syscalls.c)0
-rw-r--r--arch/um/sys-x86/sysrq_32.c (renamed from arch/um/sys-i386/sysrq.c)0
-rw-r--r--arch/um/sys-x86/sysrq_64.c (renamed from arch/um/sys-x86_64/sysrq.c)0
-rw-r--r--arch/um/sys-x86/tls_32.c (renamed from arch/um/sys-i386/tls.c)0
-rw-r--r--arch/um/sys-x86/tls_64.c (renamed from arch/um/sys-x86_64/tls.c)0
-rw-r--r--arch/um/sys-x86/user-offsets.c (renamed from arch/um/sys-x86_64/user-offsets.c)33
-rw-r--r--arch/um/sys-x86/vdso/Makefile (renamed from arch/um/sys-x86_64/vdso/Makefile)0
-rw-r--r--arch/um/sys-x86/vdso/checkundef.sh (renamed from arch/um/sys-x86_64/vdso/checkundef.sh)0
-rw-r--r--arch/um/sys-x86/vdso/um_vdso.c (renamed from arch/um/sys-x86_64/vdso/um_vdso.c)0
-rw-r--r--arch/um/sys-x86/vdso/vdso-layout.lds.S (renamed from arch/um/sys-x86_64/vdso/vdso-layout.lds.S)0
-rw-r--r--arch/um/sys-x86/vdso/vdso-note.S (renamed from arch/um/sys-x86_64/vdso/vdso-note.S)0
-rw-r--r--arch/um/sys-x86/vdso/vdso.S (renamed from arch/um/sys-x86_64/vdso/vdso.S)2
-rw-r--r--arch/um/sys-x86/vdso/vdso.lds.S (renamed from arch/um/sys-x86_64/vdso/vdso.lds.S)0
-rw-r--r--arch/um/sys-x86/vdso/vma.c (renamed from arch/um/sys-x86_64/vdso/vma.c)0
-rw-r--r--arch/um/sys-x86_64/Makefile27
-rw-r--r--arch/um/sys-x86_64/fault.c28
-rw-r--r--arch/um/sys-x86_64/ptrace_user.c22
51 files changed, 81 insertions, 193 deletions
diff --git a/arch/um/Makefile b/arch/um/Makefile
index 184494d890b6..bd0587e5c466 100644
--- a/arch/um/Makefile
+++ b/arch/um/Makefile
@@ -121,8 +121,8 @@ archclean:
121 121
122# Generated files 122# Generated files
123 123
124$(ARCH_DIR)/sys-$(SUBARCH)/user-offsets.s: FORCE 124$(ARCH_DIR)/sys-$(HEADER_ARCH)/user-offsets.s: FORCE
125 $(Q)$(MAKE) $(build)=$(ARCH_DIR)/sys-$(SUBARCH) $@ 125 $(Q)$(MAKE) $(build)=$(ARCH_DIR)/sys-$(HEADER_ARCH) $@
126 126
127define filechk_gen-asm-offsets 127define filechk_gen-asm-offsets
128 (set -e; \ 128 (set -e; \
@@ -137,7 +137,7 @@ define filechk_gen-asm-offsets
137 echo ""; ) 137 echo ""; )
138endef 138endef
139 139
140include/generated/user_constants.h: $(ARCH_DIR)/sys-$(SUBARCH)/user-offsets.s 140include/generated/user_constants.h: $(ARCH_DIR)/sys-$(HEADER_ARCH)/user-offsets.s
141 $(call filechk,gen-asm-offsets) 141 $(call filechk,gen-asm-offsets)
142 142
143export SUBARCH USER_CFLAGS CFLAGS_NO_HARDENING OS HEADER_ARCH DEV_NULL_PATH 143export SUBARCH USER_CFLAGS CFLAGS_NO_HARDENING OS HEADER_ARCH DEV_NULL_PATH
diff --git a/arch/um/Makefile-i386 b/arch/um/Makefile-i386
index 302cbe504543..7e5f1baf7c93 100644
--- a/arch/um/Makefile-i386
+++ b/arch/um/Makefile-i386
@@ -1,4 +1,4 @@
1core-y += arch/um/sys-i386/ arch/x86/crypto/ 1core-y += arch/um/sys-x86/ arch/x86/crypto/
2 2
3TOP_ADDR := $(CONFIG_TOP_ADDR) 3TOP_ADDR := $(CONFIG_TOP_ADDR)
4 4
diff --git a/arch/um/Makefile-x86_64 b/arch/um/Makefile-x86_64
index a9cd7e77a7ab..92d8f8fb6b64 100644
--- a/arch/um/Makefile-x86_64
+++ b/arch/um/Makefile-x86_64
@@ -1,7 +1,7 @@
1# Copyright 2003 - 2004 Pathscale, Inc 1# Copyright 2003 - 2004 Pathscale, Inc
2# Released under the GPL 2# Released under the GPL
3 3
4core-y += arch/um/sys-x86_64/ arch/x86/crypto/ 4core-y += arch/um/sys-x86/ arch/x86/crypto/
5START := 0x60000000 5START := 0x60000000
6 6
7_extra_flags_ = -fno-builtin -m64 7_extra_flags_ = -fno-builtin -m64
diff --git a/arch/um/sys-i386/Makefile b/arch/um/sys-i386/Makefile
deleted file mode 100644
index 231bb983a121..000000000000
--- a/arch/um/sys-i386/Makefile
+++ /dev/null
@@ -1,24 +0,0 @@
1#
2# Copyright (C) 2002 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
3#
4
5obj-y = bug.o bugs.o checksum.o delay.o fault.o ksyms.o ldt.o ptrace.o \
6 ptrace_user.o setjmp.o signal.o stub.o stub_segv.o syscalls.o sysrq.o \
7 sys_call_table.o tls.o mem.o
8
9obj-$(CONFIG_BINFMT_ELF) += elfcore.o
10
11subarch-obj-y = lib/string_32.o lib/atomic64_32.o lib/atomic64_cx8_32.o
12subarch-obj-$(CONFIG_RWSEM_XCHGADD_ALGORITHM) += lib/rwsem.o
13subarch-obj-$(CONFIG_HIGHMEM) += mm/highmem_32.o
14subarch-obj-$(CONFIG_MODULES) += kernel/module.o
15
16USER_OBJS := bugs.o ptrace_user.o fault.o
17
18extra-y += user-offsets.s
19$(obj)/user-offsets.s: c_flags = -Wp,-MD,$(depfile) $(USER_CFLAGS)
20
21UNPROFILE_OBJS := stub_segv.o
22CFLAGS_stub_segv.o := $(CFLAGS_NO_HARDENING)
23
24include arch/um/scripts/Makefile.rules
diff --git a/arch/um/sys-i386/bug.c b/arch/um/sys-i386/bug.c
deleted file mode 100644
index 8d4f273f1219..000000000000
--- a/arch/um/sys-i386/bug.c
+++ /dev/null
@@ -1,21 +0,0 @@
1/*
2 * Copyright (C) 2006 Jeff Dike (jdike@addtoit.com)
3 * Licensed under the GPL V2
4 */
5
6#include <linux/uaccess.h>
7#include <asm/errno.h>
8
9/* Mostly copied from i386/x86_86 - eliminated the eip < PAGE_OFFSET because
10 * that's not relevant in skas mode.
11 */
12
13int is_valid_bugaddr(unsigned long eip)
14{
15 unsigned short ud2;
16
17 if (probe_kernel_address((unsigned short __user *)eip, ud2))
18 return 0;
19
20 return ud2 == 0x0b0f;
21}
diff --git a/arch/um/sys-i386/ksyms.c b/arch/um/sys-i386/ksyms.c
deleted file mode 100644
index bfbefd30db8f..000000000000
--- a/arch/um/sys-i386/ksyms.c
+++ /dev/null
@@ -1,5 +0,0 @@
1#include "linux/module.h"
2#include "asm/checksum.h"
3
4/* Networking helper routines. */
5EXPORT_SYMBOL(csum_partial);
diff --git a/arch/um/sys-i386/user-offsets.c b/arch/um/sys-i386/user-offsets.c
deleted file mode 100644
index 5f883bfe773f..000000000000
--- a/arch/um/sys-i386/user-offsets.c
+++ /dev/null
@@ -1,53 +0,0 @@
1#include <stdio.h>
2#include <stddef.h>
3#include <signal.h>
4#include <sys/poll.h>
5#include <sys/user.h>
6#include <sys/mman.h>
7#include <asm/ptrace.h>
8
9#define DEFINE(sym, val) \
10 asm volatile("\n->" #sym " %0 " #val : : "i" (val))
11
12#define DEFINE_LONGS(sym, val) \
13 asm volatile("\n->" #sym " %0 " #val : : "i" (val/sizeof(unsigned long)))
14
15#define OFFSET(sym, str, mem) \
16 DEFINE(sym, offsetof(struct str, mem));
17
18void foo(void)
19{
20 OFFSET(HOST_SC_TRAPNO, sigcontext, trapno);
21 OFFSET(HOST_SC_ERR, sigcontext, err);
22 OFFSET(HOST_SC_CR2, sigcontext, cr2);
23
24 DEFINE_LONGS(HOST_FP_SIZE, sizeof(struct user_fpregs_struct));
25 DEFINE_LONGS(HOST_FPX_SIZE, sizeof(struct user_fpxregs_struct));
26
27 DEFINE(HOST_IP, EIP);
28 DEFINE(HOST_SP, UESP);
29 DEFINE(HOST_EFLAGS, EFL);
30 DEFINE(HOST_EAX, EAX);
31 DEFINE(HOST_EBX, EBX);
32 DEFINE(HOST_ECX, ECX);
33 DEFINE(HOST_EDX, EDX);
34 DEFINE(HOST_ESI, ESI);
35 DEFINE(HOST_EDI, EDI);
36 DEFINE(HOST_EBP, EBP);
37 DEFINE(HOST_CS, CS);
38 DEFINE(HOST_SS, SS);
39 DEFINE(HOST_DS, DS);
40 DEFINE(HOST_FS, FS);
41 DEFINE(HOST_ES, ES);
42 DEFINE(HOST_GS, GS);
43 DEFINE(UM_FRAME_SIZE, sizeof(struct user_regs_struct));
44
45 /* XXX Duplicated between i386 and x86_64 */
46 DEFINE(UM_POLLIN, POLLIN);
47 DEFINE(UM_POLLPRI, POLLPRI);
48 DEFINE(UM_POLLOUT, POLLOUT);
49
50 DEFINE(UM_PROT_READ, PROT_READ);
51 DEFINE(UM_PROT_WRITE, PROT_WRITE);
52 DEFINE(UM_PROT_EXEC, PROT_EXEC);
53}
diff --git a/arch/um/sys-x86/Makefile b/arch/um/sys-x86/Makefile
new file mode 100644
index 000000000000..671de0b45dd8
--- /dev/null
+++ b/arch/um/sys-x86/Makefile
@@ -0,0 +1,45 @@
1#
2# Copyright (C) 2002 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
3#
4
5ifeq ($(CONFIG_X86_32),y)
6 BITS := 32
7else
8 BITS := 64
9endif
10
11obj-y = bug.o bugs_$(BITS).o delay_$(BITS).o fault.o ksyms.o ldt.o \
12 ptrace_$(BITS).o ptrace_user.o setjmp_$(BITS).o signal_$(BITS).o \
13 stub_$(BITS).o stub_segv_$(BITS).o syscalls_$(BITS).o \
14 sys_call_table_$(BITS).o sysrq_$(BITS).o tls_$(BITS).o mem_$(BITS).o
15
16ifeq ($(CONFIG_X86_32),y)
17
18obj-y += checksum_32.o
19obj-$(CONFIG_BINFMT_ELF) += elfcore.o
20
21subarch-obj-y = lib/string_32.o lib/atomic64_32.o lib/atomic64_cx8_32.o
22subarch-obj-$(CONFIG_RWSEM_XCHGADD_ALGORITHM) += lib/rwsem.o
23subarch-obj-$(CONFIG_HIGHMEM) += mm/highmem_32.o
24subarch-obj-$(CONFIG_MODULES) += kernel/module.o
25
26else
27
28obj-y += vdso/
29
30subarch-obj-y = lib/csum-partial_64.o lib/memcpy_64.o lib/thunk_64.o \
31 lib/rwsem.o
32
33endif
34
35subarch-obj-$(CONFIG_MODULES) += kernel/module.o
36
37USER_OBJS := bugs_$(BITS).o ptrace_user.o fault.o
38
39extra-y += user-offsets.s
40$(obj)/user-offsets.s: c_flags = -Wp,-MD,$(depfile) $(USER_CFLAGS)
41
42UNPROFILE_OBJS := stub_segv.o
43CFLAGS_stub_segv.o := $(CFLAGS_NO_HARDENING)
44
45include arch/um/scripts/Makefile.rules
diff --git a/arch/um/sys-x86_64/bug.c b/arch/um/sys-x86/bug.c
index e8034e363d83..e8034e363d83 100644
--- a/arch/um/sys-x86_64/bug.c
+++ b/arch/um/sys-x86/bug.c
diff --git a/arch/um/sys-i386/bugs.c b/arch/um/sys-x86/bugs_32.c
index 7058e1fa903b..7058e1fa903b 100644
--- a/arch/um/sys-i386/bugs.c
+++ b/arch/um/sys-x86/bugs_32.c
diff --git a/arch/um/sys-x86_64/bugs.c b/arch/um/sys-x86/bugs_64.c
index 44e02ba2a265..44e02ba2a265 100644
--- a/arch/um/sys-x86_64/bugs.c
+++ b/arch/um/sys-x86/bugs_64.c
diff --git a/arch/um/sys-i386/checksum.S b/arch/um/sys-x86/checksum_32.S
index f058d2f82e18..f058d2f82e18 100644
--- a/arch/um/sys-i386/checksum.S
+++ b/arch/um/sys-x86/checksum_32.S
diff --git a/arch/um/sys-i386/delay.c b/arch/um/sys-x86/delay_32.c
index f3fe1a688f7e..f3fe1a688f7e 100644
--- a/arch/um/sys-i386/delay.c
+++ b/arch/um/sys-x86/delay_32.c
diff --git a/arch/um/sys-x86_64/delay.c b/arch/um/sys-x86/delay_64.c
index f3fe1a688f7e..f3fe1a688f7e 100644
--- a/arch/um/sys-x86_64/delay.c
+++ b/arch/um/sys-x86/delay_64.c
diff --git a/arch/um/sys-i386/elfcore.c b/arch/um/sys-x86/elfcore.c
index 6bb49b687c97..6bb49b687c97 100644
--- a/arch/um/sys-i386/elfcore.c
+++ b/arch/um/sys-x86/elfcore.c
diff --git a/arch/um/sys-i386/fault.c b/arch/um/sys-x86/fault.c
index d670f68532f4..d670f68532f4 100644
--- a/arch/um/sys-i386/fault.c
+++ b/arch/um/sys-x86/fault.c
diff --git a/arch/um/sys-x86_64/ksyms.c b/arch/um/sys-x86/ksyms.c
index 1db2fce00948..2e8f43ec6214 100644
--- a/arch/um/sys-x86_64/ksyms.c
+++ b/arch/um/sys-x86/ksyms.c
@@ -2,10 +2,12 @@
2#include <asm/string.h> 2#include <asm/string.h>
3#include <asm/checksum.h> 3#include <asm/checksum.h>
4 4
5#ifndef CONFIG_X86_32
5/*XXX: we need them because they would be exported by x86_64 */ 6/*XXX: we need them because they would be exported by x86_64 */
6#if (__GNUC__ == 4 && __GNUC_MINOR__ >= 3) || __GNUC__ > 4 7#if (__GNUC__ == 4 && __GNUC_MINOR__ >= 3) || __GNUC__ > 4
7EXPORT_SYMBOL(memcpy); 8EXPORT_SYMBOL(memcpy);
8#else 9#else
9EXPORT_SYMBOL(__memcpy); 10EXPORT_SYMBOL(__memcpy);
10#endif 11#endif
12#endif
11EXPORT_SYMBOL(csum_partial); 13EXPORT_SYMBOL(csum_partial);
diff --git a/arch/um/sys-i386/ldt.c b/arch/um/sys-x86/ldt.c
index 3f2bf208d884..3f2bf208d884 100644
--- a/arch/um/sys-i386/ldt.c
+++ b/arch/um/sys-x86/ldt.c
diff --git a/arch/um/sys-i386/mem.c b/arch/um/sys-x86/mem_32.c
index 639900a6fde9..639900a6fde9 100644
--- a/arch/um/sys-i386/mem.c
+++ b/arch/um/sys-x86/mem_32.c
diff --git a/arch/um/sys-x86_64/mem.c b/arch/um/sys-x86/mem_64.c
index 546518727a73..546518727a73 100644
--- a/arch/um/sys-x86_64/mem.c
+++ b/arch/um/sys-x86/mem_64.c
diff --git a/arch/um/sys-i386/ptrace.c b/arch/um/sys-x86/ptrace_32.c
index a174fde2531c..a174fde2531c 100644
--- a/arch/um/sys-i386/ptrace.c
+++ b/arch/um/sys-x86/ptrace_32.c
diff --git a/arch/um/sys-x86_64/ptrace.c b/arch/um/sys-x86/ptrace_64.c
index 44e68e0c0d10..44e68e0c0d10 100644
--- a/arch/um/sys-x86_64/ptrace.c
+++ b/arch/um/sys-x86/ptrace_64.c
diff --git a/arch/um/sys-i386/ptrace_user.c b/arch/um/sys-x86/ptrace_user.c
index 0b10c3e74028..3960ca1dd35a 100644
--- a/arch/um/sys-i386/ptrace_user.c
+++ b/arch/um/sys-x86/ptrace_user.c
@@ -4,7 +4,7 @@
4 */ 4 */
5 5
6#include <errno.h> 6#include <errno.h>
7#include <sys/ptrace.h> 7#include "ptrace_user.h"
8 8
9int ptrace_getregs(long pid, unsigned long *regs_out) 9int ptrace_getregs(long pid, unsigned long *regs_out)
10{ 10{
diff --git a/arch/um/sys-i386/setjmp.S b/arch/um/sys-x86/setjmp_32.S
index b766792c9933..b766792c9933 100644
--- a/arch/um/sys-i386/setjmp.S
+++ b/arch/um/sys-x86/setjmp_32.S
diff --git a/arch/um/sys-x86_64/setjmp.S b/arch/um/sys-x86/setjmp_64.S
index 45f547b4043e..45f547b4043e 100644
--- a/arch/um/sys-x86_64/setjmp.S
+++ b/arch/um/sys-x86/setjmp_64.S
diff --git a/arch/um/sys-i386/signal.c b/arch/um/sys-x86/signal_32.c
index bcbfb0d64813..bcbfb0d64813 100644
--- a/arch/um/sys-i386/signal.c
+++ b/arch/um/sys-x86/signal_32.c
diff --git a/arch/um/sys-x86_64/signal.c b/arch/um/sys-x86/signal_64.c
index 255b2ca0ce67..255b2ca0ce67 100644
--- a/arch/um/sys-x86_64/signal.c
+++ b/arch/um/sys-x86/signal_64.c
diff --git a/arch/um/sys-i386/stub.S b/arch/um/sys-x86/stub_32.S
index 54a36ec20cb7..54a36ec20cb7 100644
--- a/arch/um/sys-i386/stub.S
+++ b/arch/um/sys-x86/stub_32.S
diff --git a/arch/um/sys-x86_64/stub.S b/arch/um/sys-x86/stub_64.S
index 20e4a96a6dcb..20e4a96a6dcb 100644
--- a/arch/um/sys-x86_64/stub.S
+++ b/arch/um/sys-x86/stub_64.S
diff --git a/arch/um/sys-i386/stub_segv.c b/arch/um/sys-x86/stub_segv_32.c
index 28ccf737a79f..28ccf737a79f 100644
--- a/arch/um/sys-i386/stub_segv.c
+++ b/arch/um/sys-x86/stub_segv_32.c
diff --git a/arch/um/sys-x86_64/stub_segv.c b/arch/um/sys-x86/stub_segv_64.c
index ced051afc705..ced051afc705 100644
--- a/arch/um/sys-x86_64/stub_segv.c
+++ b/arch/um/sys-x86/stub_segv_64.c
diff --git a/arch/um/sys-i386/sys_call_table.S b/arch/um/sys-x86/sys_call_table_32.S
index de274071455d..de274071455d 100644
--- a/arch/um/sys-i386/sys_call_table.S
+++ b/arch/um/sys-x86/sys_call_table_32.S
diff --git a/arch/um/sys-x86_64/syscall_table.c b/arch/um/sys-x86/sys_call_table_64.c
index f46de82d675c..f46de82d675c 100644
--- a/arch/um/sys-x86_64/syscall_table.c
+++ b/arch/um/sys-x86/sys_call_table_64.c
diff --git a/arch/um/sys-i386/syscalls.c b/arch/um/sys-x86/syscalls_32.c
index 70ca357393b8..70ca357393b8 100644
--- a/arch/um/sys-i386/syscalls.c
+++ b/arch/um/sys-x86/syscalls_32.c
diff --git a/arch/um/sys-x86_64/syscalls.c b/arch/um/sys-x86/syscalls_64.c
index f3d82bb6e15a..f3d82bb6e15a 100644
--- a/arch/um/sys-x86_64/syscalls.c
+++ b/arch/um/sys-x86/syscalls_64.c
diff --git a/arch/um/sys-i386/sysrq.c b/arch/um/sys-x86/sysrq_32.c
index 171b3e9dc867..171b3e9dc867 100644
--- a/arch/um/sys-i386/sysrq.c
+++ b/arch/um/sys-x86/sysrq_32.c
diff --git a/arch/um/sys-x86_64/sysrq.c b/arch/um/sys-x86/sysrq_64.c
index f4f82beb3508..f4f82beb3508 100644
--- a/arch/um/sys-x86_64/sysrq.c
+++ b/arch/um/sys-x86/sysrq_64.c
diff --git a/arch/um/sys-i386/tls.c b/arch/um/sys-x86/tls_32.c
index c6c7131e563b..c6c7131e563b 100644
--- a/arch/um/sys-i386/tls.c
+++ b/arch/um/sys-x86/tls_32.c
diff --git a/arch/um/sys-x86_64/tls.c b/arch/um/sys-x86/tls_64.c
index f7ba46200ecd..f7ba46200ecd 100644
--- a/arch/um/sys-x86_64/tls.c
+++ b/arch/um/sys-x86/tls_64.c
diff --git a/arch/um/sys-x86_64/user-offsets.c b/arch/um/sys-x86/user-offsets.c
index 973585414a66..718f0c0f0b0c 100644
--- a/arch/um/sys-x86_64/user-offsets.c
+++ b/arch/um/sys-x86/user-offsets.c
@@ -9,20 +9,41 @@
9#include <asm/types.h> 9#include <asm/types.h>
10 10
11#define DEFINE(sym, val) \ 11#define DEFINE(sym, val) \
12 asm volatile("\n->" #sym " %0 " #val : : "i" (val)) 12 asm volatile("\n->" #sym " %0 " #val : : "i" (val))
13 13
14#define DEFINE_LONGS(sym, val) \ 14#define DEFINE_LONGS(sym, val) \
15 asm volatile("\n->" #sym " %0 " #val : : "i" (val/sizeof(unsigned long))) 15 asm volatile("\n->" #sym " %0 " #val : : "i" (val/sizeof(unsigned long)))
16 16
17#define OFFSET(sym, str, mem) \ 17#define OFFSET(sym, str, mem) \
18 DEFINE(sym, offsetof(struct str, mem)); 18 DEFINE(sym, offsetof(struct str, mem));
19 19
20void foo(void) 20void foo(void)
21{ 21{
22 OFFSET(HOST_SC_CR2, sigcontext, cr2);
23 OFFSET(HOST_SC_ERR, sigcontext, err);
24 OFFSET(HOST_SC_TRAPNO, sigcontext, trapno); 22 OFFSET(HOST_SC_TRAPNO, sigcontext, trapno);
23 OFFSET(HOST_SC_ERR, sigcontext, err);
24 OFFSET(HOST_SC_CR2, sigcontext, cr2);
25 25
26#ifdef __i386__
27 DEFINE_LONGS(HOST_FP_SIZE, sizeof(struct user_fpregs_struct));
28 DEFINE_LONGS(HOST_FPX_SIZE, sizeof(struct user_fpxregs_struct));
29
30 DEFINE(HOST_IP, EIP);
31 DEFINE(HOST_SP, UESP);
32 DEFINE(HOST_EFLAGS, EFL);
33 DEFINE(HOST_EAX, EAX);
34 DEFINE(HOST_EBX, EBX);
35 DEFINE(HOST_ECX, ECX);
36 DEFINE(HOST_EDX, EDX);
37 DEFINE(HOST_ESI, ESI);
38 DEFINE(HOST_EDI, EDI);
39 DEFINE(HOST_EBP, EBP);
40 DEFINE(HOST_CS, CS);
41 DEFINE(HOST_SS, SS);
42 DEFINE(HOST_DS, DS);
43 DEFINE(HOST_FS, FS);
44 DEFINE(HOST_ES, ES);
45 DEFINE(HOST_GS, GS);
46#else
26 DEFINE(HOST_FP_SIZE, sizeof(struct _fpstate) / sizeof(unsigned long)); 47 DEFINE(HOST_FP_SIZE, sizeof(struct _fpstate) / sizeof(unsigned long));
27 DEFINE_LONGS(HOST_RBX, RBX); 48 DEFINE_LONGS(HOST_RBX, RBX);
28 DEFINE_LONGS(HOST_RCX, RCX); 49 DEFINE_LONGS(HOST_RCX, RCX);
@@ -52,9 +73,9 @@ void foo(void)
52 73
53 DEFINE_LONGS(HOST_IP, RIP); 74 DEFINE_LONGS(HOST_IP, RIP);
54 DEFINE_LONGS(HOST_SP, RSP); 75 DEFINE_LONGS(HOST_SP, RSP);
55 DEFINE(UM_FRAME_SIZE, sizeof(struct user_regs_struct)); 76#endif
56 77
57 /* XXX Duplicated between i386 and x86_64 */ 78 DEFINE(UM_FRAME_SIZE, sizeof(struct user_regs_struct));
58 DEFINE(UM_POLLIN, POLLIN); 79 DEFINE(UM_POLLIN, POLLIN);
59 DEFINE(UM_POLLPRI, POLLPRI); 80 DEFINE(UM_POLLPRI, POLLPRI);
60 DEFINE(UM_POLLOUT, POLLOUT); 81 DEFINE(UM_POLLOUT, POLLOUT);
diff --git a/arch/um/sys-x86_64/vdso/Makefile b/arch/um/sys-x86/vdso/Makefile
index 5dffe6d46686..5dffe6d46686 100644
--- a/arch/um/sys-x86_64/vdso/Makefile
+++ b/arch/um/sys-x86/vdso/Makefile
diff --git a/arch/um/sys-x86_64/vdso/checkundef.sh b/arch/um/sys-x86/vdso/checkundef.sh
index 7ee90a9b549d..7ee90a9b549d 100644
--- a/arch/um/sys-x86_64/vdso/checkundef.sh
+++ b/arch/um/sys-x86/vdso/checkundef.sh
diff --git a/arch/um/sys-x86_64/vdso/um_vdso.c b/arch/um/sys-x86/vdso/um_vdso.c
index 7c441b59d375..7c441b59d375 100644
--- a/arch/um/sys-x86_64/vdso/um_vdso.c
+++ b/arch/um/sys-x86/vdso/um_vdso.c
diff --git a/arch/um/sys-x86_64/vdso/vdso-layout.lds.S b/arch/um/sys-x86/vdso/vdso-layout.lds.S
index 634a2cf62046..634a2cf62046 100644
--- a/arch/um/sys-x86_64/vdso/vdso-layout.lds.S
+++ b/arch/um/sys-x86/vdso/vdso-layout.lds.S
diff --git a/arch/um/sys-x86_64/vdso/vdso-note.S b/arch/um/sys-x86/vdso/vdso-note.S
index 79a071e4357e..79a071e4357e 100644
--- a/arch/um/sys-x86_64/vdso/vdso-note.S
+++ b/arch/um/sys-x86/vdso/vdso-note.S
diff --git a/arch/um/sys-x86_64/vdso/vdso.S b/arch/um/sys-x86/vdso/vdso.S
index ec82c1686bd6..03b053283f86 100644
--- a/arch/um/sys-x86_64/vdso/vdso.S
+++ b/arch/um/sys-x86/vdso/vdso.S
@@ -4,7 +4,7 @@ __INITDATA
4 4
5 .globl vdso_start, vdso_end 5 .globl vdso_start, vdso_end
6vdso_start: 6vdso_start:
7 .incbin "arch/um/sys-x86_64/vdso/vdso.so" 7 .incbin "arch/um/sys-x86/vdso/vdso.so"
8vdso_end: 8vdso_end:
9 9
10__FINIT 10__FINIT
diff --git a/arch/um/sys-x86_64/vdso/vdso.lds.S b/arch/um/sys-x86/vdso/vdso.lds.S
index b96b2677cad8..b96b2677cad8 100644
--- a/arch/um/sys-x86_64/vdso/vdso.lds.S
+++ b/arch/um/sys-x86/vdso/vdso.lds.S
diff --git a/arch/um/sys-x86_64/vdso/vma.c b/arch/um/sys-x86/vdso/vma.c
index 9495c8d0ce37..9495c8d0ce37 100644
--- a/arch/um/sys-x86_64/vdso/vma.c
+++ b/arch/um/sys-x86/vdso/vma.c
diff --git a/arch/um/sys-x86_64/Makefile b/arch/um/sys-x86_64/Makefile
deleted file mode 100644
index 097184660e8a..000000000000
--- a/arch/um/sys-x86_64/Makefile
+++ /dev/null
@@ -1,27 +0,0 @@
1#
2# Copyright 2003 PathScale, Inc.
3#
4# Licensed under the GPL
5#
6
7obj-y = bug.o bugs.o delay.o fault.o ldt.o ptrace.o ptrace_user.o mem.o \
8 setjmp.o signal.o stub.o stub_segv.o syscalls.o syscall_table.o \
9 sysrq.o ksyms.o tls.o
10
11obj-y += vdso/
12
13subarch-obj-y = lib/csum-partial_64.o lib/memcpy_64.o lib/thunk_64.o \
14 lib/rwsem.o
15subarch-obj-$(CONFIG_MODULES) += kernel/module.o
16
17ldt-y = ../sys-i386/ldt.o
18
19USER_OBJS := ptrace_user.o
20
21extra-y += user-offsets.s
22$(obj)/user-offsets.s: c_flags = -Wp,-MD,$(depfile) $(USER_CFLAGS)
23
24UNPROFILE_OBJS := stub_segv.o
25CFLAGS_stub_segv.o := $(CFLAGS_NO_HARDENING)
26
27include arch/um/scripts/Makefile.rules
diff --git a/arch/um/sys-x86_64/fault.c b/arch/um/sys-x86_64/fault.c
deleted file mode 100644
index ce85117fc64e..000000000000
--- a/arch/um/sys-x86_64/fault.c
+++ /dev/null
@@ -1,28 +0,0 @@
1/*
2 * Copyright 2003 PathScale, Inc.
3 *
4 * Licensed under the GPL
5 */
6
7#include "sysdep/ptrace.h"
8
9/* These two are from asm-um/uaccess.h and linux/module.h, check them. */
10struct exception_table_entry
11{
12 unsigned long insn;
13 unsigned long fixup;
14};
15
16const struct exception_table_entry *search_exception_tables(unsigned long add);
17
18int arch_fixup(unsigned long address, struct uml_pt_regs *regs)
19{
20 const struct exception_table_entry *fixup;
21
22 fixup = search_exception_tables(address);
23 if (fixup != 0) {
24 UPT_IP(regs) = fixup->fixup;
25 return 1;
26 }
27 return 0;
28}
diff --git a/arch/um/sys-x86_64/ptrace_user.c b/arch/um/sys-x86_64/ptrace_user.c
deleted file mode 100644
index c57a496d3f5b..000000000000
--- a/arch/um/sys-x86_64/ptrace_user.c
+++ /dev/null
@@ -1,22 +0,0 @@
1/*
2 * Copyright 2003 PathScale, Inc.
3 *
4 * Licensed under the GPL
5 */
6
7#include <errno.h>
8#include "ptrace_user.h"
9
10int ptrace_getregs(long pid, unsigned long *regs_out)
11{
12 if (ptrace(PTRACE_GETREGS, pid, 0, regs_out) < 0)
13 return -errno;
14 return(0);
15}
16
17int ptrace_setregs(long pid, unsigned long *regs_out)
18{
19 if (ptrace(PTRACE_SETREGS, pid, 0, regs_out) < 0)
20 return -errno;
21 return(0);
22}