Commit:     0de2d820067e03ca93f6bf5320d362d5262fb7a3
Parent:     3eb523b939d59fd90518188750c26df5d357478f
Author:     Scott Wood <[EMAIL PROTECTED]>
AuthorDate: Fri Sep 28 04:38:55 2007 +1000
Committer:  Paul Mackerras <[EMAIL PROTECTED]>
CommitDate: Wed Oct 3 11:48:44 2007 +1000

    [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 <[EMAIL PROTECTED]>
    Acked-by: Kumar Gala <[EMAIL PROTECTED]>
    Acked-by: Olof Johansson <[EMAIL PROTECTED]>
    Signed-off-by: Paul Mackerras <[EMAIL PROTECTED]>
 arch/powerpc/kernel/process.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
index 57c589c..588c0cb 100644
--- a/arch/powerpc/kernel/process.c
+++ b/arch/powerpc/kernel/process.c
@@ -354,6 +354,14 @@ static void show_instructions(struct pt_regs *regs)
                if (!(i % 8))
+#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);
                /* We use __get_user here *only* to avoid an OOPS on a
                 * bad address because the pc *should* only be a
                 * kernel address.
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to