linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm64: fix ARM64_USER_VA_BITS_52 builds
@ 2018-12-11 14:08 Arnd Bergmann
  2018-12-11 14:18 ` Will Deacon
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2018-12-11 14:08 UTC (permalink / raw)
  To: Catalin Marinas, Will Deacon
  Cc: Arnd Bergmann, Kristina Martsenko, linux-arm-kernel, linux-kernel

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.

Fixes: 68d23da4373a ("arm64: Kconfig: Re-jig CONFIG options for 52-bit VA")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm64/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index df201d93697d..a0f3b921b6e6 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -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
-- 
2.20.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] arm64: fix ARM64_USER_VA_BITS_52 builds
  2018-12-11 14:08 [PATCH] arm64: fix ARM64_USER_VA_BITS_52 builds Arnd Bergmann
@ 2018-12-11 14:18 ` Will Deacon
  0 siblings, 0 replies; 2+ messages in thread
From: Will Deacon @ 2018-12-11 14:18 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Catalin Marinas, Kristina Martsenko, linux-arm-kernel, linux-kernel

On Tue, Dec 11, 2018 at 03:08:10PM +0100, Arnd Bergmann wrote:
> 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.
> 
> Fixes: 68d23da4373a ("arm64: Kconfig: Re-jig CONFIG options for 52-bit VA")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  arch/arm64/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
> index df201d93697d..a0f3b921b6e6 100644
> --- a/arch/arm64/Kconfig
> +++ b/arch/arm64/Kconfig
> @@ -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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-12-11 14:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-11 14:08 [PATCH] arm64: fix ARM64_USER_VA_BITS_52 builds Arnd Bergmann
2018-12-11 14:18 ` Will Deacon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).