[PATCH 8/8] mm: Drop pxd_ERROR()
Anshuman Khandual
anshuman.khandual at arm.com
Thu Oct 8 19:24:15 PDT 2026
On Thu, Oct 08, 2026 at 11:20:14AM +0200, Andreas Larsson wrote:
> On 2026-08-31 07:43, Anshuman Khandual wrote:
> > There are no more users left for any pxd_ERROR() either in generic MM or in
> > the platform MM. Hence all these platform macros along with their generic
> > fallback could be dropped across the tree.
> >
> > Cc: linux-alpha at vger.kernel.org
> > Cc: linux-snps-arc at lists.infradead.org
> > Cc: linux-arm-kernel at lists.infradead.org
> > Cc: linux-csky at vger.kernel.org
> > Cc: linux-hexagon at vger.kernel.org
> > Cc: loongarch at lists.linux.dev
> > Cc: linux-m68k at lists.linux-m68k.org
> > Cc: linux-mips at vger.kernel.org
> > Cc: linux-openrisc at vger.kernel.org
> > Cc: linux-parisc at vger.kernel.org
> > Cc: linuxppc-dev at lists.ozlabs.org
> > Cc: linux-riscv at lists.infradead.org
> > Cc: linux-s390 at vger.kernel.org
> > Cc: linux-sh at vger.kernel.org
> > Cc: sparclinux at vger.kernel.org
> > Cc: linux-um at lists.infradead.org
> > Cc: linux-arch at vger.kernel.org
> > Cc: linux-mm at kvack.org
> > Cc: linux-kernel at vger.kernel.org
> > Acked-by: Geert Uytterhoeven <geert at linux-m68k.org> # m68k
> > Acked-by: David Hildenbrand (Arm) <david at kernel.org>
> > Acked-by: Mike Rapoport (Microsoft) <rppt at kernel.org>
> > Signed-off-by: Anshuman Khandual <anshuman.khandual at arm.com>
> ...> /*
> > * Encode/decode swap entries and swap PTEs. Swap PTEs are all PTEs that
> > * are !pte_none() && !pte_present().
> > diff --git a/arch/sparc/include/asm/pgtable_32.h b/arch/sparc/include/asm/pgtable_32.h
> > index f89b1250661d..5a5f54a090f5 100644
> > --- a/arch/sparc/include/asm/pgtable_32.h
> > +++ b/arch/sparc/include/asm/pgtable_32.h
> > @@ -40,9 +40,6 @@ void load_mmu(void);
> > unsigned long calc_highpages(void);
> > unsigned long __init bootmem_init(unsigned long *pages_avail);
> >
> > -#define pte_ERROR(e) __builtin_trap()
> > -#define pmd_ERROR(e) __builtin_trap()
> > -#define pgd_ERROR(e) __builtin_trap()
> >
> > #define PTRS_PER_PTE 64
> > #define PTRS_PER_PMD 64
> > diff --git a/arch/sparc/include/asm/pgtable_64.h b/arch/sparc/include/asm/pgtable_64.h
> > index 0837ebbc5dce..44d1333065a6 100644
> > --- a/arch/sparc/include/asm/pgtable_64.h
> > +++ b/arch/sparc/include/asm/pgtable_64.h
> > @@ -96,16 +96,6 @@ bool kern_addr_valid(unsigned long addr);
> > #define PTRS_PER_PUD (1UL << PUD_BITS)
> > #define PTRS_PER_PGD (1UL << PGDIR_BITS)
> >
> > -#define pmd_ERROR(e) \
> > - pr_err("%s:%d: bad pmd %p(%016lx) seen at (%pS)\n", \
> > - __FILE__, __LINE__, &(e), pmd_val(e), __builtin_return_address(0))
> > -#define pud_ERROR(e) \
> > - pr_err("%s:%d: bad pud %p(%016lx) seen at (%pS)\n", \
> > - __FILE__, __LINE__, &(e), pud_val(e), __builtin_return_address(0))
> > -#define pgd_ERROR(e) \
> > - pr_err("%s:%d: bad pgd %p(%016lx) seen at (%pS)\n", \
> > - __FILE__, __LINE__, &(e), pgd_val(e), __builtin_return_address(0))
> > -
> > #endif /* !(__ASSEMBLER__) */
>
> Perhaps a bit of a pity to lose the printing of the address of the pxd
> that a number of architectures did before this series, but i have no
> strong opinion.
>
> Acked-by: Andreas Larsson <andreas at gaisler.com> # sparc
Thanks Andreas.
More information about the linux-arm-kernel
mailing list