linux/arch
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
..
alpha Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2022-04-01 19:57:03 -07:00
arc ptrace: Cleanups for v5.18 2022-03-28 17:29:53 -07:00
arm ARM fixes for 5.18-rc1: 2022-04-03 10:17:48 -07:00
arm64 asm-generic: compat: Cleanup duplicate definitions 2022-04-26 13:35:54 -07:00
csky csky: Move to generic ticket-spinlock 2022-05-11 11:50:15 -07:00
h8300 Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2022-04-01 19:57:03 -07:00
hexagon ptrace: Cleanups for v5.18 2022-03-28 17:29:53 -07:00
ia64 Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2022-04-01 19:57:03 -07:00
m68k Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2022-04-01 19:57:03 -07:00
microblaze Kbuild updates for v5.18 2022-03-31 11:59:03 -07:00
mips asm-generic: compat: Cleanup duplicate definitions 2022-04-26 13:35:54 -07:00
nios2 ptrace: Cleanups for v5.18 2022-03-28 17:29:53 -07:00
openrisc openrisc: Move to ticket-spinlock 2022-05-11 11:50:00 -07:00
parisc asm-generic: compat: Cleanup duplicate definitions 2022-04-26 13:35:54 -07:00
powerpc asm-generic: compat: Cleanup duplicate definitions 2022-04-26 13:35:54 -07:00
riscv riscv: Don't output a bogus mmu-type on a no MMU kernel 2022-05-21 12:20:04 -07:00
s390 asm-generic: compat: Cleanup duplicate definitions 2022-04-26 13:35:54 -07:00
sh Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2022-04-01 19:57:03 -07:00
sparc asm-generic: compat: Cleanup duplicate definitions 2022-04-26 13:35:54 -07:00
um Kbuild fixes for v5.18 2022-04-02 12:33:31 -07:00
x86 asm-generic: compat: Cleanup duplicate definitions 2022-04-26 13:35:54 -07:00
xtensa Kbuild updates for v5.18 2022-03-31 11:59:03 -07:00
.gitignore
Kconfig Networking fixes for 5.18-rc1 and rethook patches. 2022-03-31 11:23:31 -07:00