]> git.baikalelectronics.ru Git - kernel.git/commit
MIPS: Fix protected_cache(e)_op() for microMIPS
authorPaul Burton <paul.burton@imgtec.com>
Mon, 6 Feb 2017 19:03:15 +0000 (11:03 -0800)
committerJames Hogan <james.hogan@imgtec.com>
Mon, 13 Feb 2017 18:57:33 +0000 (18:57 +0000)
commit1af4a049e6ce25b09c0418d6a3f87b6059ef964c
tree4ab87a724fecfc6e202e7f0ef083851ed6ceaa7c
parent3440a0f7a4e7f3a04f29d017d95bbe85592e18f8
MIPS: Fix protected_cache(e)_op() for microMIPS

When building for microMIPS we need to ensure that the assembler always
knows that there is code at the target of a branch or jump. Commit
fd9ae2475e37 ("MIPS: Add return errors to protected cache ops")
introduced a fixup path to protected_cache(e)_op() which does not meet
this requirement. The fixup path jumps to the "2" label but the .section
pseudo-op immediately following it causes the label to be marked as
data. Linking then fails with:

  mips-img-linux-gnu-ld: arch/mips/mm/c-r4k.o: .fixup+0x0: Unsupported
  jump between ISA modes; consider recompiling with interlinking
  enabled.

Fix this by declaring that "2" labels code using the .insn directive.

Fixes: fd9ae2475e37 ("MIPS: Add return errors to protected cache ops")
Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Reviewed-by: Maciej W. Rozycki <macro@imgtec.com>
Cc: linux-mips@linux-mips.org
Cc: Ralf Baechle <ralf@linux-mips.org>
Patchwork: https://patchwork.linux-mips.org/patch/15274/
Signed-off-by: James Hogan <james.hogan@imgtec.com>
arch/mips/include/asm/r4kcache.h