diff options
author | Al Viro <viro@ftp.linux.org.uk> | 2011-08-18 15:05:59 -0400 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2011-11-02 09:15:02 -0400 |
commit | 709585063f3d3da68f29b3d706fddb74de5e33f4 (patch) | |
tree | 6be9a61f26b4c79b85fd61c31959aa1a47dd4d84 /arch/um | |
parent | c75361bddb21761cabddde95dcae2059b021ea5d (diff) |
um: merge kernel_offsets_*.h
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'arch/um')
-rw-r--r-- | arch/um/sys-x86/shared/sysdep/kernel-offsets.h | 26 | ||||
-rw-r--r-- | arch/um/sys-x86/shared/sysdep/kernel-offsets_32.h | 21 | ||||
-rw-r--r-- | arch/um/sys-x86/shared/sysdep/kernel-offsets_64.h | 23 |
3 files changed, 21 insertions, 49 deletions
diff --git a/arch/um/sys-x86/shared/sysdep/kernel-offsets.h b/arch/um/sys-x86/shared/sysdep/kernel-offsets.h index 346bc086fb91..5868526b5eef 100644 --- a/arch/um/sys-x86/shared/sysdep/kernel-offsets.h +++ b/arch/um/sys-x86/shared/sysdep/kernel-offsets.h | |||
@@ -1,5 +1,21 @@ | |||
1 | #ifdef __i386__ | 1 | #include <linux/stddef.h> |
2 | #include "kernel-offsets_32.h" | 2 | #include <linux/sched.h> |
3 | #else | 3 | #include <linux/elf.h> |
4 | #include "kernel-offsets_64.h" | 4 | #include <linux/crypto.h> |
5 | #endif | 5 | #include <asm/mman.h> |
6 | |||
7 | #define DEFINE(sym, val) \ | ||
8 | asm volatile("\n->" #sym " %0 " #val : : "i" (val)) | ||
9 | |||
10 | #define STR(x) #x | ||
11 | #define DEFINE_STR(sym, val) asm volatile("\n->" #sym " " STR(val) " " #val: : ) | ||
12 | |||
13 | #define BLANK() asm volatile("\n->" : : ) | ||
14 | |||
15 | #define OFFSET(sym, str, mem) \ | ||
16 | DEFINE(sym, offsetof(struct str, mem)); | ||
17 | |||
18 | void foo(void) | ||
19 | { | ||
20 | #include <common-offsets.h> | ||
21 | } | ||
diff --git a/arch/um/sys-x86/shared/sysdep/kernel-offsets_32.h b/arch/um/sys-x86/shared/sysdep/kernel-offsets_32.h deleted file mode 100644 index 5868526b5eef..000000000000 --- a/arch/um/sys-x86/shared/sysdep/kernel-offsets_32.h +++ /dev/null | |||
@@ -1,21 +0,0 @@ | |||
1 | #include <linux/stddef.h> | ||
2 | #include <linux/sched.h> | ||
3 | #include <linux/elf.h> | ||
4 | #include <linux/crypto.h> | ||
5 | #include <asm/mman.h> | ||
6 | |||
7 | #define DEFINE(sym, val) \ | ||
8 | asm volatile("\n->" #sym " %0 " #val : : "i" (val)) | ||
9 | |||
10 | #define STR(x) #x | ||
11 | #define DEFINE_STR(sym, val) asm volatile("\n->" #sym " " STR(val) " " #val: : ) | ||
12 | |||
13 | #define BLANK() asm volatile("\n->" : : ) | ||
14 | |||
15 | #define OFFSET(sym, str, mem) \ | ||
16 | DEFINE(sym, offsetof(struct str, mem)); | ||
17 | |||
18 | void foo(void) | ||
19 | { | ||
20 | #include <common-offsets.h> | ||
21 | } | ||
diff --git a/arch/um/sys-x86/shared/sysdep/kernel-offsets_64.h b/arch/um/sys-x86/shared/sysdep/kernel-offsets_64.h deleted file mode 100644 index a307237b7964..000000000000 --- a/arch/um/sys-x86/shared/sysdep/kernel-offsets_64.h +++ /dev/null | |||
@@ -1,23 +0,0 @@ | |||
1 | #include <linux/stddef.h> | ||
2 | #include <linux/sched.h> | ||
3 | #include <linux/time.h> | ||
4 | #include <linux/elf.h> | ||
5 | #include <linux/crypto.h> | ||
6 | #include <asm/page.h> | ||
7 | #include <asm/mman.h> | ||
8 | |||
9 | #define DEFINE(sym, val) \ | ||
10 | asm volatile("\n->" #sym " %0 " #val : : "i" (val)) | ||
11 | |||
12 | #define DEFINE_STR1(x) #x | ||
13 | #define DEFINE_STR(sym, val) asm volatile("\n->" #sym " " DEFINE_STR1(val) " " #val: : ) | ||
14 | |||
15 | #define BLANK() asm volatile("\n->" : : ) | ||
16 | |||
17 | #define OFFSET(sym, str, mem) \ | ||
18 | DEFINE(sym, offsetof(struct str, mem)); | ||
19 | |||
20 | void foo(void) | ||
21 | { | ||
22 | #include <common-offsets.h> | ||
23 | } | ||