[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2 05/41] acpi : add helper function for mapping memory
On 20/05/15 17:03, Jan Beulich wrote: >>>> On 17.05.15 at 22:03, <parth.dixit@xxxxxxxxxx> wrote: >> --- a/xen/drivers/acpi/osl.c >> +++ b/xen/drivers/acpi/osl.c >> @@ -87,16 +87,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) { >> - unsigned long pfn = 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); >> - return __vmap(&pfn, PFN_UP(offs + size), 1, 1, >> PAGE_HYPERVISOR_NOCACHE) + offs; >> - } >> - return __acpi_map_table(phys, size); >> + return acpi_os_map_iomem(phys, size); >> } > > I think ioremap() (or maybe ioremap_cache()) should be used here, > and tweaked suitably on x86 if need be. ioremap_cache is most suitable for ARM. ioremap (i.e ioremap_nocache) is mapping the region with device attribute. Any unaligned access will result to a data abort. Regards, -- Julien Grall _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |