]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
MIPS: tlbex: Clear ISA bit when writing to handle_tlb{l,m,s}
authorPaul Burton <paul.burton@imgtec.com>
Mon, 7 Nov 2016 11:14:08 +0000 (11:14 +0000)
committerRalf Baechle <ralf@linux-mips.org>
Tue, 3 Jan 2017 15:34:49 +0000 (16:34 +0100)
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>
arch/mips/mm/tlbex.c

index 55ce39606cb8781d23e3c8f3b6df1273b2ee7a5a..87eed65660f5f790b23cdd61bf6ff02cf57cdd6c 100644 (file)
@@ -2041,7 +2041,7 @@ build_r4000_tlbchange_handler_tail(u32 **p, struct uasm_label **l,
 
 static void build_r4000_tlb_load_handler(void)
 {
-       u32 *p = handle_tlbl;
+       u32 *p = (u32 *)msk_isa16_mode((ulong)handle_tlbl);
        const int handle_tlbl_size = handle_tlbl_end - handle_tlbl;
        struct uasm_label *l = labels;
        struct uasm_reloc *r = relocs;
@@ -2224,7 +2224,7 @@ static void build_r4000_tlb_load_handler(void)
 
 static void build_r4000_tlb_store_handler(void)
 {
-       u32 *p = handle_tlbs;
+       u32 *p = (u32 *)msk_isa16_mode((ulong)handle_tlbs);
        const int handle_tlbs_size = handle_tlbs_end - handle_tlbs;
        struct uasm_label *l = labels;
        struct uasm_reloc *r = relocs;
@@ -2279,7 +2279,7 @@ static void build_r4000_tlb_store_handler(void)
 
 static void build_r4000_tlb_modify_handler(void)
 {
-       u32 *p = handle_tlbm;
+       u32 *p = (u32 *)msk_isa16_mode((ulong)handle_tlbm);
        const int handle_tlbm_size = handle_tlbm_end - handle_tlbm;
        struct uasm_label *l = labels;
        struct uasm_reloc *r = relocs;