WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] RE: [PATCH] to fix ACPI slit table access at runtime

To: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Subject: [Xen-devel] RE: [PATCH] to fix ACPI slit table access at runtime
From: "Kamble, Nitin A" <nitin.a.kamble@xxxxxxxxx>
Date: Thu, 25 Feb 2010 10:47:22 -0800
Accept-language: en-US
Acceptlanguage: en-US
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Thu, 25 Feb 2010 10:47:58 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <C7AC6B91.B623%keir.fraser@xxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <8EA2C2C4116BF44AB370468FBF85A7770124F8B8CF@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <C7AC6B91.B623%keir.fraser@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acq1rmsyjyldpDGeT+ivAyknVofFzQAZXoLfAAuoMJAAAIWV2QABgKnQ
Thread-topic: [PATCH] to fix ACPI slit table access at runtime
Keir, here is the updated patch. I did verify that it is giving right 
information at runtime.

Thanks & Regards,
Nitin

Signed-Off-By: Nitin A Kamble <nitin.a.kamble@xxxxxxxxx>

diff -r b474725a242b xen/arch/x86/srat.c
--- a/xen/arch/x86/srat.c       Thu Feb 25 07:50:38 2010 -0800
+++ b/xen/arch/x86/srat.c       Fri Feb 26 02:41:27 2010 -0800
@@ -140,11 +140,21 @@
 /* Callback for SLIT parsing */
 void __init acpi_numa_slit_init(struct acpi_table_slit *slit)
 {
+       unsigned long mfn, pages;
        if (!slit_valid(slit)) {
                printk(KERN_INFO "ACPI: SLIT table looks invalid. Not used.\n");
                return;
        }
-       acpi_slit = slit;
+       pages = slit->header.length >> PAGE_SHIFT;
+       if (!pages)
+               pages = 1;
+       mfn = alloc_boot_pages(pages , 1);
+       if (!mfn) {
+               printk(KERN_ERR "ACPI: Unable to allocate memory for saving 
ACPI SLIT numa information.\n");
+               return;
+       }
+       acpi_slit = mfn_to_virt(mfn);
+       memcpy(acpi_slit, slit, slit->header.length);
 }
 
 /* Callback for Proximity Domain -> LAPIC mapping */

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel