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

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



On 29.12.2020 11:56, Roger Pau Monné wrote:
> On Mon, Nov 23, 2020 at 01:39:55PM +0100, Jan Beulich wrote:
>> --- 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).

Indeed I had it this way first, but then realized placing it here
results in less code churn in patch 4 of this series.

Jan



 


Rackspace

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