ia64/xen-unstable

changeset 11352:dc883b5e906e

[LINUX][X86_64] P2M map must be allocated on page aligned boundary.
Otherwise save/restore can break.
Signed-off-by: Kazuo Moriwaka <moriwaka@valinux.co.jp>
author kaf24@firebug.cl.cam.ac.uk
date Wed Aug 30 17:56:49 2006 +0100 (2006-08-30)
parents a202eef97aa0
children 926d7b131689
files linux-2.6-xen-sparse/arch/x86_64/kernel/setup-xen.c
line diff
     1.1 --- a/linux-2.6-xen-sparse/arch/x86_64/kernel/setup-xen.c	Wed Aug 30 17:52:35 2006 +0100
     1.2 +++ b/linux-2.6-xen-sparse/arch/x86_64/kernel/setup-xen.c	Wed Aug 30 17:56:49 2006 +0100
     1.3 @@ -846,7 +846,7 @@ void __init setup_arch(char **cmdline_p)
     1.4  
     1.5  		if (!xen_feature(XENFEAT_auto_translated_physmap)) {
     1.6  			/* Make sure we have a large enough P->M table. */
     1.7 -			phys_to_machine_mapping = alloc_bootmem(
     1.8 +			phys_to_machine_mapping = alloc_bootmem_pages(
     1.9  				end_pfn * sizeof(unsigned long));
    1.10  			memset(phys_to_machine_mapping, ~0,
    1.11  			       end_pfn * sizeof(unsigned long));
    1.12 @@ -863,7 +863,7 @@ void __init setup_arch(char **cmdline_p)
    1.13  			 * list of frames that make up the p2m table. Used by
    1.14                           * save/restore.
    1.15  			 */
    1.16 -			pfn_to_mfn_frame_list_list = alloc_bootmem(PAGE_SIZE);
    1.17 +			pfn_to_mfn_frame_list_list = alloc_bootmem_pages(PAGE_SIZE);
    1.18  			HYPERVISOR_shared_info->arch.pfn_to_mfn_frame_list_list =
    1.19  				virt_to_mfn(pfn_to_mfn_frame_list_list);
    1.20  
    1.21 @@ -873,7 +873,7 @@ void __init setup_arch(char **cmdline_p)
    1.22  					k++;
    1.23  					BUG_ON(k>=fpp);
    1.24  					pfn_to_mfn_frame_list[k] =
    1.25 -						alloc_bootmem(PAGE_SIZE);
    1.26 +						alloc_bootmem_pages(PAGE_SIZE);
    1.27  					pfn_to_mfn_frame_list_list[k] =
    1.28  						virt_to_mfn(pfn_to_mfn_frame_list[k]);
    1.29  					j=0;