From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH RFC 34/35] arm : acpi workarounds for firmware/linux dependencies Date: Tue, 10 Feb 2015 18:26:57 +0800 Message-ID: <54D9DCF1.1070404@linaro.org> References: <1423058539-26403-1-git-send-email-parth.dixit@linaro.org> <1423058539-26403-35-git-send-email-parth.dixit@linaro.org> <54D301DC.6090306@linaro.org> <54D3854E.20702@linaro.org> <54D9D199.3010008@linaro.org> <54D9E51C020000780005E822@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <54D9E51C020000780005E822@mail.emea.novell.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: Jan Beulich , Parth Dixit Cc: tim@xen.org, Stefano Stabellini , Ian Campbell , Christoffer Dall , xen-devel List-Id: xen-devel@lists.xenproject.org Hi Jan, On 10/02/2015 18:01, Jan Beulich wrote: >>>> On 10.02.15 at 10:38, wrote: >> Why it's working on x86? This big allocation is done via the boot >> allocator memory (because the system state is early boot). Hopefully, we >> never have to resize it. >> >> On ARM64, ACPI is initialized after the boot allocator has ended, so we >> have to use xmalloc which will return a page-align pointer. >> >> As ACPI on ARM64 will never use the boot allocator, > > How come you're so certain? The reason why on x86 it needs to > be done this way is because of NUMA initialization. Are you not > expecting NUMA to become of interest to ARM? Or if you do, are > you sure you can get away without the same ordering that x86 > uses? I haven't though about it, sorry. Indeed, sooner or later NUMA will be interesting for ARM. So yes, the ACPI initialization has to be done before the boot_end_allocator. I gave a try and it works for me (see patch below). Parth, can you include this patch and drop the change about is_xmalloc_memory? Regards, diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c index 6651e78..6c7b3bf 100644 --- a/xen/arch/arm/setup.c +++ b/xen/arch/arm/setup.c @@ -600,8 +600,6 @@ static void __init setup_mm(unsigned long dtb_paddr, size_t dtb_size) allocator. */ init_xenheap_pages(pfn_to_paddr(xenheap_mfn_start), pfn_to_paddr(boot_mfn_start)); - - end_boot_allocator(); } #else /* CONFIG_ARM_64 */ static void __init setup_mm(unsigned long dtb_paddr, size_t dtb_size) @@ -670,8 +668,6 @@ static void __init setup_mm(unsigned long dtb_paddr, size_t dtb_size) setup_frametable_mappings(ram_start, ram_end); max_page = PFN_DOWN(ram_end); - - end_boot_allocator(); } #endif @@ -741,6 +737,12 @@ void __init start_xen(unsigned long boot_phys_offset, setup_mm(fdt_paddr, fdt_size); +#ifdef CONFIG_ACPI + acpi_boot_table_init(); +#endif + + end_boot_allocator(); + system_state = SYS_STATE_boot; vm_init(); @@ -750,7 +752,6 @@ void __init start_xen(unsigned long boot_phys_offset, */ #if defined(CONFIG_ACPI) && defined(CONFIG_ARM_64) - acpi_boot_table_init(); /* Get the boot CPU's MPIDR before cpu logical map is built */ cpu_logical_map(0) = read_cpuid_mpidr() & MPIDR_HWID_BITMASK; -- Julien Grall