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

MIPS: Don't build fast TLB refill handler with 32-bit kernels

The fast handler only supports 64-bit kernels.

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/7010/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

authored by

David Daney and committed by
Ralf Baechle
35d04706 a68d09a1

+6 -2
+6 -2
arch/mips/mm/tlbex.c
··· 1250 1250 unsigned int final_len; 1251 1251 struct mips_huge_tlb_info htlb_info __maybe_unused; 1252 1252 enum vmalloc64_mode vmalloc_mode __maybe_unused; 1253 - 1253 + #ifdef CONFIG_64BIT 1254 + bool is64bit = true; 1255 + #else 1256 + bool is64bit = false; 1257 + #endif 1254 1258 memset(tlb_handler, 0, sizeof(tlb_handler)); 1255 1259 memset(labels, 0, sizeof(labels)); 1256 1260 memset(relocs, 0, sizeof(relocs)); 1257 1261 memset(final_handler, 0, sizeof(final_handler)); 1258 1262 1259 - if ((scratch_reg >= 0 || scratchpad_available()) && use_bbit_insns()) { 1263 + if (is64bit && (scratch_reg >= 0 || scratchpad_available()) && use_bbit_insns()) { 1260 1264 htlb_info = build_fast_tlb_refill_handler(&p, &l, &r, K0, K1, 1261 1265 scratch_reg); 1262 1266 vmalloc_mode = refill_scratch;