m68k/kernel: fix register dump for ColdFire format 4 exception frame
RFC PATCH 1/1 m68k/kernel: fix register dump for ColdFire format 4 exception frame
On ColdFire, no extra processor state information is saved after an exception frame. Take fault status and vector number from pt_regs.fmtvec instead of from the longword following the exception frame (which would be pt_regs.fmtvec from a prior exception on the stack). Likewise, report the PC from pt_regs (redundant).
Untested ...
Signed-off-by Michael Schmitz <[email protected]>
--- arch/m68k/kernel/traps.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
arch/m68k/kernel/traps.c +15 -0
@@ -868,6 +868,21 @@ void show_registers(struct pt_regs *regs) addr +=sizeof (fp->un.fmt3);break ;case 0x4 : +#if defined(CONFIG_COLDFIRE ) && defined(CONFIG_MMU ) +/* ColdFire format 4 frame has all information in pt_regs */ +if (CPU_IS_COLDFIRE ) { +unsigned int fs = (regs->vector &0x3 ) | + ((regs->vector &0xc00 ) >>8 ); +int vector = (regs->vector >>2 ) &0xff ; + +pr_cont ("fault status=%0x vector=%u pc=%08lx\n" , + fs, vector, regs->pc); +/* Frame format 4 extra size on ColdFire is 0 +* so don't advance addr +*/ +break ; + } +#endif /* CONFIG_COLDFIRE && CONFIG_MMU */ if (CPU_IS_060 )pr_cont ("fault addr=%08lx fslw=%08lx\n" , fp->un.fmt4.effaddr, fp->un.fmt4.pc);
Signature · 1 line
2.17.1