Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

MIPS: Don't use RI/XI with 32-bit kernels on 64-bit CPUs

The TLB handlers cannot handle this case, so disable it for now.

Signed-off-by: David Daney <david.daney@cavium.com>
Signed-off-by: Andreas Herrmann <andreas.herrmann@caviumnetworks.com>
Cc: linux-mips@linux-mips.org
Cc: James Hogan <james.hogan@imgtec.com>
Cc: kvm@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/7007/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

authored by

David Daney and committed by
Ralf Baechle
a68d09a1 8a837cdb

+8 -1
+8 -1
arch/mips/include/asm/cpu-features.h
··· 110 110 #ifndef cpu_has_smartmips 111 111 #define cpu_has_smartmips (cpu_data[0].ases & MIPS_ASE_SMARTMIPS) 112 112 #endif 113 + 113 114 #ifndef cpu_has_rixi 114 - #define cpu_has_rixi (cpu_data[0].options & MIPS_CPU_RIXI) 115 + # ifdef CONFIG_64BIT 116 + # define cpu_has_rixi (cpu_data[0].options & MIPS_CPU_RIXI) 117 + # else /* CONFIG_32BIT */ 118 + # define cpu_has_rixi ((cpu_data[0].options & MIPS_CPU_RIXI) && !cpu_has_64bits) 119 + # endif 115 120 #endif 121 + 116 122 #ifndef cpu_has_mmips 117 123 # ifdef CONFIG_SYS_SUPPORTS_MICROMIPS 118 124 # define cpu_has_mmips (cpu_data[0].options & MIPS_CPU_MICROMIPS) ··· 126 120 # define cpu_has_mmips 0 127 121 # endif 128 122 #endif 123 + 129 124 #ifndef cpu_has_vtag_icache 130 125 #define cpu_has_vtag_icache (cpu_data[0].icache.flags & MIPS_CACHE_VTAG) 131 126 #endif