summaryrefslogtreecommitdiffstats
path: root/arch/x86/um/shared/sysdep/kernel-offsets.h
diff options
context:
space:
mode:
authorAl Viro <viro@ftp.linux.org.uk>2011-08-18 20:06:39 +0100
committerRichard Weinberger <richard@nod.at>2011-11-02 14:15:05 +0100
commit5c48b108ecbf6505d929e64d50dace13ac2bdf34 (patch)
tree016904f84fbe05aa301c5cdfe712d90f6bb828fe /arch/x86/um/shared/sysdep/kernel-offsets.h
parent7bbe7204e93734fe79d8aac3e08a7cb4624b5004 (diff)
downloadtalos-obmc-linux-5c48b108ecbf6505d929e64d50dace13ac2bdf34.tar.gz
talos-obmc-linux-5c48b108ecbf6505d929e64d50dace13ac2bdf34.zip
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>
Diffstat (limited to 'arch/x86/um/shared/sysdep/kernel-offsets.h')
-rw-r--r--arch/x86/um/shared/sysdep/kernel-offsets.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/arch/x86/um/shared/sysdep/kernel-offsets.h b/arch/x86/um/shared/sysdep/kernel-offsets.h
new file mode 100644
index 000000000000..5868526b5eef
--- /dev/null
+++ b/arch/x86/um/shared/sysdep/kernel-offsets.h
@@ -0,0 +1,21 @@
+#include <linux/stddef.h>
+#include <linux/sched.h>
+#include <linux/elf.h>
+#include <linux/crypto.h>
+#include <asm/mman.h>
+
+#define DEFINE(sym, val) \
+ asm volatile("\n->" #sym " %0 " #val : : "i" (val))
+
+#define STR(x) #x
+#define DEFINE_STR(sym, val) asm volatile("\n->" #sym " " STR(val) " " #val: : )
+
+#define BLANK() asm volatile("\n->" : : )
+
+#define OFFSET(sym, str, mem) \
+ DEFINE(sym, offsetof(struct str, mem));
+
+void foo(void)
+{
+#include <common-offsets.h>
+}
OpenPOWER on IntegriCloud