acpi: Switch to dynamic mapping at SYS_STATE_boot
PATCH v2 1/1 acpi: Switch to dynamic mapping at SYS_STATE_boot
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.
---
Changes in v2:
* Swap vm_init() and system_state assignment.
xen/arch/x86/setup.c | 3 ++- xen/drivers/acpi/osl.c | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-)
xen/arch/x86/setup.c +2 -1
@@ -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 ();
xen/drivers/acpi/osl.c +2 -2
@@ -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 )); }
Signature · 7 lines
1.8.3.1 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
Quoted 10 lines
Quoted 1 line
Quoted 1 line · On 01.02.17 at 15:31, <[email protected]> wrote:
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 intoNUM_FIXMAP_ACPI_PAGES(currently set to 4).To avoid having a window between system entering
SYS_STATE_bootand vmap area being initialized movevm_init()a little higher.Signed-off-by Boris Ostrovsky <[email protected]>
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel