From: Catalin Marinas <catalin.marinas@arm.com>
To: Anshuman Khandual <anshuman.khandual@arm.com>
Cc: linux-arm-kernel@lists.infradead.org,
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>,
David Hildenbrand <david@kernel.org>,
Mike Rapoport <rppt@kernel.org>,
Linu Cherian <linu.cherian@arm.com>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
kasan-dev@googlegroups.com
Subject: Re: [PATCH V3 1/4] arm64/mm: Use pmdp_get() for PMD accesses
Date: Mon, 5 Oct 2026 16:31:28 +0100 [thread overview]
Message-ID: <asPCv5Icdm7Z9mWF@arm.com> (raw)
In-Reply-To: <20260924062214.1635078-2-anshuman.khandual@arm.com>
On Thu, Sep 24, 2026 at 11:52:11AM +0530, Anshuman Khandual wrote:
> diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h
> index 763c5a411d64..9ad2d03e86ad 100644
> --- a/arch/arm64/include/asm/pgtable.h
> +++ b/arch/arm64/include/asm/pgtable.h
> @@ -84,6 +84,12 @@ static inline void arch_leave_lazy_mmu_mode(void)
> arch_flush_lazy_mmu_mode();
> }
>
> +#define pmdp_get pmdp_get
> +static inline pmd_t pmdp_get(pmd_t *pmdp)
> +{
> + return READ_ONCE(*pmdp);
> +}
This is the same as the generic version. Does it need redefining?
> +
> #ifdef CONFIG_TRANSPARENT_HUGEPAGE
> #define __HAVE_ARCH_FLUSH_PMD_TLB_RANGE
>
> @@ -811,7 +817,8 @@ static inline unsigned long pmd_page_vaddr(pmd_t pmd)
> }
>
> /* Find an entry in the third-level page table. */
> -#define pte_offset_phys(dir,addr) (pmd_page_paddr(READ_ONCE(*(dir))) + pte_index(addr) * sizeof(pte_t))
> +#define pte_offset_phys(dir, addr) (pmd_page_paddr(pmdp_get(dir)) + \
> + pte_index(addr) * sizeof(pte_t))
Why not make this change in the generic version?
--
Catalin
next prev parent reply other threads:[~2026-10-05 15:31 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-24 6:22 [PATCH V3 0/4] arm64/mm: Convert pgtable READ_ONCE() as pxdp_get() Anshuman Khandual
2026-09-24 6:22 ` [PATCH V3 1/4] arm64/mm: Use pmdp_get() for PMD accesses Anshuman Khandual
2026-09-24 12:09 ` Ryan Roberts
2026-10-05 15:31 ` Catalin Marinas [this message]
2026-10-07 2:41 ` Anshuman Khandual
2026-09-24 6:22 ` [PATCH V3 2/4] arm64/mm: Use pudp_get() for PUD accesses Anshuman Khandual
2026-09-24 12:10 ` Ryan Roberts
2026-09-24 6:22 ` [PATCH V3 3/4] arm64/mm: Use p4dp_get() for P4D accesses Anshuman Khandual
2026-09-24 12:10 ` Ryan Roberts
2026-09-24 6:22 ` [PATCH V3 4/4] arm64/mm: Use pgdp_get() for PGD accesses Anshuman Khandual
2026-09-24 12:10 ` Ryan Roberts
2026-10-05 6:41 ` [PATCH V3 0/4] arm64/mm: Convert pgtable READ_ONCE() as pxdp_get() 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=asPCv5Icdm7Z9mWF@arm.com \
--to=catalin.marinas@arm.com \
--cc=akpm@linux-foundation.org \
--cc=anshuman.khandual@arm.com \
--cc=david@kernel.org \
--cc=kasan-dev@googlegroups.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=ljs@kernel.org \
--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®