mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 03:36:19 +00:00
[POWERPC] Make instruction dumping work in real mode
On non-book-E, exceptions execute in real mode. If a fault happens that leads to a register dump, the kernel currently prints XXXXXXXX because it doesn't realize that PC is a physical address. This patch checks whether instruction address translation is turned on, and if not converts PC into a virtual address. Signed-off-by: Scott Wood <scottwood@freescale.com> Acked-by: Kumar Gala <galak@kernel.crashing.org> Acked-by: Olof Johansson <olof@lixom.net> Signed-off-by: Paul Mackerras <paulus@samba.org>
This commit is contained in:
parent
3eb523b939
commit
0de2d82006
1 changed files with 8 additions and 0 deletions
|
@ -354,6 +354,14 @@ static void show_instructions(struct pt_regs *regs)
|
|||
if (!(i % 8))
|
||||
printk("\n");
|
||||
|
||||
#if !defined(CONFIG_BOOKE)
|
||||
/* If executing with the IMMU off, adjust pc rather
|
||||
* than print XXXXXXXX.
|
||||
*/
|
||||
if (!(regs->msr & MSR_IR))
|
||||
pc = (unsigned long)phys_to_virt(pc);
|
||||
#endif
|
||||
|
||||
/* We use __get_user here *only* to avoid an OOPS on a
|
||||
* bad address because the pc *should* only be a
|
||||
* kernel address.
|
||||
|
|
Loading…
Reference in a new issue