diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2010-02-25 21:03:26 +0000 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2010-02-25 21:03:26 +0000 |
commit | 387d25611007aa702df6c3c78fdcaaf7644947e7 (patch) | |
tree | 65af1255efe7985f6676be0a24e8433b65cfa206 | |
parent | 696713c28205dfe51b6283b32d913d622fd591bb (diff) | |
download | xen-387d25611007aa702df6c3c78fdcaaf7644947e7.tar.gz xen-387d25611007aa702df6c3c78fdcaaf7644947e7.tar.bz2 xen-387d25611007aa702df6c3c78fdcaaf7644947e7.zip |
x86 numa: Fix post-boot ACPI SLIT accesses.
Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
-rw-r--r-- | xen/arch/x86/srat.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/xen/arch/x86/srat.c b/xen/arch/x86/srat.c index 9da11f7b0e..2060ff78cc 100644 --- a/xen/arch/x86/srat.c +++ b/xen/arch/x86/srat.c @@ -140,11 +140,22 @@ static __init int slit_valid(struct acpi_table_slit *slit) /* Callback for SLIT parsing */ void __init acpi_numa_slit_init(struct acpi_table_slit *slit) { +#ifdef CONFIG_X86_64 + unsigned long mfn; if (!slit_valid(slit)) { - printk(KERN_INFO "ACPI: SLIT table looks invalid. Not used.\n"); + printk(KERN_INFO "ACPI: SLIT table looks invalid. " + "Not used.\n"); + return; + } + mfn = alloc_boot_pages(PFN_UP(slit->header.length), 1); + if (!mfn) { + printk(KERN_ERR "ACPI: Unable to allocate memory for " + "saving ACPI SLIT numa information.\n"); return; } - acpi_slit = slit; + acpi_slit = mfn_to_virt(mfn); + memcpy(acpi_slit, slit, slit->header.length); +#endif } /* Callback for Proximity Domain -> LAPIC mapping */ |