linux/arch/riscv
Niklas Cassel 8810d7feee
riscv: Don't output a bogus mmu-type on a no MMU kernel
Currently on a 64-bit kernel built without CONFIG_MMU, /proc/cpuinfo will
show the current MMU mode as sv57.

While the device tree property "mmu-type" does have a value "riscv,none" to
describe a CPU without a MMU, since commit 73c7c8f68e ("riscv: Use
pgtable_l4_enabled to output mmu_type in cpuinfo"), we no longer rely on
device tree to output the MMU mode. (Not even for CONFIG_32BIT.)

Therefore, instead of readding code to look at the "mmu-type" device tree
property, let's continue with the existing convention to use fixed values
for configurations where we don't determine the MMU mode at runtime.

Add a new fixed value for !CONFIG_MMU in order to output the correct
MMU mode in cpuinfo.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Link: https://lore.kernel.org/r/20220414173037.1381927-1-niklas.cassel@wdc.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
2022-05-21 12:20:04 -07:00
..
boot riscv: dts: rename the node name of dma 2022-04-20 17:37:43 -07:00
configs RISC-V: K210 defconfigs: Drop redundant MEMBARRIER=n 2022-03-31 17:19:27 -07:00
errata riscv: add memory-type errata for T-Head 2022-05-11 21:36:33 -07:00
include riscv: atomic: Add custom conditional atomic operation implementation 2022-05-21 10:31:47 -07:00
kernel riscv: Don't output a bogus mmu-type on a no MMU kernel 2022-05-21 12:20:04 -07:00
kvm RISC-V: KVM: Implement SBI HSM suspend call 2022-03-11 19:02:39 +05:30
lib riscv: Fixed misaligned memory access. Fixed pointer comparison. 2022-03-10 10:24:04 -08:00
mm riscv: support for Svpbmt and D1 memory types 2022-05-12 09:12:09 -07:00
net riscv: bpf: Fix eBPF's exception tables 2022-01-19 10:50:02 -08:00
purgatory RISC-V: Add purgatory 2022-05-19 12:18:59 -07:00
Kbuild RISC-V: Add purgatory 2022-05-19 12:18:59 -07:00
Kconfig asm-generic: New generic ticket-based spinlock 2022-05-20 10:14:08 -07:00
Kconfig.debug RISC-V: Remove EARLY_PRINTK support 2018-12-17 10:23:46 -08:00
Kconfig.erratas riscv: add memory-type errata for T-Head 2022-05-11 21:36:33 -07:00
Kconfig.socs riscv: integrate alternatives better into the main architecture 2022-05-11 21:36:31 -07:00
Makefile RISC-V: Add support for rv32 userspace via COMPAT 2022-05-19 09:51:59 -07:00