Skip to content

Commit

Permalink
x86: move desc_empty to where they belong
Browse files Browse the repository at this point in the history
This patch moves the (duplicated) desc_empty implementation to desc.h,
where the descriptor things belong.

Signed-off-by: Glauber de Oliveira Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
  • Loading branch information
Glauber de Oliveira Costa authored and Ingo Molnar committed Jan 30, 2008
1 parent 053de04 commit 746ff60
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 12 deletions.
6 changes: 6 additions & 0 deletions include/asm-x86/desc.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ static inline void pack_gate(gate_desc *gate, unsigned char type,

#endif

static inline int desc_empty(const void *ptr)
{
const u32 *desc = ptr;
return !(desc[0] | desc[1]);
}

#ifdef CONFIG_PARAVIRT
#include <asm/paravirt.h>
#else
Expand Down
6 changes: 0 additions & 6 deletions include/asm-x86/processor_32.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,6 @@
#include <linux/init.h>
#include <asm/desc_defs.h>

static inline int desc_empty(const void *ptr)
{
const u32 *desc = ptr;
return !(desc[0] | desc[1]);
}

/*
* Default implementation of macro that returns current
* instruction pointer ("program counter").
Expand Down
6 changes: 0 additions & 6 deletions include/asm-x86/processor_64.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,6 @@
#include <linux/cpumask.h>
#include <asm/desc_defs.h>

static inline int desc_empty(const void *ptr)
{
const u32 *desc = ptr;
return !(desc[0] | desc[1]);
}

/*
* Default implementation of macro that returns current
* instruction pointer ("program counter").
Expand Down

0 comments on commit 746ff60

Please sign in to comment.