From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH RFC 02/35] xen: arm64: ACPI: Support common ACPI drivers Date: Thu, 05 Feb 2015 22:05:49 +0800 Message-ID: <54D378BD.8080009@linaro.org> References: <1423058539-26403-1-git-send-email-parth.dixit@linaro.org> <1423058539-26403-3-git-send-email-parth.dixit@linaro.org> <54D258A8.4090808@linaro.org> <1423134298.24924.67.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1423134298.24924.67.camel@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: Naresh Bhat , tim@xen.org, xen-devel@lists.xen.org, stefano.stabellini@citrix.com, jbeulich@suse.com, parth.dixit@linaro.org, christoffer.dall@linaro.org List-Id: xen-devel@lists.xenproject.org Hi Ian, On 05/02/2015 19:04, Ian Campbell wrote: > On Wed, 2015-02-04 at 17:36 +0000, Julien Grall wrote: >> I remembered to have a discussion about this change with Naresh few >> month ago. >> >> __va should only be used when the memory is direct-mapped to Xen (i.e >> accessible directly). On ARM64, this only the case for the RAM. Can you >> confirm that ACPI will always reside to the RAM? > > Even if the answer is yes then rather than adding loads of ifdefs it > seems like the right thing would be to implement __acpi_map_table on > ARM, even if the implementation ends up being only return __va(phys). > >> Futhermore, the code of this function seems x86-specific. The low 1MB >> may not be mapped on ARM64. >> >> I would move the whole function (acpi_os_map_memory) per-architecture. > > That's an option too, since once the "/* The low first Mb is always > mapped. */" bit is removed (which it should be since it is x86 specific) > then there isn't much left. Assuming that the ACPI always resides in RAM, the vmap would be irrelevant for ARM64, and a waste of memory. So it would be better to move the acp_os_map_memory per-architecture. IIRC it's what they choose in the ACPI series. Regards, -- Julien Grall