Messages in this thread Patch in this message |  | | From | quanyang.wang@windrive ... | Subject | [PATCH] ARM: add BUILD_BUG_ON to check if fixmap range spans multiple pmds | Date | Wed, 20 Oct 2021 13:49:42 +0800 |
| |
From: Quanyang Wang <quanyang.wang@windriver.com>
Not only the early fixmap range, but also the fixmap range should be checked if it spans multiple pmds. When enabling CONFIG_DEBUG_HIGHMEM, some systems which contain up to 16 CPUs will crash.
Signed-off-by: Quanyang Wang <quanyang.wang@windriver.com> --- arch/arm/mm/mmu.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index a4e0060051070..57eed92073a4a 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c @@ -369,6 +369,8 @@ void __init early_fixmap_init(void) */ BUILD_BUG_ON((__fix_to_virt(__end_of_early_ioremap_region) >> PMD_SHIFT) != FIXADDR_TOP >> PMD_SHIFT); + BUILD_BUG_ON((__fix_to_virt(__end_of_fixmap_region) >> PMD_SHIFT) + != FIXADDR_TOP >> PMD_SHIFT); pmd = fixmap_pmd(FIXADDR_TOP); pmd_populate_kernel(&init_mm, pmd, bm_pte); -- 2.25.1
|  |