]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
x86/paravirt: call paravirt_pagetable_setup_{start, done}
authorEduardo Habkost <ehabkost@redhat.com>
Tue, 8 Jul 2008 22:06:23 +0000 (15:06 -0700)
committerIngo Molnar <mingo@elte.hu>
Wed, 16 Jul 2008 08:53:43 +0000 (10:53 +0200)
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>
arch/x86/kernel/paravirt.c
arch/x86/kernel/setup.c
arch/x86/xen/enlighten.c
include/asm-x86/pgtable.h
include/asm-x86/pgtable_32.h

index e0f571d58c19c0bfa4eeee39d89972ed2239f55f..2963ab5d91eec94f7b9748f53e98004ed4d19663 100644 (file)
@@ -29,6 +29,7 @@
 #include <asm/desc.h>
 #include <asm/setup.h>
 #include <asm/arch_hooks.h>
+#include <asm/pgtable.h>
 #include <asm/time.h>
 #include <asm/pgalloc.h>
 #include <asm/irq.h>
@@ -373,6 +374,9 @@ struct pv_mmu_ops pv_mmu_ops = {
 #ifndef CONFIG_X86_64
        .pagetable_setup_start = native_pagetable_setup_start,
        .pagetable_setup_done = native_pagetable_setup_done,
+#else
+       .pagetable_setup_start = paravirt_nop,
+       .pagetable_setup_done = paravirt_nop,
 #endif
 
        .read_cr2 = native_read_cr2,
index 36c540d4ac4b6164dbd02d6b23951ea1315f134f..8ce6a91ce1084ef00e97fe3fd1c2a7ef178f9bbf 100644 (file)
@@ -819,7 +819,9 @@ void __init setup_arch(char **cmdline_p)
        vmi_init();
 #endif
 
+       paravirt_pagetable_setup_start(swapper_pg_dir);
        paging_init();
+       paravirt_pagetable_setup_done(swapper_pg_dir);
 
 #ifdef CONFIG_X86_64
        map_vsyscall();
index bb508456ef523e1fa50f77a2993bf481b06f03f0..eaab6c9b4a843fb0834330c532fa8a16f08780aa 100644 (file)
@@ -841,6 +841,7 @@ static __init void xen_set_pte_init(pte_t *ptep, pte_t pte)
 
 static __init void xen_pagetable_setup_start(pgd_t *base)
 {
+#ifdef CONFIG_X86_32
        pgd_t *xen_pgd = (pgd_t *)xen_start_info->pt_base;
        int i;
 
@@ -886,6 +887,7 @@ static __init void xen_pagetable_setup_start(pgd_t *base)
        /* Unpin initial Xen pagetable */
        pin_pagetable_pfn(MMUEXT_UNPIN_TABLE,
                          PFN_DOWN(__pa(xen_start_info->pt_base)));
+#endif /* CONFIG_X86_32 */
 }
 
 void xen_setup_shared_info(void)
@@ -927,9 +929,11 @@ static __init void xen_pagetable_setup_done(pgd_t *base)
 
        xen_setup_shared_info();
 
+#ifdef CONFIG_X86_32
        /* Actually pin the pagetable down, but we can't set PG_pinned
           yet because the page structures don't exist yet. */
        pin_pagetable_pfn(MMUEXT_PIN_L3_TABLE, PFN_DOWN(__pa(base)));
+#endif
 }
 
 static __init void xen_post_allocator_init(void)
index 49cbd76b9547ed3d0bf3075f4f6980a0143858c7..96aa76e691d8f4d0e1611b295e3d8db56633101c 100644 (file)
@@ -302,6 +302,14 @@ int phys_mem_access_prot_allowed(struct file *file, unsigned long pfn,
 /* Install a pte for a particular vaddr in kernel space. */
 void set_pte_vaddr(unsigned long vaddr, pte_t pte);
 
+#ifdef CONFIG_X86_32
+extern void native_pagetable_setup_start(pgd_t *base);
+extern void native_pagetable_setup_done(pgd_t *base);
+#else
+static inline void native_pagetable_setup_start(pgd_t *base) {}
+static inline void native_pagetable_setup_done(pgd_t *base) {}
+#endif
+
 #ifdef CONFIG_PARAVIRT
 #include <asm/paravirt.h>
 #else  /* !CONFIG_PARAVIRT */
@@ -333,6 +341,16 @@ void set_pte_vaddr(unsigned long vaddr, pte_t pte);
 
 #define pte_update(mm, addr, ptep)              do { } while (0)
 #define pte_update_defer(mm, addr, ptep)        do { } while (0)
+
+static inline void __init paravirt_pagetable_setup_start(pgd_t *base)
+{
+       native_pagetable_setup_start(base);
+}
+
+static inline void __init paravirt_pagetable_setup_done(pgd_t *base)
+{
+       native_pagetable_setup_done(base);
+}
 #endif /* CONFIG_PARAVIRT */
 
 #endif /* __ASSEMBLY__ */
index ec871c420d7e5c511a41c098c3ffb9895de25a20..0611abf96a5e397be364f10814340c48c821fb2d 100644 (file)
@@ -171,21 +171,6 @@ do {                                               \
  */
 #define update_mmu_cache(vma, address, pte) do { } while (0)
 
-extern void native_pagetable_setup_start(pgd_t *base);
-extern void native_pagetable_setup_done(pgd_t *base);
-
-#ifndef CONFIG_PARAVIRT
-static inline void __init paravirt_pagetable_setup_start(pgd_t *base)
-{
-       native_pagetable_setup_start(base);
-}
-
-static inline void __init paravirt_pagetable_setup_done(pgd_t *base)
-{
-       native_pagetable_setup_done(base);
-}
-#endif /* !CONFIG_PARAVIRT */
-
 #endif /* !__ASSEMBLY__ */
 
 /*