From: "Jan Beulich" Subject: Re: [PATCH v2 05/41] acpi : add helper function for mapping memory Date: Wed, 20 May 2015 17:03:28 +0100 Message-ID: <555CCC70020000780007C5C7@mail.emea.novell.com> References: <1431893048-5214-1-git-send-email-parth.dixit@linaro.org> <1431893048-5214-6-git-send-email-parth.dixit@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1431893048-5214-6-git-send-email-parth.dixit@linaro.org> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Parth Dixit Cc: keir@xen.org, ian.campbell@citrix.com, andrew.cooper3@citrix.com, tim@xen.org, xen-devel@lists.xen.org, julien.grall@citrix.com, stefano.stabellini@citrix.com, christoffer.dall@linaro.org List-Id: xen-devel@lists.xenproject.org >>> On 17.05.15 at 22:03, 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. Jan