On Mon, Nov 23, 2020 at 01:39:55PM +0100, Jan Beulich wrote:
> 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 <jbeul...@suse.com>
> 
> --- 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));

Nit: looking at this again, I think you could move the
acpi_os_unmap_memory further up, just after the last usage of facs
(ie: before setting the wakeup_vector field).

Roger.

Reply via email to