binutils: fix build with host gcc < 4.9
[openwrt/openwrt.git] / target / linux / generic / patches-4.4 / 062-06-MIPS-IRQ-Stack-Fix-erroneous-jal-to-plat_irq_dispatc.patch
1 From de856416e7143e32afc4849625616554aa060f7a Mon Sep 17 00:00:00 2001
2 From: Matt Redfearn <matt.redfearn@imgtec.com>
3 Date: Wed, 25 Jan 2017 17:00:25 +0000
4 Subject: [PATCH] MIPS: IRQ Stack: Fix erroneous jal to plat_irq_dispatch
5
6 Commit dda45f701c9d ("MIPS: Switch to the irq_stack in interrupts")
7 changed both the normal and vectored interrupt handlers. Unfortunately
8 the vectored version, "except_vec_vi_handler", was incorrectly modified
9 to unconditionally jal to plat_irq_dispatch, rather than doing a jalr to
10 the vectored handler that has been set up. This is ok for many platforms
11 which set the vectored handler to plat_irq_dispatch anyway, but will
12 cause problems with platforms that use other handlers.
13
14 Fixes: dda45f701c9d ("MIPS: Switch to the irq_stack in interrupts")
15 Signed-off-by: Matt Redfearn <matt.redfearn@imgtec.com>
16 Cc: Ralf Baechle <ralf@linux-mips.org>
17 Cc: Paul Burton <paul.burton@imgtec.com>
18 Cc: linux-mips@linux-mips.org
19 Patchwork: https://patchwork.linux-mips.org/patch/15110/
20 Signed-off-by: James Hogan <james.hogan@imgtec.com>
21 ---
22 arch/mips/kernel/genex.S | 2 +-
23 1 file changed, 1 insertion(+), 1 deletion(-)
24
25 --- a/arch/mips/kernel/genex.S
26 +++ b/arch/mips/kernel/genex.S
27 @@ -330,7 +330,7 @@ NESTED(except_vec_vi_handler, 0, sp)
28 PTR_ADD sp, t0, t1
29
30 2:
31 - jal plat_irq_dispatch
32 + jalr v0
33
34 /* Restore sp */
35 move sp, s1