[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 1/4] x86/ACPI: fix mapping of FACS



acpi_fadt_parse_sleep_info() runs when the system is already in
SYS_STATE_boot. Hence its direct call to __acpi_map_table() won't work
anymore. This call should probably have been replaced long ago already,
as the layering violation hasn't been necessary for quite some time.

Fixes: 1c4aa69ca1e1 ("xen/acpi: Rework acpi_os_map_memory() and 
acpi_os_unmap_memory()")
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

--- a/xen/arch/x86/acpi/boot.c
+++ b/xen/arch/x86/acpi/boot.c
@@ -422,8 +422,7 @@ acpi_fadt_parse_sleep_info(struct acpi_t
        if (!facs_pa)
                goto bad;
 
-       facs = (struct acpi_table_facs *)
-               __acpi_map_table(facs_pa, sizeof(struct acpi_table_facs));
+       facs = acpi_os_map_memory(facs_pa, sizeof(*facs));
        if (!facs)
                goto bad;
 
@@ -448,11 +447,16 @@ acpi_fadt_parse_sleep_info(struct acpi_t
                offsetof(struct acpi_table_facs, firmware_waking_vector);
        acpi_sinfo.vector_width = 32;
 
+       acpi_os_unmap_memory(facs, sizeof(*facs));
+
        printk(KERN_INFO PREFIX
               "            wakeup_vec[%"PRIx64"], vec_size[%x]\n",
               acpi_sinfo.wakeup_vector, acpi_sinfo.vector_width);
        return;
-bad:
+
+ bad:
+       if (facs)
+               acpi_os_unmap_memory(facs, sizeof(*facs));
        memset(&acpi_sinfo, 0,
               offsetof(struct acpi_sleep_info, sleep_control));
        memset(&acpi_sinfo.sleep_status + 1, 0,




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.