From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Jan Beulich" Subject: Re: [PATCH v4 05/10] acpi: Refactor acpi_os_map_memory to be architecturally independent Date: Mon, 18 Jan 2016 06:33:19 -0700 Message-ID: <569CF7AF02000078000C806A@prv-mh.provo.novell.com> References: <1452920477-13916-1-git-send-email-zhaoshenglong@huawei.com> <1452920477-13916-6-git-send-email-zhaoshenglong@huawei.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1452920477-13916-6-git-send-email-zhaoshenglong@huawei.com> 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: Shannon Zhao Cc: ian.campbell@citrix.com, peter.huangpeng@huawei.com, xen-devel@lists.xen.org, julien.grall@citrix.com, stefano.stabellini@citrix.com, shannon.zhao@linaro.org List-Id: xen-devel@lists.xenproject.org >>> On 16.01.16 at 06:01, wrote: > --- a/xen/drivers/acpi/osl.c > +++ b/xen/drivers/acpi/osl.c > @@ -86,17 +86,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) { > - 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); > - return __vmap(&mfn, PFN_UP(offs + size), 1, 1, > - PAGE_HYPERVISOR_NOCACHE) + offs; > - } > - return __acpi_map_table(phys, size); > + return arch_acpi_os_map_memory(phys, size); > } I'm quite sure I've said before that this goes too far: The __vmap() part and likely also the early-boot __acpi_map_table() one already are architecture independent and hence should stay. The factoring hence should only concern the first Mb handling and maybe the the mapping attributes passed to __vmap(). Jan