linux/arch/mips
Corey Minyard aee16625b1 MIPS: Fix issues in backtraces
I saw two problems when doing backtraces:

The compiler was putting a "fast return" at the top of some
functions, before it set up the frame.  The backtrace code
would stop when it saw a jump instruction, so it would never
get to the stack frame setup and would thus misinterpret it.
To fix this, don't look for jump instructions until the
frame setup has been seen.

The assembly code here is:

ffffffff80b885a0 <serial8250_handle_irq>:
ffffffff80b885a0:       c8a00003        bbit0   a1,0x0,ffffffff80b885b0 <serial8250_handle_irq+0x10>
ffffffff80b885a4:       0000102d        move    v0,zero
ffffffff80b885a8:       03e00008        jr      ra
ffffffff80b885ac:       00000000        nop
ffffffff80b885b0:       67bdffd0        daddiu  sp,sp,-48
ffffffff80b885b4:       ffb00008        sd      s0,8(sp)

The second problem was the compiler was putting the last
instruction of the frame save in the delay slot of the
jump instruction.  If it saved the RA in there, the
backtrace could would miss it and misinterpret the frame.
To fix this, make sure to process the instruction after
the first jump seen.

The assembly code for this is:

ffffffff80806fd0 <plat_irq_dispatch>:
ffffffff80806fd0:       67bdffd0        daddiu  sp,sp,-48
ffffffff80806fd4:       ffb30020        sd      s3,32(sp)
ffffffff80806fd8:       24130018        li      s3,24
ffffffff80806fdc:       ffb20018        sd      s2,24(sp)
ffffffff80806fe0:       3c12811c        lui     s2,0x811c
ffffffff80806fe4:       ffb10010        sd      s1,16(sp)
ffffffff80806fe8:       3c11811c        lui     s1,0x811c
ffffffff80806fec:       ffb00008        sd      s0,8(sp)
ffffffff80806ff0:       3c10811c        lui     s0,0x811c
ffffffff80806ff4:       08201c03        j       ffffffff8080700c <plat_irq_dispa
tch+0x3c>
ffffffff80806ff8:       ffbf0028        sd      ra,40(sp)

