diff options
author | Brian Gerst <brgerst@gmail.com> | 2009-01-19 00:38:58 +0900 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2009-01-19 00:38:58 +0900 |
commit | c6f5e0acd5d12ee23f701f15889872e67b47caa6 (patch) | |
tree | a4613618f06d7519f954745b893b4f572ecd39d9 /arch/x86/include/asm/current.h | |
parent | ea9279066de44053d0c20ea855bc9f4706652d84 (diff) | |
download | blackbird-op-linux-c6f5e0acd5d12ee23f701f15889872e67b47caa6.tar.gz blackbird-op-linux-c6f5e0acd5d12ee23f701f15889872e67b47caa6.zip |
x86-64: Move current task from PDA to per-cpu and consolidate with 32-bit.
Signed-off-by: Brian Gerst <brgerst@gmail.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'arch/x86/include/asm/current.h')
-rw-r--r-- | arch/x86/include/asm/current.h | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/arch/x86/include/asm/current.h b/arch/x86/include/asm/current.h index 0728480f5c56..c68c361697e1 100644 --- a/arch/x86/include/asm/current.h +++ b/arch/x86/include/asm/current.h @@ -1,39 +1,21 @@ #ifndef _ASM_X86_CURRENT_H #define _ASM_X86_CURRENT_H -#ifdef CONFIG_X86_32 #include <linux/compiler.h> #include <asm/percpu.h> +#ifndef __ASSEMBLY__ struct task_struct; DECLARE_PER_CPU(struct task_struct *, current_task); -static __always_inline struct task_struct *get_current(void) -{ - return percpu_read(current_task); -} - -#else /* X86_32 */ - -#ifndef __ASSEMBLY__ -#include <asm/pda.h> - -struct task_struct; static __always_inline struct task_struct *get_current(void) { - return read_pda(pcurrent); + return percpu_read(current_task); } -#else /* __ASSEMBLY__ */ - -#include <asm/asm-offsets.h> -#define GET_CURRENT(reg) movq %gs:(pda_pcurrent),reg +#define current get_current() #endif /* __ASSEMBLY__ */ -#endif /* X86_32 */ - -#define current get_current() - #endif /* _ASM_X86_CURRENT_H */ |