acpi: switch to dynamic mapping at SYS_STATE_boot
authorBoris Ostrovsky <boris.ostrovsky@oracle.com>
Thu, 2 Feb 2017 11:51:39 +0000 (12:51 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 2 Feb 2017 11:51:39 +0000 (12:51 +0100)
We can switch ACPI from using fixmap to dynamic mapping as soon as
the system enters SYS_STATE_boot. This will allow us, for example,
to map MADT on systems with large number of processors where the
table might not fit into NUM_FIXMAP_ACPI_PAGES (currently set to 4).

To avoid having a window between system entering SYS_STATE_boot and
vmap area being initialized move vm_init() a little higher.

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/setup.c
xen/drivers/acpi/osl.c

index 0ccef1dcd72c5a942106f718d2efe34f182191a3..ccfd6dd88582a2e5e1f45124bba10a0c0ce1f380 100644 (file)
@@ -1376,9 +1376,10 @@ void __init noreturn __start_xen(unsigned long mbi_p)
     else
         end_boot_allocator();
 
+    vm_init();
+
     system_state = SYS_STATE_boot;
 
-    vm_init();
     console_init_ring();
     vesa_init();
 
index 3616dfdbc0a1141146f34c60a389e9d965f94f9f..7199047198e0fb1db7220c1258f147e3a35b54f4 100644 (file)
@@ -89,7 +89,7 @@ acpi_physical_address __init acpi_os_get_root_pointer(void)
 void __iomem *
 acpi_os_map_memory(acpi_physical_address phys, acpi_size size)
 {
-       if (system_state >= SYS_STATE_active) {
+       if (system_state >= SYS_STATE_boot) {
                mfn_t mfn = _mfn(PFN_DOWN(phys));
                unsigned int offs = phys & (PAGE_SIZE - 1);
 
@@ -104,7 +104,7 @@ acpi_os_map_memory(acpi_physical_address phys, acpi_size size)
 
 void acpi_os_unmap_memory(void __iomem * virt, acpi_size size)
 {
-       if (system_state >= SYS_STATE_active)
+       if (system_state >= SYS_STATE_boot)
                vunmap((void *)((unsigned long)virt & PAGE_MASK));
 }