]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
sh: Correct the offset of the return address in ret_from_exception
authorMatt Fleming <matt@console-pimps.org>
Wed, 27 Jan 2010 20:05:20 +0000 (20:05 +0000)
committerPaul Mundt <lethal@linux-sh.org>
Mon, 8 Feb 2010 01:46:46 +0000 (10:46 +0900)
The address that ret_from_exception and ret_from_irq will return to is
found in the stack slot for SPC, not PR. This error was causing the
DWARF unwinder to pick up the wrong return address on the stack and then
unwind using the unwind tables for the wrong function.

While I'm here I might as well add CFI annotations for the other
registers since they could be useful when unwinding.

Signed-off-by: Matt Fleming <matt@console-pimps.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
arch/sh/kernel/entry-common.S

index f0abd58c3a69c4c439e485653f3b86a4e66b94fe..2b15ae60c3a0257ed1ea48b34da0044c6a4bfaf6 100644 (file)
@@ -70,8 +70,14 @@ ret_from_exception:
        CFI_STARTPROC simple
        CFI_DEF_CFA r14, 0
        CFI_REL_OFFSET 17, 64
-       CFI_REL_OFFSET 15, 0
+       CFI_REL_OFFSET 15, 60
        CFI_REL_OFFSET 14, 56
+       CFI_REL_OFFSET 13, 52
+       CFI_REL_OFFSET 12, 48
+       CFI_REL_OFFSET 11, 44
+       CFI_REL_OFFSET 10, 40
+       CFI_REL_OFFSET 9, 36
+       CFI_REL_OFFSET 8, 32
        preempt_stop()
 ENTRY(ret_from_irq)
        !