提交 0430b8db 编写于 作者: H Huang Pei 提交者: Zheng Zengkai

MIPS: use 3-level pgtable for 64KB page size on MIPS_VA_BITS_48

stable inclusion
from stable-v5.10.83
commit 3b6c71c097daff9dd724cd306042045d18fd6b03
bugzilla: 185879 https://gitee.com/openeuler/kernel/issues/I4QUVG

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=3b6c71c097daff9dd724cd306042045d18fd6b03

--------------------------------

[ Upstream commit 41ce097f ]

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: 1e321fa9 ("MIPS64: Support of at least 48 bits of SEGBITS)
Signed-off-by: NHuang Pei <huangpei@loongson.cn>
Signed-off-by: NThomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 0b34649f
...@@ -3186,7 +3186,7 @@ config STACKTRACE_SUPPORT ...@@ -3186,7 +3186,7 @@ config STACKTRACE_SUPPORT
config PGTABLE_LEVELS config PGTABLE_LEVELS
int int
default 4 if PAGE_SIZE_4KB && MIPS_VA_BITS_48 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 default 2
config MIPS_AUTO_PFN_OFFSET config MIPS_AUTO_PFN_OFFSET
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册