From: Al Viro Date: Thu, 18 Aug 2011 19:05:59 +0000 (+0100) Subject: um: merge kernel_offsets_*.h X-Git-Tag: v3.2-rc1~87^2~54 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=709585063f3d3da68f29b3d706fddb74de5e33f4;p=profile%2Fivi%2Fkernel-x86-ivi.git um: merge kernel_offsets_*.h Signed-off-by: Al Viro Signed-off-by: Richard Weinberger --- diff --git a/arch/um/sys-x86/shared/sysdep/kernel-offsets.h b/arch/um/sys-x86/shared/sysdep/kernel-offsets.h index 346bc08..5868526 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 @@ -#ifdef __i386__ -#include "kernel-offsets_32.h" -#else -#include "kernel-offsets_64.h" -#endif +#include +#include +#include +#include +#include + +#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 +} 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 5868526..0000000 --- a/arch/um/sys-x86/shared/sysdep/kernel-offsets_32.h +++ /dev/null @@ -1,21 +0,0 @@ -#include -#include -#include -#include -#include - -#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 -} 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 a307237..0000000 --- a/arch/um/sys-x86/shared/sysdep/kernel-offsets_64.h +++ /dev/null @@ -1,23 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include - -#define DEFINE(sym, val) \ - asm volatile("\n->" #sym " %0 " #val : : "i" (val)) - -#define DEFINE_STR1(x) #x -#define DEFINE_STR(sym, val) asm volatile("\n->" #sym " " DEFINE_STR1(val) " " #val: : ) - -#define BLANK() asm volatile("\n->" : : ) - -#define OFFSET(sym, str, mem) \ - DEFINE(sym, offsetof(struct str, mem)); - -void foo(void) -{ -#include -}