Signed-off-by: Corey Minyard <cminyard@mvista.com>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/16992/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2017-09-06 11:01:00 +02:00
..
alchemy MIPS: Alchemy: Threaded carddetect irqs for devboards 2017-08-29 15:21:53 +02:00
ar7 MIPS: Audit and remove any unnecessary uses of module.h 2017-02-14 09:00:25 +00:00
ath25
ath79 MIPS: Convert to using %pOF instead of full_name 2017-08-29 15:21:50 +02:00
bcm47xx MIPS: BCM47XX: Fix button inversion for Asus WL-500W 2017-02-17 11:16:46 +00:00
bcm63xx MIPS: Audit and remove any unnecessary uses of module.h 2017-02-14 09:00:25 +00:00
bmips MIPS: BMIPS: Support APPENDED_DTB 2016-10-06 17:31:02 +02:00
boot MIPS: jz4780: DTS: Probe the jz4740-rtc driver from devicetree 2017-09-06 10:13:38 +02:00
cavium-octeon MIPS: Octeon: Allow access to CIU3 IRQ domains. 2017-09-04 21:19:03 +02:00
cobalt MIPS: Cobalt: Fix typo 2016-08-03 08:16:30 +02:00
configs MIPS: Ci20: Enable RTC driver 2017-09-06 10:12:28 +02:00
dec MIPS: DEC: Fix an int-handler.S CPU_DADDI_WORKAROUNDS regression 2017-08-07 16:31:03 +02:00
emma MIPS: Avoid old-style declaration 2017-01-25 02:51:11 +01:00
fw MIPS: SMP: Constify smp ops 2017-08-29 15:21:50 +02:00
generic irqchip: mips-gic: Move gic_get_c0_*_int() to asm/mips-gic.h 2017-09-04 13:53:14 +02:00
include MIPS: Octeon: Allow access to CIU3 IRQ domains. 2017-09-04 21:19:03 +02:00
jazz MIPS: Audit and remove any unnecessary uses of module.h 2017-02-14 09:00:25 +00:00
jz4740 MIPS: jz4740: Remove custom GPIO code 2017-05-22 17:26:34 +02:00
kernel MIPS: Fix issues in backtraces 2017-09-06 11:01:00 +02:00
kvm PPC: 2017-07-06 18:38:31 -07:00
lantiq MIPS: lantiq: Remove the arch/mips/lantiq/xway/reset.c implementation 2017-09-04 21:19:03 +02:00
lasat MIPS: Audit and remove any unnecessary uses of module.h 2017-02-14 09:00:25 +00:00
lib MIPS: Add __ioread64_copy 2017-09-04 13:53:14 +02:00
loongson32 MIPS: clockevent drivers: Set ->min_delta_ticks and ->max_delta_ticks 2017-04-14 13:11:16 -07:00
loongson64 MIPS: SMP: Allow boot_secondary SMP op to return errors 2017-08-30 00:57:27 +02:00
math-emu MIPS: math-emu: Add FP emu debugfs stats for individual instructions 2017-08-29 15:21:57 +02:00
mm MIPS: CPS: Have asm/mips-cps.h include CM & CPC headers 2017-08-30 00:57:27 +02:00
mti-malta irqchip: mips-gic: Move gic_get_c0_*_int() to asm/mips-gic.h 2017-09-04 13:53:14 +02:00
net MIPS: Add missing file for eBPF JIT. 2017-08-04 11:23:58 -07:00
netlogic MIPS: SMP: Allow boot_secondary SMP op to return errors 2017-08-30 00:57:27 +02:00
oprofile MIPS: Abstract CPU core & VP(E) ID access through accessor functions 2017-08-30 00:57:26 +02:00
paravirt MIPS: SMP: Allow boot_secondary SMP op to return errors 2017-08-30 00:57:27 +02:00
pci MIPS: CPS: Cluster support for topology functions 2017-08-30 00:57:28 +02:00
pic32 clocksource/drivers: Rename clocksource_probe to timer_probe 2017-06-14 11:59:16 +02:00
pistachio MIPS: Remove unnecessary inclusions of linux/irqchip/mips-gic.h 2017-09-04 13:53:14 +02:00
pmcs-msp71xx MIPS: Audit and remove any unnecessary uses of module.h 2017-02-14 09:00:25 +00:00
pnx833x MIPS: Squash lines for simple wrapper functions 2016-10-04 16:13:57 +02:00
power
ralink irqchip: mips-gic: Move gic_get_c0_*_int() to asm/mips-gic.h 2017-09-04 13:53:14 +02:00
rb532 MIPS: Audit and remove any unnecessary uses of module.h 2017-02-14 09:00:25 +00:00
sgi-ip22 mips: sgi-ip22: ecard: use dev_groups and not dev_attrs for bus_type 2017-06-09 11:00:45 +02:00
sgi-ip27 MIPS: SMP: Allow boot_secondary SMP op to return errors 2017-08-30 00:57:27 +02:00
sgi-ip32 MIPS: Add missing include files 2017-03-08 10:38:06 +01:00
sibyte MIPS: SMP: Allow boot_secondary SMP op to return errors 2017-08-30 00:57:27 +02:00
sni char/genrtc: remove asm-generic/rtc.h from mips 2016-06-04 00:23:36 +02:00
tools MIPS: generic: Allow filtering enabled boards by requirements 2017-08-30 00:57:28 +02:00
txx9 MIPS: Audit and remove any unnecessary uses of module.h 2017-02-14 09:00:25 +00:00
vdso MIPS: VDSO: Avoid use of linux/irqchip/mips-gic.h 2017-09-04 13:53:14 +02:00
vr41xx MIPS: Audit and remove any unnecessary uses of module.h 2017-02-14 09:00:25 +00:00
xilfpga clocksource/drivers: Rename clocksource_probe to timer_probe 2017-06-14 11:59:16 +02:00
Kbuild MIPS: Disable Werror when W= is set 2017-04-10 11:56:07 +02:00
Kbuild.platforms MIPS: generic: Convert SEAD-3 to a generic board 2016-10-06 18:04:20 +02:00
Kconfig MIPS: Make CONFIG_MIPS_MT_SMP default y 2017-08-30 00:57:28 +02:00
Kconfig.debug MIPS: Sibyte: Fix Kconfig warning. 2017-04-21 03:34:01 +02:00
Makefile MIPS: Prevent direct use of generic_defconfig 2017-08-30 00:57:28 +02:00
Makefile.postlink MIPS: Fix distclean with Makefile.postlink 2017-02-13 18:57:34 +00:00