062-06-MIPS-IRQ-Stack-Fix-erroneous-jal-to-plat_irq_dispatc.patch 1.3 KB

1234567891011121314151617181920212223242526272829303132333435
  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. Commit dda45f701c9d ("MIPS: Switch to the irq_stack in interrupts")
  6. changed both the normal and vectored interrupt handlers. Unfortunately
  7. the vectored version, "except_vec_vi_handler", was incorrectly modified
  8. to unconditionally jal to plat_irq_dispatch, rather than doing a jalr to
  9. the vectored handler that has been set up. This is ok for many platforms
  10. which set the vectored handler to plat_irq_dispatch anyway, but will
  11. cause problems with platforms that use other handlers.
  12. Fixes: dda45f701c9d ("MIPS: Switch to the irq_stack in interrupts")
  13. Signed-off-by: Matt Redfearn <matt.redfearn@imgtec.com>
  14. Cc: Ralf Baechle <ralf@linux-mips.org>
  15. Cc: Paul Burton <paul.burton@imgtec.com>
  16. Cc: linux-mips@linux-mips.org
  17. Patchwork: https://patchwork.linux-mips.org/patch/15110/
  18. Signed-off-by: James Hogan <james.hogan@imgtec.com>
  19. ---
  20. arch/mips/kernel/genex.S | 2 +-
  21. 1 file changed, 1 insertion(+), 1 deletion(-)
  22. --- a/arch/mips/kernel/genex.S
  23. +++ b/arch/mips/kernel/genex.S
  24. @@ -330,7 +330,7 @@ NESTED(except_vec_vi_handler, 0, sp)
  25. PTR_ADD sp, t0, t1
  26. 2:
  27. - jal plat_irq_dispatch
  28. + jalr v0
  29. /* Restore sp */
  30. move sp, s1