mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 06:44:00 -04:00
riscv: mm: Return intended SATP mode for noXlvl options
Change the return value of match_noXlvl() to return the SATP mode that will be used, rather than the mode being disabled. This enables unified logic for return value judgement with the function that obtains mmu-type from the fdt, avoiding extra conversion. This only changes the naming, with no functional impact. Signed-off-by: Junhui Liu <junhui.liu@pigmoral.tech> Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com> Reviewed-by: Nutty Liu <liujingqi@lanxincomputing.com> Link: https://lore.kernel.org/r/20250722-satp-from-fdt-v1-1-5ba22218fa5f@pigmoral.tech Signed-off-by: Paul Walmsley <pjw@kernel.org>
This commit is contained in:
committed by
Paul Walmsley
parent
4d4a3cc7f2
commit
f3243bed39
@@ -864,9 +864,9 @@ static __init void set_satp_mode(uintptr_t dtb_pa)
|
||||
|
||||
kernel_map.page_offset = PAGE_OFFSET_L5;
|
||||
|
||||
if (satp_mode_cmdline == SATP_MODE_57) {
|
||||
if (satp_mode_cmdline == SATP_MODE_48) {
|
||||
disable_pgtable_l5();
|
||||
} else if (satp_mode_cmdline == SATP_MODE_48) {
|
||||
} else if (satp_mode_cmdline == SATP_MODE_39) {
|
||||
disable_pgtable_l5();
|
||||
disable_pgtable_l4();
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user