From: Will Deacon <will@kernel.org>
To: Anshuman Khandual <anshuman.khandual@arm.com>
Cc: Joey Gouly <joey.gouly@arm.com>,
linux-arm-kernel@lists.infradead.org,
Catalin Marinas <catalin.marinas@arm.com>,
nd@arm.com
Subject: Re: [PATCH] arm64/mm: Drop ARM64_KERNEL_USES_PMD_MAPS
Date: Mon, 7 Nov 2022 15:22:12 +0000 [thread overview]
Message-ID: <20221107152210.GC21002@willie-the-truck> (raw)
In-Reply-To: <089026ad-7569-c173-301a-5de2f107a823@arm.com>
On Mon, Sep 26, 2022 at 08:48:22AM +0530, Anshuman Khandual wrote:
> On 9/23/22 19:08, Joey Gouly wrote:
> > On Fri, Sep 23, 2022 at 06:38:41PM +0530, Anshuman Khandual wrote:
> >> Currently ARM64_KERNEL_USES_PMD_MAPS is an unnecessary abstraction. Kernel
> >> mapping at PMD (aka huge page aka block) level, is only applicable with 4K
> >> base page, which makes it 2MB aligned, a necessary requirement for linear
> >> mapping and physical memory start address. This can be easily achieved by
> >> directly checking against base page size itself. This drops off the macro
> >> ARM64_KERNE_USES_PMD_MAPS which is redundant.
> >>
> >> Cc: Catalin Marinas <catalin.marinas@arm.com>
> >> Cc: Will Deacon <will@kernel.org>
> >> Cc: linux-arm-kernel@lists.infradead.org
> >> Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
> >> ---
> >> This applies on v6.0-rc6 after the following patch.
> >>
> >> https://lore.kernel.org/all/20220920014951.196191-1-wangkefeng.wang@huawei.com/
> >>
> >> arch/arm64/include/asm/kernel-pgtable.h | 33 +++++++++----------------
> >> arch/arm64/mm/mmu.c | 2 +-
> >> 2 files changed, 12 insertions(+), 23 deletions(-)
[...]
> >> @@ -96,15 +101,6 @@
> >> #define INIT_IDMAP_DIR_PAGES EARLY_PAGES(KIMAGE_VADDR, _end + MAX_FDT_SIZE + SWAPPER_BLOCK_SIZE, 1)
> >>
> >> /* Initial memory map size */
> >> -#if ARM64_KERNEL_USES_PMD_MAPS
> >> -#define SWAPPER_BLOCK_SHIFT PMD_SHIFT
> >> -#define SWAPPER_BLOCK_SIZE PMD_SIZE
> >> -#define SWAPPER_TABLE_SHIFT PUD_SHIFT
> >> -#else
> >> -#define SWAPPER_BLOCK_SHIFT PAGE_SHIFT
> >> -#define SWAPPER_BLOCK_SIZE PAGE_SIZE
> >> -#define SWAPPER_TABLE_SHIFT PMD_SHIFT
> >> -#endif
> >
> > Also a dangling comment here.
>
> These ? can be dropped off without much problem.
>
> /* Initial memory map size */
> /*
> * Initial memory map attributes.
> */
>
> Will try to re-arrange these comments next time around.
Did you post another version of this, or change your mind about it?
Will
_______________________________________________
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:[~2022-11-07 15:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-23 13:08 [PATCH] arm64/mm: Drop ARM64_KERNEL_USES_PMD_MAPS Anshuman Khandual
2022-09-23 13:38 ` Joey Gouly
2022-09-26 3:18 ` Anshuman Khandual
2022-11-07 15:22 ` Will Deacon [this message]
2022-11-08 2:32 ` Anshuman Khandual
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=20221107152210.GC21002@willie-the-truck \
--to=will@kernel.org \
--cc=anshuman.khandual@arm.com \
--cc=catalin.marinas@arm.com \
--cc=joey.gouly@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=nd@arm.com \
/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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).