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

MIPS: tlbex: Clear ISA bit when writing to handle_tlb{l,m,s}

When generating TLB exception handling code we write to memory reserved
at the handle_tlbl, handle_tlbm & handle_tlbs symbols. Up until now the
ISA bit has always been clear simply because the assembly code reserving
the space for those functions places no instructions in them. In
preparation for marking all LEAF functions as containing code,
explicitly clear the ISA bit when calculating the addresses at which to
write TLB exception handling code.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/14507/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

authored by

Paul Burton and committed by
Ralf Baechle
2c0e57ea 858e2b23

+3 -3
+3 -3
arch/mips/mm/tlbex.c
··· 2041 2041 2042 2042 static void build_r4000_tlb_load_handler(void) 2043 2043 { 2044 - u32 *p = handle_tlbl; 2044 + u32 *p = (u32 *)msk_isa16_mode((ulong)handle_tlbl); 2045 2045 const int handle_tlbl_size = handle_tlbl_end - handle_tlbl; 2046 2046 struct uasm_label *l = labels; 2047 2047 struct uasm_reloc *r = relocs; ··· 2224 2224 2225 2225 static void build_r4000_tlb_store_handler(void) 2226 2226 { 2227 - u32 *p = handle_tlbs; 2227 + u32 *p = (u32 *)msk_isa16_mode((ulong)handle_tlbs); 2228 2228 const int handle_tlbs_size = handle_tlbs_end - handle_tlbs; 2229 2229 struct uasm_label *l = labels; 2230 2230 struct uasm_reloc *r = relocs; ··· 2279 2279 2280 2280 static void build_r4000_tlb_modify_handler(void) 2281 2281 { 2282 - u32 *p = handle_tlbm; 2282 + u32 *p = (u32 *)msk_isa16_mode((ulong)handle_tlbm); 2283 2283 const int handle_tlbm_size = handle_tlbm_end - handle_tlbm; 2284 2284 struct uasm_label *l = labels; 2285 2285 struct uasm_reloc *r = relocs;