debuggers.hg

changeset 21029:94535cc63835

x86 numa: Fix post-boot ACPI SLIT accesses.

Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Feb 25 21:03:26 2010 +0000 (2010-02-25)
parents 5db0a9bd6a50
children bb7164fc680a
files xen/arch/x86/srat.c
line diff
     1.1 --- a/xen/arch/x86/srat.c	Thu Feb 25 21:00:54 2010 +0000
     1.2 +++ b/xen/arch/x86/srat.c	Thu Feb 25 21:03:26 2010 +0000
     1.3 @@ -140,11 +140,22 @@ static __init int slit_valid(struct acpi
     1.4  /* Callback for SLIT parsing */
     1.5  void __init acpi_numa_slit_init(struct acpi_table_slit *slit)
     1.6  {
     1.7 +#ifdef CONFIG_X86_64
     1.8 +	unsigned long mfn;
     1.9  	if (!slit_valid(slit)) {
    1.10 -		printk(KERN_INFO "ACPI: SLIT table looks invalid. Not used.\n");
    1.11 +		printk(KERN_INFO "ACPI: SLIT table looks invalid. "
    1.12 +		       "Not used.\n");
    1.13  		return;
    1.14  	}
    1.15 -	acpi_slit = slit;
    1.16 +	mfn = alloc_boot_pages(PFN_UP(slit->header.length), 1);
    1.17 +	if (!mfn) {
    1.18 +		printk(KERN_ERR "ACPI: Unable to allocate memory for "
    1.19 +		       "saving ACPI SLIT numa information.\n");
    1.20 +		return;
    1.21 +	}
    1.22 +	acpi_slit = mfn_to_virt(mfn);
    1.23 +	memcpy(acpi_slit, slit, slit->header.length);
    1.24 +#endif
    1.25  }
    1.26  
    1.27  /* Callback for Proximity Domain -> LAPIC mapping */