diff options
-rw-r--r-- | arch/x86/xen/mmu.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c index c140efffe37e..9d74249542c5 100644 --- a/arch/x86/xen/mmu.c +++ b/arch/x86/xen/mmu.c | |||
@@ -1209,29 +1209,29 @@ static void __init xen_pagetable_p2m_copy(void) | |||
1209 | 1209 | ||
1210 | size = PAGE_ALIGN(xen_start_info->nr_pages * sizeof(unsigned long)); | 1210 | size = PAGE_ALIGN(xen_start_info->nr_pages * sizeof(unsigned long)); |
1211 | 1211 | ||
1212 | /* On 32-bit, we get zero so this never gets executed. */ | ||
1213 | new_mfn_list = xen_revector_p2m_tree(); | 1212 | new_mfn_list = xen_revector_p2m_tree(); |
1214 | if (new_mfn_list && new_mfn_list != xen_start_info->mfn_list) { | 1213 | /* No memory or already called. */ |
1215 | /* using __ka address and sticking INVALID_P2M_ENTRY! */ | 1214 | if (!new_mfn_list || new_mfn_list == xen_start_info->mfn_list) |
1216 | memset((void *)xen_start_info->mfn_list, 0xff, size); | ||
1217 | |||
1218 | /* We should be in __ka space. */ | ||
1219 | BUG_ON(xen_start_info->mfn_list < __START_KERNEL_map); | ||
1220 | addr = xen_start_info->mfn_list; | ||
1221 | /* We roundup to the PMD, which means that if anybody at this stage is | ||
1222 | * using the __ka address of xen_start_info or xen_start_info->shared_info | ||
1223 | * they are in going to crash. Fortunatly we have already revectored | ||
1224 | * in xen_setup_kernel_pagetable and in xen_setup_shared_info. */ | ||
1225 | size = roundup(size, PMD_SIZE); | ||
1226 | xen_cleanhighmap(addr, addr + size); | ||
1227 | |||
1228 | size = PAGE_ALIGN(xen_start_info->nr_pages * sizeof(unsigned long)); | ||
1229 | memblock_free(__pa(xen_start_info->mfn_list), size); | ||
1230 | /* And revector! Bye bye old array */ | ||
1231 | xen_start_info->mfn_list = new_mfn_list; | ||
1232 | } else | ||
1233 | return; | 1215 | return; |
1234 | 1216 | ||
1217 | /* using __ka address and sticking INVALID_P2M_ENTRY! */ | ||
1218 | memset((void *)xen_start_info->mfn_list, 0xff, size); | ||
1219 | |||
1220 | /* We should be in __ka space. */ | ||
1221 | BUG_ON(xen_start_info->mfn_list < __START_KERNEL_map); | ||
1222 | addr = xen_start_info->mfn_list; | ||
1223 | /* We roundup to the PMD, which means that if anybody at this stage is | ||
1224 | * using the __ka address of xen_start_info or xen_start_info->shared_info | ||
1225 | * they are in going to crash. Fortunatly we have already revectored | ||
1226 | * in xen_setup_kernel_pagetable and in xen_setup_shared_info. */ | ||
1227 | size = roundup(size, PMD_SIZE); | ||
1228 | xen_cleanhighmap(addr, addr + size); | ||
1229 | |||
1230 | size = PAGE_ALIGN(xen_start_info->nr_pages * sizeof(unsigned long)); | ||
1231 | memblock_free(__pa(xen_start_info->mfn_list), size); | ||
1232 | /* And revector! Bye bye old array */ | ||
1233 | xen_start_info->mfn_list = new_mfn_list; | ||
1234 | |||
1235 | /* At this stage, cleanup_highmap has already cleaned __ka space | 1235 | /* At this stage, cleanup_highmap has already cleaned __ka space |
1236 | * from _brk_limit way up to the max_pfn_mapped (which is the end of | 1236 | * from _brk_limit way up to the max_pfn_mapped (which is the end of |
1237 | * the ramdisk). We continue on, erasing PMD entries that point to page | 1237 | * the ramdisk). We continue on, erasing PMD entries that point to page |