summaryrefslogtreecommitdiff
path: root/arch/um/sys-x86_64/user-offsets.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-11-02 09:45:39 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2011-11-02 09:45:39 -0700
commitde0a5345a55b8dd5a4695181275df0e691176830 (patch)
tree17530e824f7f46ce0b1757657179fb5957a6add5 /arch/um/sys-x86_64/user-offsets.c
parent994c0e992522c123298b4a91b72f5e67ba2d1123 (diff)
parent8535639810e578960233ad39def3ac2157b0c3ec (diff)
Merge branch 'for-linus' of git://github.com/richardweinberger/linux
* 'for-linus' of git://github.com/richardweinberger/linux: (90 commits) um: fix ubd cow size um: Fix kmalloc argument order in um/vdso/vma.c um: switch to use of drivers/Kconfig UserModeLinux-HOWTO.txt: fix a typo UserModeLinux-HOWTO.txt: remove ^H characters um: we need sys/user.h only on i386 um: merge delay_{32,64}.c um: distribute exports to where exported stuff is defined um: kill system-um.h um: generic ftrace.h will do... um: segment.h is x86-only and needed only there um: asm/pda.h is not needed anymore um: hw_irq.h can go generic as well um: switch to generic-y um: clean Kconfig up a bit um: a couple of missing dependencies... um: kill useless argument of free_chan() and free_one_chan() um: unify ptrace_user.h um: unify KSTK_... um: fix gcov build breakage ...
Diffstat (limited to 'arch/um/sys-x86_64/user-offsets.c')
-rw-r--r--arch/um/sys-x86_64/user-offsets.c65
1 files changed, 0 insertions, 65 deletions
diff --git a/arch/um/sys-x86_64/user-offsets.c b/arch/um/sys-x86_64/user-offsets.c
deleted file mode 100644
index 973585414a6..00000000000
--- a/arch/um/sys-x86_64/user-offsets.c
+++ /dev/null
@@ -1,65 +0,0 @@
-#include <stdio.h>
-#include <stddef.h>
-#include <signal.h>
-#include <sys/poll.h>
-#include <sys/mman.h>
-#include <sys/user.h>
-#define __FRAME_OFFSETS
-#include <asm/ptrace.h>
-#include <asm/types.h>
-
-#define DEFINE(sym, val) \
- asm volatile("\n->" #sym " %0 " #val : : "i" (val))
-
-#define DEFINE_LONGS(sym, val) \
- asm volatile("\n->" #sym " %0 " #val : : "i" (val/sizeof(unsigned long)))
-
-#define OFFSET(sym, str, mem) \
- DEFINE(sym, offsetof(struct str, mem));
-
-void foo(void)
-{
- OFFSET(HOST_SC_CR2, sigcontext, cr2);
- OFFSET(HOST_SC_ERR, sigcontext, err);
- OFFSET(HOST_SC_TRAPNO, sigcontext, trapno);
-
- DEFINE(HOST_FP_SIZE, sizeof(struct _fpstate) / sizeof(unsigned long));
- DEFINE_LONGS(HOST_RBX, RBX);
- DEFINE_LONGS(HOST_RCX, RCX);
- DEFINE_LONGS(HOST_RDI, RDI);
- DEFINE_LONGS(HOST_RSI, RSI);
- DEFINE_LONGS(HOST_RDX, RDX);
- DEFINE_LONGS(HOST_RBP, RBP);
- DEFINE_LONGS(HOST_RAX, RAX);
- DEFINE_LONGS(HOST_R8, R8);
- DEFINE_LONGS(HOST_R9, R9);
- DEFINE_LONGS(HOST_R10, R10);
- DEFINE_LONGS(HOST_R11, R11);
- DEFINE_LONGS(HOST_R12, R12);
- DEFINE_LONGS(HOST_R13, R13);
- DEFINE_LONGS(HOST_R14, R14);
- DEFINE_LONGS(HOST_R15, R15);
- DEFINE_LONGS(HOST_ORIG_RAX, ORIG_RAX);
- DEFINE_LONGS(HOST_CS, CS);
- DEFINE_LONGS(HOST_SS, SS);
- DEFINE_LONGS(HOST_EFLAGS, EFLAGS);
-#if 0
- DEFINE_LONGS(HOST_FS, FS);
- DEFINE_LONGS(HOST_GS, GS);
- DEFINE_LONGS(HOST_DS, DS);
- DEFINE_LONGS(HOST_ES, ES);
-#endif
-
- DEFINE_LONGS(HOST_IP, RIP);
- DEFINE_LONGS(HOST_SP, RSP);
- DEFINE(UM_FRAME_SIZE, sizeof(struct user_regs_struct));
-
- /* XXX Duplicated between i386 and x86_64 */
- DEFINE(UM_POLLIN, POLLIN);
- DEFINE(UM_POLLPRI, POLLPRI);
- DEFINE(UM_POLLOUT, POLLOUT);
-
- DEFINE(UM_PROT_READ, PROT_READ);
- DEFINE(UM_PROT_WRITE, PROT_WRITE);
- DEFINE(UM_PROT_EXEC, PROT_EXEC);
-}