linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Anshuman Khandual <anshuman.khandual@arm.com>
To: Will Deacon <will@kernel.org>
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: Tue, 8 Nov 2022 08:02:32 +0530	[thread overview]
Message-ID: <98a77143-afd4-ef15-4db4-9f4e56f71536@arm.com> (raw)
In-Reply-To: <20221107152210.GC21002@willie-the-truck>



On 11/7/22 20:52, Will Deacon wrote:
> 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 post another version soon.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

      reply	other threads:[~2022-11-08  2:33 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
2022-11-08  2:32       ` Anshuman Khandual [this message]

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=98a77143-afd4-ef15-4db4-9f4e56f71536@arm.com \
    --to=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 \
    --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: 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).