arm64: fix ARM64_USER_VA_BITS_52 builds
PATCH 1/1 arm64: fix ARM64_USER_VA_BITS_52 builds
In some randconfig builds, the new CONFIG_ARM64_USER_VA_BITS_52 triggered a build failure:
arch/arm64/mm/proc.S:287: Error: immediate out of range
As it turns out, we were incorrectly setting PGTABLE_LEVELS here, lacking any other default value.
This fixes the calculation of CONFIG_PGTABLE_LEVELS to consider all combinations again.
--- arch/arm64/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/Kconfig +1 -1
@@ -278,7 +278,7 @@ config PGTABLE_LEVELS int default 2 if ARM64_16K_PAGES && ARM64_VA_BITS_36 default 2 if ARM64_64K_PAGES && ARM64_VA_BITS_42 - default 3 if ARM64_64K_PAGES && ARM64_VA_BITS_48 + default 3 if ARM64_64K_PAGES && (ARM64_VA_BITS_48 || ARM64_USER_VA_BITS_52) default 3 if ARM64_4K_PAGES && ARM64_VA_BITS_39 default 3 if ARM64_16K_PAGES && ARM64_VA_BITS_47 default 4 if !ARM64_64K_PAGES && ARM64_VA_BITS_48
Signature · 1 line
2.20.0
Quoted 21 lines · Arnd Bergmann
In some randconfig builds, the new
CONFIG_ARM64_USER_VA_BITS_52triggered a build failure:
arch/arm64/mm/proc.S:287: Error: immediate out of rangeAs it turns out, we were incorrectly setting
PGTABLE_LEVELShere, lacking any other default value.
This fixes the calculation ofCONFIG_PGTABLE_LEVELSto consider all combinations again.Fixes 68d23da4373a ("arm64: Kconfig: Re-jig CONFIG options for 52-bit VA")Signed-off-by Arnd Bergmann <[email protected]>--- arch/arm64/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/arm64/Kconfig +0
-0
arch/arm64/Kconfig config PGTABLE_LEVELS · line 284
Quoted 8 lines
arch/arm64/Kconfig +1
-1@@ -278,7 +278,7 @@ config PGTABLE_LEVELS int default 2 if ARM64_16K_PAGES && ARM64_VA_BITS_36 default 2 if ARM64_64K_PAGES && ARM64_VA_BITS_42 - default 3 if ARM64_64K_PAGES && ARM64_VA_BITS_48 + default 3 if ARM64_64K_PAGES && (ARM64_VA_BITS_48 || ARM64_USER_VA_BITS_52) default 3 if ARM64_4K_PAGES && ARM64_VA_BITS_39 default 3 if ARM64_16K_PAGES && ARM64_VA_BITS_47 default 4 if !ARM64_64K_PAGES && ARM64_VA_BITS_48
Thanks, Arnd. I'll pick this one up too.
Will