]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
arm64: mm: Use generic enum pgtable_level
authorKevin Brodsky <kevin.brodsky@arm.com>
Wed, 18 Mar 2026 09:25:43 +0000 (09:25 +0000)
committerCatalin Marinas <catalin.marinas@arm.com>
Wed, 1 Apr 2026 17:20:12 +0000 (18:20 +0100)
commit5e0deb0a6b4e07825c3b1c4317c5e413421266ed
tree501bc198bbf84ad3b6ec33ae9e1592a1fe5f0b26
parent3ce8f5860ff478d23af87bd459e76e466b483af3
arm64: mm: Use generic enum pgtable_level

enum pgtable_type was introduced for arm64 by commit c64f46ee1377
("arm64: mm: use enum to identify pgtable level instead of
*_SHIFT"). In the meantime, the generic enum pgtable_level got
introduced by commit b22cc9a9c7ff ("mm/rmap: convert "enum
rmap_level" to "enum pgtable_level"").

Let's switch to the generic enum pgtable_level. The only difference
is that it also includes PGD level; __pgd_pgtable_alloc() isn't
expected to create PGD tables so we add a VM_WARN_ON() for that
case.

Suggested-by: David Hildenbrand (Arm) <david@kernel.org>
Reviewed-by: David Hildenbrand (Arm) <david@kernel.org>
Reviewed-by: Ryan Roberts <ryan.roberts@arm.com>
Signed-off-by: Kevin Brodsky <kevin.brodsky@arm.com>
Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/include/asm/mmu.h
arch/arm64/mm/mmu.c