From 709585063f3d3da68f29b3d706fddb74de5e33f4 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Thu, 18 Aug 2011 20:05:59 +0100 Subject: [PATCH] um: merge kernel_offsets_*.h Signed-off-by: Al Viro Signed-off-by: Richard Weinberger --- .../um/sys-x86/shared/sysdep/kernel-offsets.h | 26 +++++++++++++++---- .../sys-x86/shared/sysdep/kernel-offsets_32.h | 21 --------------- .../sys-x86/shared/sysdep/kernel-offsets_64.h | 23 ---------------- 3 files changed, 21 insertions(+), 49 deletions(-) delete mode 100644 arch/um/sys-x86/shared/sysdep/kernel-offsets_32.h delete mode 100644 arch/um/sys-x86/shared/sysdep/kernel-offsets_64.h 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 @@ -#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 5868526b5eef..000000000000 --- 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 a307237b7964..000000000000 --- 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 -} -- 2.20.1