From: "David Hildenbrand (Arm)" <david@kernel.org>
To: Anshuman Khandual <anshuman.khandual@arm.com>,
linux-mm@kvack.org, linux-arm-kernel@lists.infradead.org
Cc: Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>,
Ryan Roberts <ryan.roberts@arm.com>,
Mark Rutland <mark.rutland@arm.com>,
Lorenzo Stoakes <ljs@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Mike Rapoport <rppt@kernel.org>,
Linu Cherian <linu.cherian@arm.com>,
linux-kernel@vger.kernel.org, Mark Rtland <mark.rtland@arm.com>,
linx-arm-kernel@lists.infradead.org, linx-kernel@vger.kernel.org,
kasan-dev@googlegrops.com
Subject: Re: [PATCH 02/17] arm64/mm: Convert READ_ONCE() as pmdp_get() while accessing PMD
Date: Wed, 16 Sep 2026 15:34:24 +0200 [thread overview]
Message-ID: <0deef591-d82a-4034-9514-abde0e73e5e5@kernel.org> (raw)
In-Reply-To: <dc0e039e-49ef-4692-a07b-2e4e4a067b3a@kernel.org>
On 9/16/26 15:32, David Hildenbrand (Arm) wrote:
> On 7/29/26 14:24, Anshuman Khandual wrote:
>> Convert all READ_ONCE() based PMD accesses as pmdp_get() instead which will
>> support both D64 and D128 translation regime going forward. That is because
>> READ_ONCE() would need 128 bit single copy atomic guarantees, while reading
>> 128 bit page table entries which is currently not supported on arm64. Build
>> fails for READ_ONCE() while accessing beyond 64 bits.
>>
>> Load Pair/Store Pair (ldp/stp) are only single copy atomic if FEAT_LSE128
>> is supported (which is required when FEAT_D128 is supported). Currently 128
>> bit pgtables is a compile time decision - so we could have chosen to extend
>> READ_ONCE()/WRITE_ONCE() to allow 128 bit for this configuration. But then
>> it's a general purpose API and we were concerned that other users might
>> eventually creep in that expect 128 and then fail to compile in the other
>> configs.
>>
>> But worse, we are considering eventually making D128 a boot time option, at
>> which point we'd have to make READ_ONCE() always allow 128 bit at compile
>> time but then it might silently tear at runtime.
>>
>> So our preference is to standardize on these existing helpers, which we can
>> override in arm64 to give the 128 bit single copy guarantee when required.
>>
>
> Best to mention here that no functional change is expect because the common-cde
> pmdp_get() etc helpers do exactly that.
>
> Reviewed-by: David Hildenbrand (Arm) <david@kernel.org>
>
Whops, accidentally stumbled into v1 in my inbox after starting to look at v2 :D
--
Cheers,
David
next prev parent reply other threads:[~2026-09-16 13:34 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-29 12:24 [PATCH 00/17] arm64/mm: Enable 128 bit page table entries Anshuman Khandual
2026-07-29 12:24 ` [PATCH 01/17] mm: Add read-write accessors for vm_page_prot Anshuman Khandual
2026-07-29 12:24 ` [PATCH 02/17] arm64/mm: Convert READ_ONCE() as pmdp_get() while accessing PMD Anshuman Khandual
2026-09-16 13:32 ` David Hildenbrand (Arm)
2026-09-16 13:34 ` David Hildenbrand (Arm) [this message]
2026-07-29 12:24 ` [PATCH 03/17] arm64/mm: Convert READ_ONCE() as pudp_get() while accessing PUD Anshuman Khandual
2026-07-29 12:24 ` [PATCH 04/17] arm64/mm: Convert READ_ONCE() as p4dp_get() while accessing P4D Anshuman Khandual
2026-07-29 12:24 ` [PATCH 05/17] arm64/mm: Convert READ_ONCE() as pgdp_get() while accessing PGD Anshuman Khandual
2026-07-29 12:24 ` [PATCH 06/17] arm64/mm: Route all pgtable reads via ptval_get() Anshuman Khandual
2026-07-29 12:24 ` [PATCH 07/17] arm64/mm: Route all pgtable writes via ptval_set() Anshuman Khandual
2026-07-29 12:24 ` [PATCH 08/17] arm64/mm: Route all pgtable atomics to central helpers Anshuman Khandual
2026-07-29 12:24 ` [PATCH 09/17] arm64/mm: Override read-write accessors for vm_page_prot Anshuman Khandual
2026-07-29 12:24 ` [PATCH 10/17] arm64/mm: Standardize printing for pgtable entries Anshuman Khandual
2026-07-29 12:24 ` [PATCH 11/17] arm64/mm: Enable fixmap with 5 level page table Anshuman Khandual
2026-07-29 12:24 ` [PATCH 12/17] arm64/mm: Enable pgtable geometry for FEAT_D128 Anshuman Khandual
2026-07-29 12:24 ` [PATCH 13/17] arm64/mm: Enable pgtable descriptor " Anshuman Khandual
2026-07-29 12:24 ` [PATCH 14/17] arm64/mm: Enable 128 bit translation Anshuman Khandual
2026-07-29 12:24 ` [PATCH 15/17] arm64/mm: Add an abstraction level for tlbi_op Anshuman Khandual
2026-07-29 12:24 ` [PATCH 16/17] arm64/mm: Enable TLBIP instruction based TLB flush Anshuman Khandual
2026-07-29 12:24 ` [PATCH 17/17] arm64/mm: Make ARM64_D128 selectable Anshuman Khandual
2026-09-01 7:14 ` [PATCH 00/17] arm64/mm: Enable 128 bit page table entries 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=0deef591-d82a-4034-9514-abde0e73e5e5@kernel.org \
--to=david@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=anshuman.khandual@arm.com \
--cc=catalin.marinas@arm.com \
--cc=kasan-dev@googlegrops.com \
--cc=linu.cherian@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linx-arm-kernel@lists.infradead.org \
--cc=linx-kernel@vger.kernel.org \
--cc=ljs@kernel.org \
--cc=mark.rtland@arm.com \
--cc=mark.rutland@arm.com \
--cc=rppt@kernel.org \
--cc=ryan.roberts@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
all inboxes | Powered by JetHome®