Commit 12c3cbbb authored by Roland McGrath's avatar Roland McGrath Committed by Ingo Molnar

x86: desc_empty

This replaces the desc_empty macro with an inline.  It now handles
easily any of the four different types used between 32/64 code to
refer to these 8 bytes.  It's identical in both asm-x86/processor_64.h
and asm-x86/processor_32.h, so if these files ever get merged this
function can be in the common code.

This also removes the desc_equal macro because nothing uses it.
Signed-off-by: default avatarRoland McGrath <roland@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent df5d438e
...@@ -28,11 +28,12 @@ struct desc_struct { ...@@ -28,11 +28,12 @@ struct desc_struct {
unsigned long a,b; unsigned long a,b;
}; };
#define desc_empty(desc) \ static inline int desc_empty(const void *ptr)
(!((desc)->a | (desc)->b)) {
const u32 *desc = ptr;
return !(desc[0] | desc[1]);
}
#define desc_equal(desc1, desc2) \
(((desc1)->a == (desc2)->a) && ((desc1)->b == (desc2)->b))
/* /*
* Default implementation of macro that returns current * Default implementation of macro that returns current
* instruction pointer ("program counter"). * instruction pointer ("program counter").
......
...@@ -30,11 +30,11 @@ ...@@ -30,11 +30,11 @@
#define VIP_MASK 0x00100000 /* virtual interrupt pending */ #define VIP_MASK 0x00100000 /* virtual interrupt pending */
#define ID_MASK 0x00200000 #define ID_MASK 0x00200000
#define desc_empty(desc) \ static inline int desc_empty(const void *ptr)
(!((desc)->a | (desc)->b)) {
const u32 *desc = ptr;
#define desc_equal(desc1, desc2) \ return !(desc[0] | desc[1]);
(((desc1)->a == (desc2)->a) && ((desc1)->b == (desc2)->b)) }
/* /*
* Default implementation of macro that returns current * Default implementation of macro that returns current
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment