From: Sasha Levin Date: Sun, 22 Nov 2020 19:20:10 +0000 (-0500) Subject: Fixes for 4.4 X-Git-Tag: v4.4.246~36 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d15f4693185576f61fa75b98220e3735a180b283;p=thirdparty%2Fkernel%2Fstable-queue.git Fixes for 4.4 Signed-off-by: Sasha Levin --- diff --git a/queue-4.4/mips-fix-build_rollback_prologue-for-micromips.patch b/queue-4.4/mips-fix-build_rollback_prologue-for-micromips.patch new file mode 100644 index 00000000000..c34a12b7378 --- /dev/null +++ b/queue-4.4/mips-fix-build_rollback_prologue-for-micromips.patch @@ -0,0 +1,50 @@ +From df536f17f3083c55d06cde985eae4a4f05dee89b Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Fri, 19 Aug 2016 18:15:40 +0100 +Subject: MIPS: Fix BUILD_ROLLBACK_PROLOGUE for microMIPS + +From: Paul Burton + +[ Upstream commit 1eefcbc89cf3a8e252e5aeb25825594699b47360 ] + +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 +Cc: linux-mips@linux-mips.org +Patchwork: https://patchwork.linux-mips.org/patch/14019/ +Signed-off-by: Ralf Baechle +Signed-off-by: Sasha Levin +--- + 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 7ffd158de76e5..1b837d6f73deb 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.27.0 + diff --git a/queue-4.4/series b/queue-4.4/series index cc40d40ba8c..e321c5bfc3d 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -12,3 +12,4 @@ net-usb-qmi_wwan-set-dtr-quirk-for-mr400.patch net-have-netpoll-bring-up-dsa-management-interface.patch pinctrl-rockchip-enable-gpio-pclk-for-rockchip_gpio_.patch arm64-psci-avoid-printing-in-cpu_psci_cpu_die.patch +mips-fix-build_rollback_prologue-for-micromips.patch