Anup Patel d5fdade933
RISC-V: mm: Fix set_satp_mode() for platform not having Sv57
When Sv57 is not available the satp.MODE test in set_satp_mode() will
fail and lead to pgdir re-programming for Sv48. The pgdir re-programming
will fail as well due to pre-existing pgdir entry used for Sv57 and as
a result kernel fails to boot on RISC-V platform not having Sv57.

To fix above issue, we should clear the pgdir memory in set_satp_mode()
before re-programming.

Fixes: 011f09d12052 ("riscv: mm: Set sv57 on defaultly")
Reported-by: Mayuresh Chitale <mchitale@ventanamicro.com>
Signed-off-by: Anup Patel <apatel@ventanamicro.com>
Reviewed-by: Atish Patra <atishp@rivosinc.com>
Cc: stable@vger.kernel.org
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
2022-04-21 15:10:39 -07:00
..
2022-03-28 17:29:53 -07:00
2022-04-03 10:17:48 -07:00
2022-04-01 13:21:19 -07:00
2022-03-28 17:29:53 -07:00
2022-03-28 17:29:53 -07:00
2022-03-31 11:59:03 -07:00
2022-04-02 12:14:38 -07:00
2022-03-28 17:29:53 -07:00
2022-03-28 17:29:53 -07:00
2022-03-31 11:59:03 -07:00
2022-03-31 11:59:03 -07:00
2022-04-02 12:33:31 -07:00
2022-04-03 12:15:47 -07:00
2022-03-31 11:59:03 -07:00