stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* request for 4.4-stable: 1eefcbc89cf3 ("MIPS: Fix BUILD_ROLLBACK_PROLOGUE for microMIPS")
@ 2020-11-21 14:11 Sudip Mukherjee
  2020-11-22 17:17 ` Sasha Levin
  0 siblings, 1 reply; 2+ messages in thread
From: Sudip Mukherjee @ 2020-11-21 14:11 UTC (permalink / raw)
  To: Greg Kroah-Hartman, sashal; +Cc: stable, Paul Burton, linux-mips, Ralf Baechle

[-- Attachment #1: Type: text/plain, Size: 184 bytes --]

Hi Greg, Sasha,

Some mips builds of v4.4.y were failing. Please consider the attached
backport of 1eefcbc89cf3 ("MIPS: Fix BUILD_ROLLBACK_PROLOGUE for microMIPS").


--
Regards
Sudip

[-- Attachment #2: 0001-MIPS-Fix-BUILD_ROLLBACK_PROLOGUE-for-microMIPS.patch --]
[-- Type: text/x-diff, Size: 1701 bytes --]

From 21865305f123377d6223c9e880d40137747770af Mon Sep 17 00:00:00 2001
From: Paul Burton <paul.burton@imgtec.com>
Date: Fri, 19 Aug 2016 18:15:40 +0100
Subject: [PATCH] MIPS: Fix BUILD_ROLLBACK_PROLOGUE for microMIPS

commit 1eefcbc89cf3a8e252e5aeb25825594699b47360 upstream

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>
Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
---
 arch/mips/kernel/genex.S | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/mips/kernel/genex.S b/arch/mips/kernel/genex.S
index 7ffd158de76e..1b837d6f73de 100644
--- a/arch/mips/kernel/genex.S
+++ b/arch/mips/kernel/genex.S
@@ -142,9 +142,8 @@ LEAF(__r4k_wait)
 	PTR_LA	k1, __r4k_wait
 	ori	k0, 0x1f	/* 32 byte rollback region */
 	xori	k0, 0x1f
-	bne	k0, k1, 9f
+	bne	k0, k1, \handler
 	MTC0	k0, CP0_EPC
-9:
 	.set pop
 	.endm
 
-- 
2.11.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: request for 4.4-stable: 1eefcbc89cf3 ("MIPS: Fix BUILD_ROLLBACK_PROLOGUE for microMIPS")
  2020-11-21 14:11 request for 4.4-stable: 1eefcbc89cf3 ("MIPS: Fix BUILD_ROLLBACK_PROLOGUE for microMIPS") Sudip Mukherjee
@ 2020-11-22 17:17 ` Sasha Levin
  0 siblings, 0 replies; 2+ messages in thread
From: Sasha Levin @ 2020-11-22 17:17 UTC (permalink / raw)
  To: Sudip Mukherjee
  Cc: Greg Kroah-Hartman, stable, Paul Burton, linux-mips, Ralf Baechle

On Sat, Nov 21, 2020 at 02:11:12PM +0000, Sudip Mukherjee wrote:
>Hi Greg, Sasha,
>
>Some mips builds of v4.4.y were failing. Please consider the attached
>backport of 1eefcbc89cf3 ("MIPS: Fix BUILD_ROLLBACK_PROLOGUE for microMIPS").

I'll grab it, thanks!

-- 
Thanks,
Sasha

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-11-22 17:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-21 14:11 request for 4.4-stable: 1eefcbc89cf3 ("MIPS: Fix BUILD_ROLLBACK_PROLOGUE for microMIPS") Sudip Mukherjee
2020-11-22 17:17 ` Sasha Levin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).