diff options
author | Glauber de Oliveira Costa <gcosta@redhat.com> | 2008-01-30 13:31:27 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-01-30 13:31:27 +0100 |
commit | c72dcf83ff8585c95739abffa3be7c87ca63d66b (patch) | |
tree | 7bf10bb9f3f25d3ad4cb7d4772bbc66b122500de /include/asm-x86/processor.h | |
parent | 746ff60f2627626fca0d8ddbf6b1f04d505782f4 (diff) | |
download | blackbird-op-linux-c72dcf83ff8585c95739abffa3be7c87ca63d66b.tar.gz blackbird-op-linux-c72dcf83ff8585c95739abffa3be7c87ca63d66b.zip |
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 <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/asm-x86/processor.h')
-rw-r--r-- | include/asm-x86/processor.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/asm-x86/processor.h b/include/asm-x86/processor.h index e8dd394c9f46..36ee9881b74f 100644 --- a/include/asm-x86/processor.h +++ b/include/asm-x86/processor.h @@ -3,6 +3,9 @@ #include <asm/processor-flags.h> +#include <asm/page.h> +#include <asm/system.h> + 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" |