[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201012113748.GE9844@gaia>
Date: Mon, 12 Oct 2020 12:37:48 +0100
From: Catalin Marinas <catalin.marinas@....com>
To: Nicolas Saenz Julienne <nsaenzjulienne@...e.de>
Cc: robh+dt@...nel.org, hch@....de, ardb@...nel.org,
linux-kernel@...r.kernel.org, robin.murphy@....com,
linux-arm-kernel@...ts.infradead.org,
linux-rpi-kernel@...ts.infradead.org, jeremy.linton@....com,
iommu@...ts.linux-foundation.org, devicetree@...r.kernel.org,
Will Deacon <will@...nel.org>
Subject: Re: [PATCH v2 1/5] arm64: mm: Move zone_dma_bits initialization into
zone_sizes_init()
On Sat, Oct 10, 2020 at 05:12:31PM +0200, Nicolas Saenz Julienne wrote:
> diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c
> index f6902a2b4ea6..0eca5865dcb1 100644
> --- a/arch/arm64/mm/init.c
> +++ b/arch/arm64/mm/init.c
> @@ -196,14 +196,16 @@ static void __init zone_sizes_init(unsigned long min, unsigned long max)
> unsigned long max_zone_pfns[MAX_NR_ZONES] = {0};
>
> #ifdef CONFIG_ZONE_DMA
> + zone_dma_bits = ARM64_ZONE_DMA_BITS;
> +
> if (IS_ENABLED(CONFIG_ACPI)) {
> extern unsigned int acpi_iort_get_zone_dma_size(void);
>
> zone_dma_bits = min(zone_dma_bits,
> acpi_iort_get_zone_dma_size());
> - arm64_dma_phys_limit = max_zone_phys(zone_dma_bits);
> }
>
> + arm64_dma_phys_limit = max_zone_phys(zone_dma_bits);
> max_zone_pfns[ZONE_DMA] = PFN_DOWN(arm64_dma_phys_limit);
> #endif
> #ifdef CONFIG_ZONE_DMA32
> @@ -394,11 +396,6 @@ void __init arm64_memblock_init(void)
>
> early_init_fdt_scan_reserved_mem();
>
> - if (IS_ENABLED(CONFIG_ZONE_DMA)) {
> - zone_dma_bits = ARM64_ZONE_DMA_BITS;
> - arm64_dma_phys_limit = max_zone_phys(ARM64_ZONE_DMA_BITS);
> - }
arm64_dma_phys_limit is used by memblock_alloc_low() (via
ARCH_LOW_ADDRESS_LIMIT). I think it's too late to leave its
initialisation to zone_sizes_init().
--
Catalin
Powered by blists - more mailing lists