]> www.infradead.org Git - users/jedix/linux-maple.git/commit
arm64/mm: Check PUD_TYPE_TABLE in pud_bad()
authorRyan Roberts <ryan.roberts@arm.com>
Fri, 21 Feb 2025 04:42:25 +0000 (10:12 +0530)
committerCatalin Marinas <catalin.marinas@arm.com>
Wed, 12 Mar 2025 12:21:00 +0000 (12:21 +0000)
commitbfb1d2b9021c21891427acc86eb848ccedeb274e
tree3b7cd8db1c2f67d500f7f2b9b69fbd31948292be
parent4fa8a9c0fc996fe5cde5f201f33e2c1dba4b5498
arm64/mm: Check PUD_TYPE_TABLE in pud_bad()

pud_bad() is currently defined in terms of pud_table(). Although for some
configs, pud_table() is hard-coded to true i.e. when using 64K base pages
or when page table levels are less than 3.

pud_bad() is intended to check that the pud is configured correctly. Hence
let's open-code the same check that the full version of pud_table() uses
into pud_bad(). Then it always performs the check regardless of the config.

Cc: Will Deacon <will@kernel.org>
Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: Ryan Roberts <ryan.roberts@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ryan Roberts <ryan.roberts@arm.com>
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
Link: https://lore.kernel.org/r/20250221044227.1145393-7-anshuman.khandual@arm.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/include/asm/pgtable.h