diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-x86/mmu_context_64.h | 5 | ||||
-rw-r--r-- | include/asm-x86/processor.h | 7 | ||||
-rw-r--r-- | include/asm-x86/processor_32.h | 1 |
3 files changed, 7 insertions, 6 deletions
diff --git a/include/asm-x86/mmu_context_64.h b/include/asm-x86/mmu_context_64.h index 98bfe43dd806..7e2aa23fccbf 100644 --- a/include/asm-x86/mmu_context_64.h +++ b/include/asm-x86/mmu_context_64.h | |||
@@ -23,11 +23,6 @@ static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk) | |||
23 | #endif | 23 | #endif |
24 | } | 24 | } |
25 | 25 | ||
26 | static inline void load_cr3(pgd_t *pgd) | ||
27 | { | ||
28 | asm volatile("movq %0,%%cr3" :: "r" (__pa(pgd)) : "memory"); | ||
29 | } | ||
30 | |||
31 | static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, | 26 | static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, |
32 | struct task_struct *tsk) | 27 | struct task_struct *tsk) |
33 | { | 28 | { |
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 @@ | |||
3 | 3 | ||
4 | #include <asm/processor-flags.h> | 4 | #include <asm/processor-flags.h> |
5 | 5 | ||
6 | #include <asm/page.h> | ||
7 | #include <asm/system.h> | ||
8 | |||
6 | static inline void native_cpuid(unsigned int *eax, unsigned int *ebx, | 9 | static inline void native_cpuid(unsigned int *eax, unsigned int *ebx, |
7 | unsigned int *ecx, unsigned int *edx) | 10 | unsigned int *ecx, unsigned int *edx) |
8 | { | 11 | { |
@@ -15,6 +18,10 @@ static inline void native_cpuid(unsigned int *eax, unsigned int *ebx, | |||
15 | : "0" (*eax), "2" (*ecx)); | 18 | : "0" (*eax), "2" (*ecx)); |
16 | } | 19 | } |
17 | 20 | ||
21 | static inline void load_cr3(pgd_t *pgdir) | ||
22 | { | ||
23 | write_cr3(__pa(pgdir)); | ||
24 | } | ||
18 | 25 | ||
19 | #ifdef CONFIG_X86_32 | 26 | #ifdef CONFIG_X86_32 |
20 | # include "processor_32.h" | 27 | # include "processor_32.h" |
diff --git a/include/asm-x86/processor_32.h b/include/asm-x86/processor_32.h index cadeffb54a72..b586902acd85 100644 --- a/include/asm-x86/processor_32.h +++ b/include/asm-x86/processor_32.h | |||
@@ -120,7 +120,6 @@ extern void detect_ht(struct cpuinfo_x86 *c); | |||
120 | static inline void detect_ht(struct cpuinfo_x86 *c) {} | 120 | static inline void detect_ht(struct cpuinfo_x86 *c) {} |
121 | #endif | 121 | #endif |
122 | 122 | ||
123 | #define load_cr3(pgdir) write_cr3(__pa(pgdir)) | ||
124 | 123 | ||
125 | /* | 124 | /* |
126 | * Save the cr4 feature set we're using (ie | 125 | * Save the cr4 feature set we're using (ie |