* [PATCH 0/3] arch/mm: Drop similar platform overrides for pxdp_get()
@ 2026-09-23 4:32 Anshuman Khandual
2026-09-23 4:32 ` [PATCH 1/3] s390/mm: Drop all pxdp_get() Anshuman Khandual
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Anshuman Khandual @ 2026-09-23 4:32 UTC (permalink / raw)
To: linux-mm
Cc: Anshuman Khandual, David Hildenbrand, Andrew Morton,
Alexander Gordeev, Gerald Schaefer, Huacai Chen, WANG Xuerui,
Helge Deller, loongarch, linux-s390, linux-parisc, linux-kernel
There are many platforms with similar pxpd_get() overrides like the generic
memory default helpers which use READ_ONCE() for reading page table entries
These overrides could be dropped safely letting their platforms fallback on
the defaults instead. Although it requires some code movement from platform
headers to avoid build failures.
This series based on v7.3-rc4 although after the following patch.
https://lore.kernel.org/linux-mm/20260918064928.793742-1-anshuman.khandual@arm.com/
Cc: David Hildenbrand <david@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Alexander Gordeev <agordeev@linux.ibm.com>
Cc: Gerald Schaefer <gerald.schaefer@linux.ibm.com>
Cc: Huacai Chen <chenhuacai@kernel.org>
Cc: WANG Xuerui <kernel@xen0n.name>
Cc: “James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
Cc: Helge Deller <deller@gmx.de>
Cc: linux-mm@kvack.org
Cc: loongarch@lists.linux.dev
Cc: linux-s390@vger.kernel.org
Cc: linux-parisc@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Anshuman Khandual (3):
s390/mm: Drop all pxdp_get()
loongarch/mm: Drop all pxdp_get()
parisc/mm: Drop all pxdp_get()
arch/loongarch/include/asm/pgtable.h | 20 ++--------------
arch/loongarch/mm/init.c | 19 +++++++++++++++
arch/parisc/include/asm/pgtable.h | 20 +---------------
arch/parisc/mm/init.c | 13 +++++++++++
arch/s390/include/asm/pgtable.h | 35 ++++------------------------
5 files changed, 40 insertions(+), 67 deletions(-)
--
2.43.0
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/3] s390/mm: Drop all pxdp_get()
2026-09-23 4:32 [PATCH 0/3] arch/mm: Drop similar platform overrides for pxdp_get() Anshuman Khandual
@ 2026-09-23 4:32 ` Anshuman Khandual
2026-09-23 9:16 ` Heiko Carstens
2026-09-23 4:32 ` [PATCH 2/3] loongarch/mm: " Anshuman Khandual
2026-09-23 4:32 ` [PATCH 3/3] parisc/mm: " Anshuman Khandual
2 siblings, 1 reply; 8+ messages in thread
From: Anshuman Khandual @ 2026-09-23 4:32 UTC (permalink / raw)
To: linux-mm
Cc: Anshuman Khandual, David Hildenbrand, Andrew Morton,
Alexander Gordeev, Gerald Schaefer, Huacai Chen, WANG Xuerui,
Helge Deller, loongarch, linux-s390, linux-parisc, linux-kernel
Current platform specific pxdp_get() helpers are exact same as the default
ones defined in the generic MM header (include/linux/pgtable.h) thus making
them redundant. Just add required forward declarations.
Cc: Alexander Gordeev <agordeev@linux.ibm.com>
Cc: Gerald Schaefer <gerald.schaefer@linux.ibm.com>
Cc: linux-s390@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-mm@kvack.org
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
---
arch/s390/include/asm/pgtable.h | 35 +++++----------------------------
1 file changed, 5 insertions(+), 30 deletions(-)
diff --git a/arch/s390/include/asm/pgtable.h b/arch/s390/include/asm/pgtable.h
index e882663a58e77..0a0b0ec42b624 100644
--- a/arch/s390/include/asm/pgtable.h
+++ b/arch/s390/include/asm/pgtable.h
@@ -25,6 +25,11 @@
#include <asm/page.h>
#include <asm/uv.h>
+static inline pte_t ptep_get(const pte_t *ptep);
+static inline pud_t pudp_get(const pud_t *pudp);
+static inline p4d_t p4dp_get(const p4d_t *p4dp);
+static inline pgd_t pgdp_get(const pgd_t *pgdp);
+
extern pgd_t swapper_pg_dir[];
extern pgd_t invalid_pg_dir[];
extern void paging_init(void);
@@ -985,36 +990,6 @@ static inline void set_pte(pte_t *ptep, pte_t pte)
WRITE_ONCE(*ptep, pte);
}
-#define ptep_get ptep_get
-static inline pte_t ptep_get(pte_t *ptep)
-{
- return READ_ONCE(*ptep);
-}
-
-#define pmdp_get pmdp_get
-static inline pmd_t pmdp_get(pmd_t *pmdp)
-{
- return READ_ONCE(*pmdp);
-}
-
-#define pudp_get pudp_get
-static inline pud_t pudp_get(pud_t *pudp)
-{
- return READ_ONCE(*pudp);
-}
-
-#define p4dp_get p4dp_get
-static inline p4d_t p4dp_get(p4d_t *p4dp)
-{
- return READ_ONCE(*p4dp);
-}
-
-#define pgdp_get pgdp_get
-static inline pgd_t pgdp_get(pgd_t *pgdp)
-{
- return READ_ONCE(*pgdp);
-}
-
static inline void pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep)
{
set_pte(ptep, __pte(_PAGE_INVALID));
--
2.43.0
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 2/3] loongarch/mm: Drop all pxdp_get()
2026-09-23 4:32 [PATCH 0/3] arch/mm: Drop similar platform overrides for pxdp_get() Anshuman Khandual
2026-09-23 4:32 ` [PATCH 1/3] s390/mm: Drop all pxdp_get() Anshuman Khandual
@ 2026-09-23 4:32 ` Anshuman Khandual
2026-09-23 4:32 ` [PATCH 3/3] parisc/mm: " Anshuman Khandual
2 siblings, 0 replies; 8+ messages in thread
From: Anshuman Khandual @ 2026-09-23 4:32 UTC (permalink / raw)
To: linux-mm
Cc: Anshuman Khandual, David Hildenbrand, Andrew Morton,
Alexander Gordeev, Gerald Schaefer, Huacai Chen, WANG Xuerui,
Helge Deller, loongarch, linux-s390, linux-parisc, linux-kernel
Current platform specific pxdp_get() helpers are exact same as the default
ones defined in the generic MM header (include/linux/pgtable.h) thus making
them redundant. Move functions that are now depending on generic helpers to
avoid build failure.
Cc: Huacai Chen <chenhuacai@kernel.org>
Cc: WANG Xuerui <kernel@xen0n.name>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: loongarch@lists.linux.dev
Cc: linux-kernel@vger.kernel.org
Cc: linux-mm@kvack.org
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
---
arch/loongarch/include/asm/pgtable.h | 20 ++------------------
arch/loongarch/mm/init.c | 19 +++++++++++++++++++
2 files changed, 21 insertions(+), 18 deletions(-)
diff --git a/arch/loongarch/include/asm/pgtable.h b/arch/loongarch/include/asm/pgtable.h
index a05f6a4928dc6..b1060b86d5353 100644
--- a/arch/loongarch/include/asm/pgtable.h
+++ b/arch/loongarch/include/asm/pgtable.h
@@ -132,9 +132,6 @@ struct vm_area_struct;
#define DIRECT_MAP_PHYSMEM_END min((1ULL << (cpu_pabits + 1)) - 1, (1ULL << MAX_PHYSMEM_BITS) - 1)
#endif
-#define ptep_get(ptep) READ_ONCE(*(ptep))
-#define pmdp_get(pmdp) READ_ONCE(*(pmdp))
-
#define pte_ERROR(e) \
pr_err("%s:%d: bad pte %016lx.\n", __FILE__, __LINE__, pte_val(e))
#ifndef __PAGETABLE_PMD_FOLDED
@@ -378,12 +375,7 @@ static inline void set_pte(pte_t *ptep, pte_t pteval)
#endif
}
-static inline void pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep)
-{
- pte_t pte = ptep_get(ptep);
- pte_val(pte) &= _PAGE_GLOBAL;
- set_pte(ptep, pte);
-}
+void pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep);
#define PGD_T_LOG2 (__builtin_ffs(sizeof(pgd_t)) - 1)
#define PMD_T_LOG2 (__builtin_ffs(sizeof(pmd_t)) - 1)
@@ -618,16 +610,8 @@ static inline pmd_t pmd_mkinvalid(pmd_t pmd)
* different prototype.
*/
#define __HAVE_ARCH_PMDP_HUGE_GET_AND_CLEAR
-static inline pmd_t pmdp_huge_get_and_clear(struct mm_struct *mm,
- unsigned long address, pmd_t *pmdp)
-{
- pmd_t old = pmdp_get(pmdp);
-
- pmd_clear(pmdp);
-
- return old;
-}
+pmd_t pmdp_huge_get_and_clear(struct mm_struct *mm, unsigned long address, pmd_t *pmdp);
#endif /* CONFIG_TRANSPARENT_HUGEPAGE */
#ifdef CONFIG_ARCH_HAS_PTE_PROTNONE
diff --git a/arch/loongarch/mm/init.c b/arch/loongarch/mm/init.c
index 4b46c5d30708d..5751b3bcca994 100644
--- a/arch/loongarch/mm/init.c
+++ b/arch/loongarch/mm/init.c
@@ -266,3 +266,22 @@ struct execmem_info __init *execmem_arch_setup(void)
return &execmem_info;
}
#endif /* CONFIG_EXECMEM && MODULES_VADDR */
+
+void pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep)
+{
+ pte_t pte = ptep_get(ptep);
+
+ pte_val(pte) &= _PAGE_GLOBAL;
+ set_pte(ptep, pte);
+}
+
+#ifdef CONFIG_TRANSPARENT_HUGEPAGE
+pmd_t pmdp_huge_get_and_clear(struct mm_struct *mm, unsigned long address, pmd_t *pmdp)
+{
+ pmd_t old = pmdp_get(pmdp);
+
+ pmd_clear(pmdp);
+
+ return old;
+}
+#endif /* CONFIG_TRANSPARENT_HUGEPAGE */
--
2.43.0
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 3/3] parisc/mm: Drop all pxdp_get()
2026-09-23 4:32 [PATCH 0/3] arch/mm: Drop similar platform overrides for pxdp_get() Anshuman Khandual
2026-09-23 4:32 ` [PATCH 1/3] s390/mm: Drop all pxdp_get() Anshuman Khandual
2026-09-23 4:32 ` [PATCH 2/3] loongarch/mm: " Anshuman Khandual
@ 2026-09-23 4:32 ` Anshuman Khandual
2 siblings, 0 replies; 8+ messages in thread
From: Anshuman Khandual @ 2026-09-23 4:32 UTC (permalink / raw)
To: linux-mm
Cc: Anshuman Khandual, David Hildenbrand, Andrew Morton,
Alexander Gordeev, Gerald Schaefer, Huacai Chen, WANG Xuerui,
Helge Deller, loongarch, linux-s390, linux-parisc, linux-kernel
Current platform specific pxdp_get() helpers are exact same as the default
ones defined in the generic MM header (include/linux/pgtable.h) thus making
them redundant. Move functions that are now depending on generic helpers to
avoid build failure.
Cc: “James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
Cc: Helge Deller <deller@gmx.de>
Cc: linux-parisc@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-mm@kvack.org
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
---
arch/parisc/include/asm/pgtable.h | 20 +-------------------
arch/parisc/mm/init.c | 13 +++++++++++++
2 files changed, 14 insertions(+), 19 deletions(-)
diff --git a/arch/parisc/include/asm/pgtable.h b/arch/parisc/include/asm/pgtable.h
index 467b8547ac8bf..975aa283b4c13 100644
--- a/arch/parisc/include/asm/pgtable.h
+++ b/arch/parisc/include/asm/pgtable.h
@@ -432,25 +432,7 @@ static inline pte_t pte_swp_clear_exclusive(pte_t pte)
return pte;
}
-static inline pte_t ptep_get(pte_t *ptep)
-{
- return READ_ONCE(*ptep);
-}
-#define ptep_get ptep_get
-
-static inline bool ptep_test_and_clear_young(struct vm_area_struct *vma,
- unsigned long addr, pte_t *ptep)
-{
- pte_t pte;
-
- pte = ptep_get(ptep);
- if (!pte_young(pte)) {
- return false;
- }
- set_pte_at(vma->vm_mm, addr, ptep, pte_mkold(pte));
- return true;
-}
-
+bool ptep_test_and_clear_young(struct vm_area_struct *vma, unsigned long addr, pte_t *ptep);
bool ptep_clear_flush_young(struct vm_area_struct *vma, unsigned long addr, pte_t *ptep);
pte_t ptep_clear_flush(struct vm_area_struct *vma, unsigned long addr, pte_t *ptep);
diff --git a/arch/parisc/mm/init.c b/arch/parisc/mm/init.c
index be3380c9bcdae..3da7d8def9435 100644
--- a/arch/parisc/mm/init.c
+++ b/arch/parisc/mm/init.c
@@ -992,3 +992,16 @@ struct execmem_info __init *execmem_arch_setup(void)
return &execmem_info;
}
#endif /* CONFIG_EXECMEM */
+
+bool ptep_test_and_clear_young(struct vm_area_struct *vma,
+ unsigned long addr, pte_t *ptep)
+{
+ pte_t pte;
+
+ pte = ptep_get(ptep);
+ if (!pte_young(pte))
+ return false;
+
+ set_pte_at(vma->vm_mm, addr, ptep, pte_mkold(pte));
+ return true;
+}
--
2.43.0
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/3] s390/mm: Drop all pxdp_get()
2026-09-23 4:32 ` [PATCH 1/3] s390/mm: Drop all pxdp_get() Anshuman Khandual
@ 2026-09-23 9:16 ` Heiko Carstens
2026-09-23 12:12 ` Anshuman Khandual
0 siblings, 1 reply; 8+ messages in thread
From: Heiko Carstens @ 2026-09-23 9:16 UTC (permalink / raw)
To: Anshuman Khandual
Cc: linux-mm, David Hildenbrand, Andrew Morton, Alexander Gordeev,
Gerald Schaefer, Huacai Chen, WANG Xuerui, Helge Deller,
loongarch, linux-s390, linux-parisc, linux-kernel
On Wed, Sep 23, 2026 at 10:02:20AM +0530, Anshuman Khandual wrote:
> Current platform specific pxdp_get() helpers are exact same as the default
> ones defined in the generic MM header (include/linux/pgtable.h) thus making
> them redundant. Just add required forward declarations.
>
> Cc: Alexander Gordeev <agordeev@linux.ibm.com>
> Cc: Gerald Schaefer <gerald.schaefer@linux.ibm.com>
> Cc: linux-s390@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> Cc: linux-mm@kvack.org
> Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
> ---
> arch/s390/include/asm/pgtable.h | 35 +++++----------------------------
> 1 file changed, 5 insertions(+), 30 deletions(-)
>
> diff --git a/arch/s390/include/asm/pgtable.h b/arch/s390/include/asm/pgtable.h
> index e882663a58e77..0a0b0ec42b624 100644
> --- a/arch/s390/include/asm/pgtable.h
> +++ b/arch/s390/include/asm/pgtable.h
> @@ -25,6 +25,11 @@
> #include <asm/page.h>
> #include <asm/uv.h>
>
> +static inline pte_t ptep_get(const pte_t *ptep);
> +static inline pud_t pudp_get(const pud_t *pudp);
> +static inline p4d_t p4dp_get(const p4d_t *p4dp);
> +static inline pgd_t pgdp_get(const pgd_t *pgdp);
> +
> extern pgd_t swapper_pg_dir[];
> extern pgd_t invalid_pg_dir[];
> extern void paging_init(void);
> @@ -985,36 +990,6 @@ static inline void set_pte(pte_t *ptep, pte_t pte)
> WRITE_ONCE(*ptep, pte);
> }
>
> -#define ptep_get ptep_get
> -static inline pte_t ptep_get(pte_t *ptep)
> -{
> - return READ_ONCE(*ptep);
> -}
As reported by Sashiko, this results in a compile error due to conflicting
types; but I don't see too much value with this patch if a forward declaration
of the common code implementation needs to be added instead. Looks like s390
would be the only architecture which would have that.
Besides that the s390 implementation of ptep_get() will be filled with
more content "soon", when Alexander's lazy mmu work will be merged.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/3] s390/mm: Drop all pxdp_get()
2026-09-23 9:16 ` Heiko Carstens
@ 2026-09-23 12:12 ` Anshuman Khandual
2026-09-23 14:32 ` Heiko Carstens
0 siblings, 1 reply; 8+ messages in thread
From: Anshuman Khandual @ 2026-09-23 12:12 UTC (permalink / raw)
To: Heiko Carstens
Cc: linux-mm, David Hildenbrand, Andrew Morton, Alexander Gordeev,
Gerald Schaefer, Huacai Chen, WANG Xuerui, Helge Deller,
loongarch, linux-s390, linux-parisc, linux-kernel
On Wed, Sep 23, 2026 at 11:16:29AM +0200, Heiko Carstens wrote:
> On Wed, Sep 23, 2026 at 10:02:20AM +0530, Anshuman Khandual wrote:
> > Current platform specific pxdp_get() helpers are exact same as the default
> > ones defined in the generic MM header (include/linux/pgtable.h) thus making
> > them redundant. Just add required forward declarations.
> >
> > Cc: Alexander Gordeev <agordeev@linux.ibm.com>
> > Cc: Gerald Schaefer <gerald.schaefer@linux.ibm.com>
> > Cc: linux-s390@vger.kernel.org
> > Cc: linux-kernel@vger.kernel.org
> > Cc: linux-mm@kvack.org
> > Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
> > ---
> > arch/s390/include/asm/pgtable.h | 35 +++++----------------------------
> > 1 file changed, 5 insertions(+), 30 deletions(-)
> >
> > diff --git a/arch/s390/include/asm/pgtable.h b/arch/s390/include/asm/pgtable.h
> > index e882663a58e77..0a0b0ec42b624 100644
> > --- a/arch/s390/include/asm/pgtable.h
> > +++ b/arch/s390/include/asm/pgtable.h
> > @@ -25,6 +25,11 @@
> > #include <asm/page.h>
> > #include <asm/uv.h>
> >
> > +static inline pte_t ptep_get(const pte_t *ptep);
> > +static inline pud_t pudp_get(const pud_t *pudp);
> > +static inline p4d_t p4dp_get(const p4d_t *p4dp);
> > +static inline pgd_t pgdp_get(const pgd_t *pgdp);
> > +
> > extern pgd_t swapper_pg_dir[];
> > extern pgd_t invalid_pg_dir[];
> > extern void paging_init(void);
> > @@ -985,36 +990,6 @@ static inline void set_pte(pte_t *ptep, pte_t pte)
> > WRITE_ONCE(*ptep, pte);
> > }
> >
> > -#define ptep_get ptep_get
> > -static inline pte_t ptep_get(pte_t *ptep)
> > -{
> > - return READ_ONCE(*ptep);
> > -}
>
> As reported by Sashiko, this results in a compile error due to conflicting
> types; but I don't see too much value with this patch if a forward declaration
> of the common code implementation needs to be added instead. Looks like s390
> would be the only architecture which would have that.
We could move pxdp_get() caller functions from this header inside C files
like other platform changes proposed here. Would that be better instead ?
>
> Besides that the s390 implementation of ptep_get() will be filled with
> more content "soon", when Alexander's lazy mmu work will be merged.
Hmm, okay. I don't have strong opinion either way.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/3] s390/mm: Drop all pxdp_get()
2026-09-23 12:12 ` Anshuman Khandual
@ 2026-09-23 14:32 ` Heiko Carstens
0 siblings, 0 replies; 8+ messages in thread
From: Heiko Carstens @ 2026-09-23 14:32 UTC (permalink / raw)
To: Anshuman Khandual
Cc: linux-mm, David Hildenbrand, Andrew Morton, Alexander Gordeev,
Gerald Schaefer, Huacai Chen, WANG Xuerui, Helge Deller,
loongarch, linux-s390, linux-parisc, linux-kernel
On Wed, Sep 23, 2026 at 05:42:00PM +0530, Anshuman Khandual wrote:
> On Wed, Sep 23, 2026 at 11:16:29AM +0200, Heiko Carstens wrote:
> > On Wed, Sep 23, 2026 at 10:02:20AM +0530, Anshuman Khandual wrote:
> > > +static inline pte_t ptep_get(const pte_t *ptep);
> > > +static inline pud_t pudp_get(const pud_t *pudp);
> > > +static inline p4d_t p4dp_get(const p4d_t *p4dp);
> > > +static inline pgd_t pgdp_get(const pgd_t *pgdp);
...
> > > -#define ptep_get ptep_get
> > > -static inline pte_t ptep_get(pte_t *ptep)
> > > -{
> > > - return READ_ONCE(*ptep);
> > > -}
> >
> > As reported by Sashiko, this results in a compile error due to conflicting
> > types; but I don't see too much value with this patch if a forward declaration
> > of the common code implementation needs to be added instead. Looks like s390
> > would be the only architecture which would have that.
>
> We could move pxdp_get() caller functions from this header inside C files
> like other platform changes proposed here. Would that be better instead ?
That would make pud_clear() & friends real functions calls instead of being
inlined. Function calls are more expensive, so I would like to avoid that.
I would prefer to drop this patch.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/3] s390/mm: Drop all pxdp_get()
2026-09-19 10:13 [PATCH 0/3] arch/mm: Drop similar platform overrides for pxdp_get() Anshuman Khandual
@ 2026-09-19 10:13 ` Anshuman Khandual
0 siblings, 0 replies; 8+ messages in thread
From: Anshuman Khandual @ 2026-09-19 10:13 UTC (permalink / raw)
To: linux-mm
Cc: Anshuman Khandual, David Hildenbrand, Andrew Morton,
Alexander Gordeev, Gerald Schaefer, Huacai Chen, WANG Xuerui,
Helge Deller, loongarch, linux-s390, linux-parisc, linux-kernel
Current platform specific pxdp_get() helpers are exact same as the default
ones defined in the generic MM header (include/linux/pgtable.h) thus making
them redundant. Just add required forward declarations.
Cc: Alexander Gordeev <agordeev@linux.ibm.com>
Cc: Gerald Schaefer <gerald.schaefer@linux.ibm.com>
Cc: linux-s390@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-mm@kvack.org
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
---
arch/s390/include/asm/pgtable.h | 35 +++++----------------------------
1 file changed, 5 insertions(+), 30 deletions(-)
diff --git a/arch/s390/include/asm/pgtable.h b/arch/s390/include/asm/pgtable.h
index 859ce7c7d4544..6aaa7f7ae5a0f 100644
--- a/arch/s390/include/asm/pgtable.h
+++ b/arch/s390/include/asm/pgtable.h
@@ -25,6 +25,11 @@
#include <asm/page.h>
#include <asm/uv.h>
+static inline pte_t ptep_get(const pte_t *ptep);
+static inline pud_t pudp_get(const pud_t *pudp);
+static inline p4d_t p4dp_get(const p4d_t *p4dp);
+static inline pgd_t pgdp_get(const pgd_t *pgdp);
+
extern pgd_t swapper_pg_dir[];
extern pgd_t invalid_pg_dir[];
extern void paging_init(void);
@@ -985,36 +990,6 @@ static inline void set_pte(pte_t *ptep, pte_t pte)
WRITE_ONCE(*ptep, pte);
}
-#define ptep_get ptep_get
-static inline pte_t ptep_get(pte_t *ptep)
-{
- return READ_ONCE(*ptep);
-}
-
-#define pmdp_get pmdp_get
-static inline pmd_t pmdp_get(pmd_t *pmdp)
-{
- return READ_ONCE(*pmdp);
-}
-
-#define pudp_get pudp_get
-static inline pud_t pudp_get(pud_t *pudp)
-{
- return READ_ONCE(*pudp);
-}
-
-#define p4dp_get p4dp_get
-static inline p4d_t p4dp_get(p4d_t *p4dp)
-{
- return READ_ONCE(*p4dp);
-}
-
-#define pgdp_get pgdp_get
-static inline pgd_t pgdp_get(pgd_t *pgdp)
-{
- return READ_ONCE(*pgdp);
-}
-
static inline void pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep)
{
set_pte(ptep, __pte(_PAGE_INVALID));
--
2.43.0
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2026-09-23 14:33 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-23 4:32 [PATCH 0/3] arch/mm: Drop similar platform overrides for pxdp_get() Anshuman Khandual
2026-09-23 4:32 ` [PATCH 1/3] s390/mm: Drop all pxdp_get() Anshuman Khandual
2026-09-23 9:16 ` Heiko Carstens
2026-09-23 12:12 ` Anshuman Khandual
2026-09-23 14:32 ` Heiko Carstens
2026-09-23 4:32 ` [PATCH 2/3] loongarch/mm: " Anshuman Khandual
2026-09-23 4:32 ` [PATCH 3/3] parisc/mm: " Anshuman Khandual
-- strict thread matches above, loose matches on Subject: below --
2026-09-19 10:13 [PATCH 0/3] arch/mm: Drop similar platform overrides for pxdp_get() Anshuman Khandual
2026-09-19 10:13 ` [PATCH 1/3] s390/mm: Drop all pxdp_get() Anshuman Khandual
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®