]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
x86: reserve SLIT
authorYinghai Lu <yhlu.kernel@gmail.com>
Fri, 11 Jul 2008 03:36:37 +0000 (20:36 -0700)
committerIngo Molnar <mingo@elte.hu>
Fri, 11 Jul 2008 08:22:33 +0000 (10:22 +0200)
save the SLIT, in case we are using fixmap to read it, and that fixmap
could be cleared by others.

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/mm/srat_64.c

index 0fd67b81a8b6d659e57adab4db84c52c8ace966b..1b4763e26ea96f52b6240475e85a04cb3a06dc4b 100644 (file)
@@ -100,7 +100,19 @@ static __init inline int srat_disabled(void)
 /* Callback for SLIT parsing */
 void __init acpi_numa_slit_init(struct acpi_table_slit *slit)
 {
-       acpi_slit = slit;
+       unsigned length;
+       unsigned long phys;
+
+       length = slit->header.length;
+       phys = find_e820_area(0, max_pfn_mapped<<PAGE_SHIFT, length,
+                PAGE_SIZE);
+
+       if (phys == -1L)
+               panic(" Can not save slit!\n");
+
+       acpi_slit = __va(phys);
+       memcpy(acpi_slit, slit, length);
+       reserve_early(phys, phys + length, "ACPI SLIT");
 }
 
 /* Callback for Proximity Domain -> LAPIC mapping */