diff options
author | Paul Burton <paul.burton@imgtec.com> | 2016-08-19 13:15:40 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2016-09-29 12:59:49 -0400 |
commit | 1eefcbc89cf3a8e252e5aeb25825594699b47360 (patch) | |
tree | 05a846f3e7251dca3c41df792e69aca667e26f0d | |
parent | 67acd8d5c606cf42e6726767d705851dec9f6a34 (diff) |
MIPS: Fix BUILD_ROLLBACK_PROLOGUE for microMIPS
When the kernel is built for microMIPS, branches targets need to be
known to be microMIPS code in order to result in bit 0 of the PC being
set. The branch target in the BUILD_ROLLBACK_PROLOGUE macro was simply
the end of the macro, which may be pointing at padding rather than at
code. This results in recent enough GNU linkers complaining like so:
mips-img-linux-gnu-ld: arch/mips/built-in.o: .text+0x3e3c: Unsupported branch between ISA modes.
mips-img-linux-gnu-ld: final link failed: Bad value
Makefile:936: recipe for target 'vmlinux' failed
make: *** [vmlinux] Error 1
Fix this by changing the branch target to be the start of the
appropriate handler, skipping over any padding.
Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/14019/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r-- | arch/mips/kernel/genex.S | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/mips/kernel/genex.S b/arch/mips/kernel/genex.S index 17326a90d53c..dc0b29612891 100644 --- a/arch/mips/kernel/genex.S +++ b/arch/mips/kernel/genex.S | |||
@@ -142,9 +142,8 @@ LEAF(__r4k_wait) | |||
142 | PTR_LA k1, __r4k_wait | 142 | PTR_LA k1, __r4k_wait |
143 | ori k0, 0x1f /* 32 byte rollback region */ | 143 | ori k0, 0x1f /* 32 byte rollback region */ |
144 | xori k0, 0x1f | 144 | xori k0, 0x1f |
145 | bne k0, k1, 9f | 145 | bne k0, k1, \handler |
146 | MTC0 k0, CP0_EPC | 146 | MTC0 k0, CP0_EPC |
147 | 9: | ||
148 | .set pop | 147 | .set pop |
149 | .endm | 148 | .endm |
150 | 149 | ||