aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/asm-x86/processor_32.h9
-rw-r--r--include/asm-x86/processor_64.h10
2 files changed, 10 insertions, 9 deletions
diff --git a/include/asm-x86/processor_32.h b/include/asm-x86/processor_32.h
index 3b51a18f16d5..2540bf8d5724 100644
--- a/include/asm-x86/processor_32.h
+++ b/include/asm-x86/processor_32.h
@@ -28,11 +28,12 @@ struct desc_struct {
28 unsigned long a,b; 28 unsigned long a,b;
29}; 29};
30 30
31#define desc_empty(desc) \ 31static inline int desc_empty(const void *ptr)
32 (!((desc)->a | (desc)->b)) 32{
33 const u32 *desc = ptr;
34 return !(desc[0] | desc[1]);
35}
33 36
34#define desc_equal(desc1, desc2) \
35 (((desc1)->a == (desc2)->a) && ((desc1)->b == (desc2)->b))
36/* 37/*
37 * Default implementation of macro that returns current 38 * Default implementation of macro that returns current
38 * instruction pointer ("program counter"). 39 * instruction pointer ("program counter").
diff --git a/include/asm-x86/processor_64.h b/include/asm-x86/processor_64.h
index 2ae8ceb8a74e..20d8935d141a 100644
--- a/include/asm-x86/processor_64.h
+++ b/include/asm-x86/processor_64.h
@@ -30,11 +30,11 @@
30#define VIP_MASK 0x00100000 /* virtual interrupt pending */ 30#define VIP_MASK 0x00100000 /* virtual interrupt pending */
31#define ID_MASK 0x00200000 31#define ID_MASK 0x00200000
32 32
33#define desc_empty(desc) \ 33static inline int desc_empty(const void *ptr)
34 (!((desc)->a | (desc)->b)) 34{
35 35 const u32 *desc = ptr;
36#define desc_equal(desc1, desc2) \ 36 return !(desc[0] | desc[1]);
37 (((desc1)->a == (desc2)->a) && ((desc1)->b == (desc2)->b)) 37}
38 38
39/* 39/*
40 * Default implementation of macro that returns current 40 * Default implementation of macro that returns current