]> git.baikalelectronics.ru Git - kernel.git/commit
arm64/mm: Add pud_sect_supported()
authorAnshuman Khandual <anshuman.khandual@arm.com>
Mon, 20 Sep 2021 09:29:31 +0000 (14:59 +0530)
committerWill Deacon <will@kernel.org>
Wed, 29 Sep 2021 15:54:33 +0000 (16:54 +0100)
commit2a243c696474200cb595f35cd848fff8654a853b
treea90f0ecfb87f95f31302461333b6c813f27bdaff
parent691ce06168ea26daa7f7ef4f12444760983445c8
arm64/mm: Add pud_sect_supported()

Section mapping at PUD level is supported only on 4K pages and currently it
gets verified with explicit #ifdef or IS_ENABLED() constructs. This adds a
new helper pud_sect_supported() for this purpose, which particularly cleans
up the HugeTLB code path. It updates relevant switch statements with checks
for __PAGETABLE_PMD_FOLDED in order to avoid build failures caused with two
identical switch case values in those code blocks.

Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Suggested-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Link: https://lore.kernel.org/r/1632130171-472-1-git-send-email-anshuman.khandual@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/include/asm/pgtable.h
arch/arm64/include/asm/vmalloc.h
arch/arm64/mm/hugetlbpage.c