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

Re: [Xen-devel] [PATCH v5 3/8] acpi: Refactor acpi_os_map_memory to be architecturally independent



>>> On 23.01.16 at 09:00, <zhaoshenglong@xxxxxxxxxx> wrote:
> v5: only factor the first Mb handling and the attribute of __vmap()

Much better.

> --- a/xen/drivers/acpi/osl.c
> +++ b/xen/drivers/acpi/osl.c
> @@ -92,11 +92,14 @@ acpi_os_map_memory(acpi_physical_address phys, acpi_size 
> size)
>               mfn_t mfn = _mfn(PFN_DOWN(phys));
>               unsigned int offs = phys & (PAGE_SIZE - 1);
>  
> -             /* The low first Mb is always mapped. */
> -             if ( !((phys + size - 1) >> 20) )
> -                     return __va(phys);
> +             if (IS_ENABLED(CONFIG_X86)) {
> +                     /* The low first Mb is always mapped. */
> +                     if ( !((phys + size - 1) >> 20) )
> +                             return __va(phys);
> +             }

But please combine the two if()-s into one.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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