blob: 947bb90d3a400c7598ef2d0f37bab71753244d41 [file] [log] [blame]
From: Baoquan He <bhe@redhat.com>
Subject: mm/pgtable: remove unneeded pgd_devmap()
Date: Mon, 31 Mar 2025 16:13:27 +0800
There's no user of pgd_devmap() now, remove it from all ARCH-es
and linux/pgtable.h.
Link: https://lkml.kernel.org/r/20250331081327.256412-8-bhe@redhat.com
Signed-off-by: Baoquan He <bhe@redhat.com>
Cc: <x86@kernel.org>
Cc: Yanjun.Zhu <yanjun.zhu@linux.dev>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
arch/arm64/include/asm/pgtable.h | 5 -----
arch/loongarch/include/asm/pgtable.h | 1 -
arch/powerpc/include/asm/book3s/64/pgtable.h | 5 -----
arch/riscv/include/asm/pgtable-64.h | 5 -----
arch/x86/include/asm/pgtable.h | 5 -----
include/linux/pgtable.h | 4 ----
6 files changed, 25 deletions(-)
--- a/arch/arm64/include/asm/pgtable.h~mm-pgtable-remove-unneeded-pgd_devmap
+++ a/arch/arm64/include/asm/pgtable.h
@@ -1230,11 +1230,6 @@ static inline int pud_devmap(pud_t pud)
{
return 0;
}
-
-static inline int pgd_devmap(pgd_t pgd)
-{
- return 0;
-}
#endif
#ifdef CONFIG_PAGE_TABLE_CHECK
--- a/arch/loongarch/include/asm/pgtable.h~mm-pgtable-remove-unneeded-pgd_devmap
+++ a/arch/loongarch/include/asm/pgtable.h
@@ -615,7 +615,6 @@ static inline long pmd_protnone(pmd_t pm
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
#define pud_devmap(pud) (0)
-#define pgd_devmap(pgd) (0)
#endif /* CONFIG_TRANSPARENT_HUGEPAGE */
/*
--- a/arch/powerpc/include/asm/book3s/64/pgtable.h~mm-pgtable-remove-unneeded-pgd_devmap
+++ a/arch/powerpc/include/asm/book3s/64/pgtable.h
@@ -1405,11 +1405,6 @@ static inline int pud_devmap(pud_t pud)
{
return pte_devmap(pud_pte(pud));
}
-
-static inline int pgd_devmap(pgd_t pgd)
-{
- return 0;
-}
#endif /* CONFIG_TRANSPARENT_HUGEPAGE */
#define __HAVE_ARCH_PTEP_MODIFY_PROT_TRANSACTION
--- a/arch/riscv/include/asm/pgtable-64.h~mm-pgtable-remove-unneeded-pgd_devmap
+++ a/arch/riscv/include/asm/pgtable-64.h
@@ -411,11 +411,6 @@ static inline int pud_devmap(pud_t pud)
{
return 0;
}
-
-static inline int pgd_devmap(pgd_t pgd)
-{
- return 0;
-}
#endif
#endif /* _ASM_RISCV_PGTABLE_64_H */
--- a/arch/x86/include/asm/pgtable.h~mm-pgtable-remove-unneeded-pgd_devmap
+++ a/arch/x86/include/asm/pgtable.h
@@ -361,11 +361,6 @@ static inline pud_t pud_mkspecial(pud_t
return pud_set_flags(pud, _PAGE_SPECIAL);
}
#endif /* CONFIG_ARCH_SUPPORTS_PUD_PFNMAP */
-
-static inline int pgd_devmap(pgd_t pgd)
-{
- return 0;
-}
#endif
#endif /* CONFIG_TRANSPARENT_HUGEPAGE */
--- a/include/linux/pgtable.h~mm-pgtable-remove-unneeded-pgd_devmap
+++ a/include/linux/pgtable.h
@@ -1633,10 +1633,6 @@ static inline int pud_devmap(pud_t pud)
{
return 0;
}
-static inline int pgd_devmap(pgd_t pgd)
-{
- return 0;
-}
#endif
#if !defined(CONFIG_TRANSPARENT_HUGEPAGE) || \
_