]> git.baikalelectronics.ru Git - kernel.git/commit
MIPS: Fix BUILD_ROLLBACK_PROLOGUE for microMIPS
authorPaul Burton <paul.burton@imgtec.com>
Fri, 19 Aug 2016 17:15:40 +0000 (18:15 +0100)
committerRalf Baechle <ralf@linux-mips.org>
Thu, 29 Sep 2016 16:59:49 +0000 (18:59 +0200)
commitc0b4e63888d964c13262cb1c55a97abf4d71805a
tree05a846f3e7251dca3c41df792e69aca667e26f0d
parentc6221ef4a2e18727ed76fc22768fa15730ede027
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>
arch/mips/kernel/genex.S