From c72dcf83ff8585c95739abffa3be7c87ca63d66b Mon Sep 17 00:00:00 2001 From: Glauber de Oliveira Costa Date: Wed, 30 Jan 2008 13:31:27 +0100 Subject: x86: move load_cr3 to a common place. There are currently two definitions of load_cr3, that essentially do the same thing. This patch moves them all to processor.h. Signed-off-by: Glauber de Oliveira Costa Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner --- include/asm-x86/processor.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/asm-x86/processor.h') diff --git a/include/asm-x86/processor.h b/include/asm-x86/processor.h index e8dd394c9f4..36ee9881b74 100644 --- a/include/asm-x86/processor.h +++ b/include/asm-x86/processor.h @@ -3,6 +3,9 @@ #include +#include +#include + static inline void native_cpuid(unsigned int *eax, unsigned int *ebx, unsigned int *ecx, unsigned int *edx) { @@ -15,6 +18,10 @@ static inline void native_cpuid(unsigned int *eax, unsigned int *ebx, : "0" (*eax), "2" (*ecx)); } +static inline void load_cr3(pgd_t *pgdir) +{ + write_cr3(__pa(pgdir)); +} #ifdef CONFIG_X86_32 # include "processor_32.h" -- cgit v1.2.3