diff mbox series

[3/4] MIPS: use 3-level pgtable for 64KB page size on MIPS_VA_BITS_48

Message ID 20211125105949.27147-4-huangpei@loongson.cn (mailing list archive)
State Accepted
Headers show
Series [1/4] MIPS: rework local_t operation on MIPS64 | expand

Commit Message

Huang Pei Nov. 25, 2021, 10:59 a.m. UTC
It hangup when booting Loongson 3A1000 with BOTH
CONFIG_PAGE_SIZE_64KB and CONFIG_MIPS_VA_BITS_48, that it turn
out to use 2-level pgtable instead of 3-level. 64KB page size
with 2-level pgtable only cover 42 bits VA, use 3-level pgtable
to cover all 48 bits VA(55 bits)

Fixes: 1e321fa917fb ("MIPS64: Support of at least 48 bits of SEGBITS)
Signed-off-by: Huang Pei <huangpei@loongson.cn>
---
 arch/mips/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Thomas Bogendoerfer Nov. 25, 2021, 3:55 p.m. UTC | #1
On Thu, Nov 25, 2021 at 06:59:48PM +0800, Huang Pei wrote:
> It hangup when booting Loongson 3A1000 with BOTH
> CONFIG_PAGE_SIZE_64KB and CONFIG_MIPS_VA_BITS_48, that it turn
> out to use 2-level pgtable instead of 3-level. 64KB page size
> with 2-level pgtable only cover 42 bits VA, use 3-level pgtable
> to cover all 48 bits VA(55 bits)
> 
> Fixes: 1e321fa917fb ("MIPS64: Support of at least 48 bits of SEGBITS)
> Signed-off-by: Huang Pei <huangpei@loongson.cn>
> ---
>  arch/mips/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
> index de60ad190057..0215dc1529e9 100644
> --- a/arch/mips/Kconfig
> +++ b/arch/mips/Kconfig
> @@ -3097,7 +3097,7 @@ config STACKTRACE_SUPPORT
>  config PGTABLE_LEVELS
>  	int
>  	default 4 if PAGE_SIZE_4KB && MIPS_VA_BITS_48
> -	default 3 if 64BIT && !PAGE_SIZE_64KB
> +	default 3 if 64BIT && (!PAGE_SIZE_64KB || MIPS_VA_BITS_48)
>  	default 2
>  
>  config MIPS_AUTO_PFN_OFFSET
> -- 
> 2.20.1

applied to mips-fixes.

Thomas.
diff mbox series

Patch

diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index de60ad190057..0215dc1529e9 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -3097,7 +3097,7 @@  config STACKTRACE_SUPPORT
 config PGTABLE_LEVELS
 	int
 	default 4 if PAGE_SIZE_4KB && MIPS_VA_BITS_48
-	default 3 if 64BIT && !PAGE_SIZE_64KB
+	default 3 if 64BIT && (!PAGE_SIZE_64KB || MIPS_VA_BITS_48)
 	default 2
 
 config MIPS_AUTO_PFN_OFFSET