From: Catalin Marinas <catalin.marinas@arm.com> To: Ard Biesheuvel <ardb@kernel.org> Cc: linux-arm-kernel@lists.infradead.org, linux-acpi@vger.kernel.org, will@kernel.org, Jeremy Linton <jeremy.linton@arm.com>, Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>, Nicolas Saenz Julienne <nsaenzjulienne@suse.de>, Rob Herring <robh+dt@kernel.org>, Christoph Hellwig <hch@lst.de>, Robin Murphy <robin.murphy@arm.com>, Hanjun Guo <guohanjun@huawei.com>, Sudeep Holla <sudeep.holla@arm.com>, Anshuman Khandual <anshuman.khandual@arm.com> Subject: Re: [PATCH] arm64: mm: set ZONE_DMA size based on early IORT scan Date: Mon, 12 Oct 2020 10:28:21 +0100 [thread overview] Message-ID: <20201012092821.GB9844@gaia> (raw) In-Reply-To: <20201010093153.30177-1-ardb@kernel.org> On Sat, Oct 10, 2020 at 11:31:53AM +0200, Ard Biesheuvel wrote: > diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c > index f0599ae73b8d..829fa63c3d72 100644 > --- a/arch/arm64/mm/init.c > +++ b/arch/arm64/mm/init.c > @@ -191,6 +191,14 @@ 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 > + if (IS_ENABLED(CONFIG_ACPI)) { > + extern unsigned int acpi_iort_get_zone_dma_size(void); Nitpick: can we add this prototype to include/linux/acpi_iort.h? > + > + zone_dma_bits = min(zone_dma_bits, > + acpi_iort_get_zone_dma_size()); > + arm64_dma_phys_limit = max_zone_phys(zone_dma_bits); > + } > + > max_zone_pfns[ZONE_DMA] = PFN_DOWN(arm64_dma_phys_limit); I think we should initialise zone_dma_bits slightly earlier via arm64_memblock_init(). We'll eventually have reserve_crashkernel() called before this and it will make use of arm64_dma_phys_limit for "low" reservations: https://lore.kernel.org/linux-arm-kernel/20200907134745.25732-7-chenzhou10@huawei.com/ -- Catalin
WARNING: multiple messages have this Message-ID (diff)
From: Catalin Marinas <catalin.marinas@arm.com> To: Ard Biesheuvel <ardb@kernel.org> Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>, Anshuman Khandual <anshuman.khandual@arm.com>, Robin Murphy <robin.murphy@arm.com>, Sudeep Holla <sudeep.holla@arm.com>, Jeremy Linton <jeremy.linton@arm.com>, linux-acpi@vger.kernel.org, Rob Herring <robh+dt@kernel.org>, linux-arm-kernel@lists.infradead.org, Hanjun Guo <guohanjun@huawei.com>, will@kernel.org, Christoph Hellwig <hch@lst.de>, Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Subject: Re: [PATCH] arm64: mm: set ZONE_DMA size based on early IORT scan Date: Mon, 12 Oct 2020 10:28:21 +0100 [thread overview] Message-ID: <20201012092821.GB9844@gaia> (raw) In-Reply-To: <20201010093153.30177-1-ardb@kernel.org> On Sat, Oct 10, 2020 at 11:31:53AM +0200, Ard Biesheuvel wrote: > diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c > index f0599ae73b8d..829fa63c3d72 100644 > --- a/arch/arm64/mm/init.c > +++ b/arch/arm64/mm/init.c > @@ -191,6 +191,14 @@ 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 > + if (IS_ENABLED(CONFIG_ACPI)) { > + extern unsigned int acpi_iort_get_zone_dma_size(void); Nitpick: can we add this prototype to include/linux/acpi_iort.h? > + > + zone_dma_bits = min(zone_dma_bits, > + acpi_iort_get_zone_dma_size()); > + arm64_dma_phys_limit = max_zone_phys(zone_dma_bits); > + } > + > max_zone_pfns[ZONE_DMA] = PFN_DOWN(arm64_dma_phys_limit); I think we should initialise zone_dma_bits slightly earlier via arm64_memblock_init(). We'll eventually have reserve_crashkernel() called before this and it will make use of arm64_dma_phys_limit for "low" reservations: https://lore.kernel.org/linux-arm-kernel/20200907134745.25732-7-chenzhou10@huawei.com/ -- Catalin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-10-12 9:28 UTC|newest] Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-10-10 9:31 [PATCH] arm64: mm: set ZONE_DMA size based on early IORT scan Ard Biesheuvel 2020-10-10 9:31 ` Ard Biesheuvel 2020-10-12 9:28 ` Catalin Marinas [this message] 2020-10-12 9:28 ` Catalin Marinas 2020-10-12 9:30 ` Ard Biesheuvel 2020-10-12 9:30 ` Ard Biesheuvel 2020-10-12 10:43 ` Ard Biesheuvel 2020-10-12 10:43 ` Ard Biesheuvel 2020-10-12 11:24 ` Catalin Marinas 2020-10-12 11:24 ` Catalin Marinas 2020-10-12 14:19 ` Ard Biesheuvel 2020-10-12 14:19 ` Ard Biesheuvel 2020-10-12 15:49 ` Catalin Marinas 2020-10-12 15:49 ` Catalin Marinas 2020-10-12 15:55 ` Ard Biesheuvel 2020-10-12 15:55 ` Ard Biesheuvel 2020-10-12 16:22 ` Catalin Marinas 2020-10-12 16:22 ` Catalin Marinas 2020-10-12 16:35 ` Ard Biesheuvel 2020-10-12 16:35 ` Ard Biesheuvel 2020-10-12 16:59 ` Catalin Marinas 2020-10-12 16:59 ` Catalin Marinas 2020-10-13 14:42 ` Nicolas Saenz Julienne 2020-10-13 14:42 ` Nicolas Saenz Julienne 2020-10-13 15:45 ` Catalin Marinas 2020-10-13 15:45 ` Catalin Marinas 2020-10-14 12:44 ` Ard Biesheuvel 2020-10-14 12:44 ` Ard Biesheuvel 2020-10-14 12:54 ` Nicolas Saenz Julienne 2020-10-14 12:54 ` Nicolas Saenz Julienne 2020-10-12 12:16 ` kernel test robot 2020-10-12 12:16 ` kernel test robot 2020-10-12 12:16 ` kernel test robot 2020-10-13 11:09 ` Lorenzo Pieralisi 2020-10-13 11:09 ` Lorenzo Pieralisi 2020-10-13 11:22 ` Ard Biesheuvel 2020-10-13 11:22 ` Ard Biesheuvel 2020-10-13 11:38 ` Ard Biesheuvel 2020-10-13 11:38 ` Ard Biesheuvel 2020-10-13 11:43 ` Ard Biesheuvel 2020-10-13 11:43 ` Ard Biesheuvel 2020-10-13 13:13 ` Lorenzo Pieralisi 2020-10-13 13:13 ` Lorenzo Pieralisi 2020-10-13 13:42 ` Ard Biesheuvel 2020-10-13 13:42 ` Ard Biesheuvel 2020-10-13 15:11 ` Robin Murphy 2020-10-13 15:11 ` Robin Murphy 2020-10-13 15:41 ` Lorenzo Pieralisi 2020-10-13 15:41 ` Lorenzo Pieralisi 2020-10-14 16:18 ` Catalin Marinas 2020-10-14 16:18 ` Catalin Marinas 2020-10-14 17:23 ` Lorenzo Pieralisi 2020-10-14 17:23 ` Lorenzo Pieralisi
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20201012092821.GB9844@gaia \ --to=catalin.marinas@arm.com \ --cc=anshuman.khandual@arm.com \ --cc=ardb@kernel.org \ --cc=guohanjun@huawei.com \ --cc=hch@lst.de \ --cc=jeremy.linton@arm.com \ --cc=linux-acpi@vger.kernel.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=lorenzo.pieralisi@arm.com \ --cc=nsaenzjulienne@suse.de \ --cc=robh+dt@kernel.org \ --cc=robin.murphy@arm.com \ --cc=sudeep.holla@arm.com \ --cc=will@kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.