diff options
author | Eduardo Habkost <ehabkost@redhat.com> | 2008-07-08 18:06:23 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-16 04:53:43 -0400 |
commit | a312b37b2a212fd2e227d1d6321f903b91b65ec7 (patch) | |
tree | 4861cb8b2985ef5a05705f001a68cd1c23bf1789 | |
parent | 45158894d4d6704afbb4cefe55e5f6ca279fe12a (diff) |
x86/paravirt: call paravirt_pagetable_setup_{start, done}
Call paravirt_pagetable_setup_{start,done}
These paravirt_ops functions were not being called on x86_64.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Cc: Stephen Tweedie <sct@redhat.com>
Cc: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r-- | arch/x86/kernel/paravirt.c | 4 | ||||
-rw-r--r-- | arch/x86/kernel/setup.c | 2 | ||||
-rw-r--r-- | arch/x86/xen/enlighten.c | 4 | ||||
-rw-r--r-- | include/asm-x86/pgtable.h | 18 | ||||
-rw-r--r-- | include/asm-x86/pgtable_32.h | 15 |
5 files changed, 28 insertions, 15 deletions
diff --git a/arch/x86/kernel/paravirt.c b/arch/x86/kernel/paravirt.c index e0f571d58c19..2963ab5d91ee 100644 --- a/arch/x86/kernel/paravirt.c +++ b/arch/x86/kernel/paravirt.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <asm/desc.h> | 29 | #include <asm/desc.h> |
30 | #include <asm/setup.h> | 30 | #include <asm/setup.h> |
31 | #include <asm/arch_hooks.h> | 31 | #include <asm/arch_hooks.h> |
32 | #include <asm/pgtable.h> | ||
32 | #include <asm/time.h> | 33 | #include <asm/time.h> |
33 | #include <asm/pgalloc.h> | 34 | #include <asm/pgalloc.h> |
34 | #include <asm/irq.h> | 35 | #include <asm/irq.h> |
@@ -373,6 +374,9 @@ struct pv_mmu_ops pv_mmu_ops = { | |||
373 | #ifndef CONFIG_X86_64 | 374 | #ifndef CONFIG_X86_64 |
374 | .pagetable_setup_start = native_pagetable_setup_start, | 375 | .pagetable_setup_start = native_pagetable_setup_start, |
375 | .pagetable_setup_done = native_pagetable_setup_done, | 376 | .pagetable_setup_done = native_pagetable_setup_done, |
377 | #else | ||
378 | .pagetable_setup_start = paravirt_nop, | ||
379 | .pagetable_setup_done = paravirt_nop, | ||
376 | #endif | 380 | #endif |
377 | 381 | ||
378 | .read_cr2 = native_read_cr2, | 382 | .read_cr2 = native_read_cr2, |
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index 36c540d4ac4b..8ce6a91ce108 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c | |||
@@ -819,7 +819,9 @@ void __init setup_arch(char **cmdline_p) | |||
819 | vmi_init(); | 819 | vmi_init(); |
820 | #endif | 820 | #endif |
821 | 821 | ||
822 | paravirt_pagetable_setup_start(swapper_pg_dir); | ||
822 | paging_init(); | 823 | paging_init(); |
824 | paravirt_pagetable_setup_done(swapper_pg_dir); | ||
823 | 825 | ||
824 | #ifdef CONFIG_X86_64 | 826 | #ifdef CONFIG_X86_64 |
825 | map_vsyscall(); | 827 | map_vsyscall(); |
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c index bb508456ef52..eaab6c9b4a84 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c | |||
@@ -841,6 +841,7 @@ static __init void xen_set_pte_init(pte_t *ptep, pte_t pte) | |||
841 | 841 | ||
842 | static __init void xen_pagetable_setup_start(pgd_t *base) | 842 | static __init void xen_pagetable_setup_start(pgd_t *base) |
843 | { | 843 | { |
844 | #ifdef CONFIG_X86_32 | ||
844 | pgd_t *xen_pgd = (pgd_t *)xen_start_info->pt_base; | 845 | pgd_t *xen_pgd = (pgd_t *)xen_start_info->pt_base; |
845 | int i; | 846 | int i; |
846 | 847 | ||
@@ -886,6 +887,7 @@ static __init void xen_pagetable_setup_start(pgd_t *base) | |||
886 | /* Unpin initial Xen pagetable */ | 887 | /* Unpin initial Xen pagetable */ |
887 | pin_pagetable_pfn(MMUEXT_UNPIN_TABLE, | 888 | pin_pagetable_pfn(MMUEXT_UNPIN_TABLE, |
888 | PFN_DOWN(__pa(xen_start_info->pt_base))); | 889 | PFN_DOWN(__pa(xen_start_info->pt_base))); |
890 | #endif /* CONFIG_X86_32 */ | ||
889 | } | 891 | } |
890 | 892 | ||
891 | void xen_setup_shared_info(void) | 893 | void xen_setup_shared_info(void) |
@@ -927,9 +929,11 @@ static __init void xen_pagetable_setup_done(pgd_t *base) | |||
927 | 929 | ||
928 | xen_setup_shared_info(); | 930 | xen_setup_shared_info(); |
929 | 931 | ||
932 | #ifdef CONFIG_X86_32 | ||
930 | /* Actually pin the pagetable down, but we can't set PG_pinned | 933 | /* Actually pin the pagetable down, but we can't set PG_pinned |
931 | yet because the page structures don't exist yet. */ | 934 | yet because the page structures don't exist yet. */ |
932 | pin_pagetable_pfn(MMUEXT_PIN_L3_TABLE, PFN_DOWN(__pa(base))); | 935 | pin_pagetable_pfn(MMUEXT_PIN_L3_TABLE, PFN_DOWN(__pa(base))); |
936 | #endif | ||
933 | } | 937 | } |
934 | 938 | ||
935 | static __init void xen_post_allocator_init(void) | 939 | static __init void xen_post_allocator_init(void) |
diff --git a/include/asm-x86/pgtable.h b/include/asm-x86/pgtable.h index 49cbd76b9547..96aa76e691d8 100644 --- a/include/asm-x86/pgtable.h +++ b/include/asm-x86/pgtable.h | |||
@@ -302,6 +302,14 @@ int phys_mem_access_prot_allowed(struct file *file, unsigned long pfn, | |||
302 | /* Install a pte for a particular vaddr in kernel space. */ | 302 | /* Install a pte for a particular vaddr in kernel space. */ |
303 | void set_pte_vaddr(unsigned long vaddr, pte_t pte); | 303 | void set_pte_vaddr(unsigned long vaddr, pte_t pte); |
304 | 304 | ||
305 | #ifdef CONFIG_X86_32 | ||
306 | extern void native_pagetable_setup_start(pgd_t *base); | ||
307 | extern void native_pagetable_setup_done(pgd_t *base); | ||
308 | #else | ||
309 | static inline void native_pagetable_setup_start(pgd_t *base) {} | ||
310 | static inline void native_pagetable_setup_done(pgd_t *base) {} | ||
311 | #endif | ||
312 | |||
305 | #ifdef CONFIG_PARAVIRT | 313 | #ifdef CONFIG_PARAVIRT |
306 | #include <asm/paravirt.h> | 314 | #include <asm/paravirt.h> |
307 | #else /* !CONFIG_PARAVIRT */ | 315 | #else /* !CONFIG_PARAVIRT */ |
@@ -333,6 +341,16 @@ void set_pte_vaddr(unsigned long vaddr, pte_t pte); | |||
333 | 341 | ||
334 | #define pte_update(mm, addr, ptep) do { } while (0) | 342 | #define pte_update(mm, addr, ptep) do { } while (0) |
335 | #define pte_update_defer(mm, addr, ptep) do { } while (0) | 343 | #define pte_update_defer(mm, addr, ptep) do { } while (0) |
344 | |||
345 | static inline void __init paravirt_pagetable_setup_start(pgd_t *base) | ||
346 | { | ||
347 | native_pagetable_setup_start(base); | ||
348 | } | ||
349 | |||
350 | static inline void __init paravirt_pagetable_setup_done(pgd_t *base) | ||
351 | { | ||
352 | native_pagetable_setup_done(base); | ||
353 | } | ||
336 | #endif /* CONFIG_PARAVIRT */ | 354 | #endif /* CONFIG_PARAVIRT */ |
337 | 355 | ||
338 | #endif /* __ASSEMBLY__ */ | 356 | #endif /* __ASSEMBLY__ */ |
diff --git a/include/asm-x86/pgtable_32.h b/include/asm-x86/pgtable_32.h index ec871c420d7e..0611abf96a5e 100644 --- a/include/asm-x86/pgtable_32.h +++ b/include/asm-x86/pgtable_32.h | |||
@@ -171,21 +171,6 @@ do { \ | |||
171 | */ | 171 | */ |
172 | #define update_mmu_cache(vma, address, pte) do { } while (0) | 172 | #define update_mmu_cache(vma, address, pte) do { } while (0) |
173 | 173 | ||
174 | extern void native_pagetable_setup_start(pgd_t *base); | ||
175 | extern void native_pagetable_setup_done(pgd_t *base); | ||
176 | |||
177 | #ifndef CONFIG_PARAVIRT | ||
178 | static inline void __init paravirt_pagetable_setup_start(pgd_t *base) | ||
179 | { | ||
180 | native_pagetable_setup_start(base); | ||
181 | } | ||
182 | |||
183 | static inline void __init paravirt_pagetable_setup_done(pgd_t *base) | ||
184 | { | ||
185 | native_pagetable_setup_done(base); | ||
186 | } | ||
187 | #endif /* !CONFIG_PARAVIRT */ | ||
188 | |||
189 | #endif /* !__ASSEMBLY__ */ | 174 | #endif /* !__ASSEMBLY__ */ |
190 | 175 | ||
191 | /* | 176 | /* |