diff options
author | Jeremy Fitzhardinge <jeremy@goop.org> | 2008-11-06 16:48:24 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-11-06 17:20:47 -0500 |
commit | 47cb2ed9df2789fc4a3fe1201e475078f93c4839 (patch) | |
tree | 5d2bc2cdc63496d8b073eeea09d939b900129a46 /arch | |
parent | 8d00450d296dedec9ada38d43b83e79cca6fd5a3 (diff) |
x86, xen: fix use of pgd_page now that it really does return a page
Impact: fix 32-bit Xen guest boot crash
On 32-bit PAE, pud_page, for no good reason, didn't really return a
struct page *. Since Jan Beulich's fix "i386/PAE: fix pud_page()",
pud_page does return a struct page *.
Because PAE has 3 pagetable levels, the pud level is folded into the
pgd level, so pgd_page() is the same as pud_page(), and now returns
a struct page *. Update the xen/mmu.c code which uses pgd_page()
accordingly.
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/xen/mmu.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c index aba77b2b7d18..49697d86c6a5 100644 --- a/arch/x86/xen/mmu.c +++ b/arch/x86/xen/mmu.c | |||
@@ -874,7 +874,7 @@ static void __xen_pgd_pin(struct mm_struct *mm, pgd_t *pgd) | |||
874 | #else /* CONFIG_X86_32 */ | 874 | #else /* CONFIG_X86_32 */ |
875 | #ifdef CONFIG_X86_PAE | 875 | #ifdef CONFIG_X86_PAE |
876 | /* Need to make sure unshared kernel PMD is pinnable */ | 876 | /* Need to make sure unshared kernel PMD is pinnable */ |
877 | xen_pin_page(mm, virt_to_page(pgd_page(pgd[pgd_index(TASK_SIZE)])), | 877 | xen_pin_page(mm, pgd_page(pgd[pgd_index(TASK_SIZE)]), |
878 | PT_PMD); | 878 | PT_PMD); |
879 | #endif | 879 | #endif |
880 | xen_do_pin(MMUEXT_PIN_L3_TABLE, PFN_DOWN(__pa(pgd))); | 880 | xen_do_pin(MMUEXT_PIN_L3_TABLE, PFN_DOWN(__pa(pgd))); |
@@ -991,7 +991,7 @@ static void __xen_pgd_unpin(struct mm_struct *mm, pgd_t *pgd) | |||
991 | 991 | ||
992 | #ifdef CONFIG_X86_PAE | 992 | #ifdef CONFIG_X86_PAE |
993 | /* Need to make sure unshared kernel PMD is unpinned */ | 993 | /* Need to make sure unshared kernel PMD is unpinned */ |
994 | xen_unpin_page(mm, virt_to_page(pgd_page(pgd[pgd_index(TASK_SIZE)])), | 994 | xen_unpin_page(mm, pgd_page(pgd[pgd_index(TASK_SIZE)]), |
995 | PT_PMD); | 995 | PT_PMD); |
996 | #endif | 996 | #endif |
997 | 997 | ||