Anup Patel b91676fc16
RISC-V: Fix MEMREMAP_WB for systems with Svpbmt
Currently, the memremap() called with MEMREMAP_WB maps memory using
the generic ioremap() function which breaks on system with Svpbmt
because memory mapped using _PAGE_IOREMAP page attributes is treated
as strongly-ordered non-cacheable IO memory.

To address this, we implement RISC-V specific arch_memremap_wb()
which maps memory using _PAGE_KERNEL page attributes resulting in
write-back cacheable mapping on systems with Svpbmt.

Fixes: ff689fd21cb1 ("riscv: add RISC-V Svpbmt extension support")
Co-developed-by: Mayuresh Chitale <mchitale@ventanamicro.com>
Signed-off-by: Mayuresh Chitale <mchitale@ventanamicro.com>
Signed-off-by: Anup Patel <apatel@ventanamicro.com>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20221114090536.1662624-2-apatel@ventanamicro.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
2022-12-08 15:43:58 -08:00
..
2022-08-11 08:03:49 -07:00
2022-03-10 09:29:21 -08:00
2022-08-11 14:41:52 -07:00
2022-06-28 20:13:09 +02:00
2021-03-09 20:46:00 -08:00
2022-01-19 17:54:09 -08:00
2022-05-11 11:50:10 -07:00
2020-05-18 11:38:10 -07:00
2021-06-30 20:55:41 -07:00
2022-03-29 14:31:07 -07:00
2022-06-28 13:20:21 +02:00
2022-07-11 09:33:35 +05:30
2021-01-14 15:09:06 -08:00
2020-06-03 20:09:50 -07:00
2021-07-05 20:53:09 -07:00
2022-08-11 14:58:32 -07:00
2021-01-07 19:00:50 -08:00
2021-03-09 18:18:31 -08:00
2022-02-25 09:36:05 +01:00
2021-01-14 15:09:08 -08:00