Skip to content

Commit 149f5f6

Browse files
committed
arm64: mm: Drop dead code for pud special bit handling
JIRA: https://issues.redhat.com/browse/RHEL-101059 commit 0fff2aa Author: Peter Xu <peterx@redhat.com> Date: Thu, 20 Mar 2025 14:34:05 -0400 Keith Busch observed some incorrect macros defined in arm64 code [1]. It turns out the two lines should never be needed and won't be exposed to anyone, because aarch64 doesn't select HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD, hence ARCH_SUPPORTS_PUD_PFNMAP is always N. The only archs that support THP PUDs so far are x86 and powerpc. Instead of fixing the lines (with no way to test it..), remove the two lines that are in reality dead code, to avoid confusing readers. Fixes tag is attached to reflect where the wrong macros were introduced, but explicitly not copying stable, because there's no real issue to be fixed. So it's only about removing the dead code so far. [1] https://lore.kernel.org/all/Z9tDjOk-JdV_fCY4@kbusch-mbp.dhcp.thefacebook.com/#t Cc: Alex Williamson <alex.williamson@redhat.com> Cc: Donald Dutile <ddutile@redhat.com> Cc: Will Deacon <will@kernel.org> Fixes: 3e509c9 ("mm/arm64: support large pfn mappings") Reported-by: Keith Busch <kbusch@kernel.org> Signed-off-by: Peter Xu <peterx@redhat.com> Reviewed-by: Donald Dutile <ddutile@redhat.com> Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com> Link: https://lore.kernel.org/r/20250320183405.12659-1-peterx@redhat.com Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Mark Salter <msalter@redhat.com>
1 parent 6bc8fc0 commit 149f5f6

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

arch/arm64/include/asm/pgtable.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -633,11 +633,6 @@ static inline pud_t pud_mkhuge(pud_t pud)
633633
#define pud_pfn(pud) ((__pud_to_phys(pud) & PUD_MASK) >> PAGE_SHIFT)
634634
#define pfn_pud(pfn,prot) __pud(__phys_to_pud_val((phys_addr_t)(pfn) << PAGE_SHIFT) | pgprot_val(prot))
635635

636-
#ifdef CONFIG_ARCH_SUPPORTS_PUD_PFNMAP
637-
#define pud_special(pte) pte_special(pud_pte(pud))
638-
#define pud_mkspecial(pte) pte_pud(pte_mkspecial(pud_pte(pud)))
639-
#endif
640-
641636
#define pmd_pgprot pmd_pgprot
642637
static inline pgprot_t pmd_pgprot(pmd_t pmd)
643638
{

0 commit comments

Comments
 (0)