Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=75918a4b5998c93ee1ab131fbe64b97b5d0d2315
Commit:     75918a4b5998c93ee1ab131fbe64b97b5d0d2315
Parent:     6f6682809b994fd9a61081fa0410df31481d5f7f
Author:     Olof Johansson <[EMAIL PROTECTED]>
AuthorDate: Fri Sep 21 05:11:20 2007 +1000
Committer:  Paul Mackerras <[EMAIL PROTECTED]>
CommitDate: Wed Oct 3 09:11:58 2007 +1000

    [POWERPC] Separate out legacy machine check exception parsers
    
    Move out the old-style exception parsers to a separate function, and
    don't call it on platforms that have a platform-specific handler.
    
    It would make sense to move out the generic versions into their platforms
    instead, but that can be done gradually down the road.
    
    Signed-off-by: Olof Johansson <[EMAIL PROTECTED]>
    Signed-off-by: Paul Mackerras <[EMAIL PROTECTED]>
---
 arch/powerpc/kernel/traps.c |   66 ++++++++++++++++++++++++-------------------
 1 files changed, 37 insertions(+), 29 deletions(-)

diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
index ccfc99d..5a49eab 100644
--- a/arch/powerpc/kernel/traps.c
+++ b/arch/powerpc/kernel/traps.c
@@ -324,38 +324,10 @@ static inline int check_io_access(struct pt_regs *regs)
 #define clear_single_step(regs)        ((regs)->msr &= ~MSR_SE)
 #endif
 
-void machine_check_exception(struct pt_regs *regs)
+static int generic_machine_check_exception(struct pt_regs *regs)
 {
-       int recover = 0;
        unsigned long reason = get_mc_reason(regs);
 
-       /* See if any machine dependent calls */
-       if (ppc_md.machine_check_exception)
-               recover = ppc_md.machine_check_exception(regs);
-
-       if (recover)
-               return;
-
-       if (user_mode(regs)) {
-               regs->msr |= MSR_RI;
-               _exception(SIGBUS, regs, BUS_ADRERR, regs->nip);
-               return;
-       }
-
-#if defined(CONFIG_8xx) && defined(CONFIG_PCI)
-       /* the qspan pci read routines can cause machine checks -- Cort */
-       bad_page_fault(regs, regs->dar, SIGBUS);
-       return;
-#endif
-
-       if (debugger_fault_handler(regs)) {
-               regs->msr |= MSR_RI;
-               return;
-       }
-
-       if (check_io_access(regs))
-               return;
-
 #if defined(CONFIG_4xx) && !defined(CONFIG_440A)
        if (reason & ESR_IMCP) {
                printk("Instruction");
@@ -471,6 +443,42 @@ void machine_check_exception(struct pt_regs *regs)
        }
 #endif /* CONFIG_4xx */
 
+       return 0;
+}
+
+void machine_check_exception(struct pt_regs *regs)
+{
+       int recover = 0;
+
+       /* See if any machine dependent calls */
+       if (ppc_md.machine_check_exception)
+               recover = ppc_md.machine_check_exception(regs);
+       else
+               recover = generic_machine_check_exception(regs);
+
+       if (recover)
+               return;
+
+       if (user_mode(regs)) {
+               regs->msr |= MSR_RI;
+               _exception(SIGBUS, regs, BUS_ADRERR, regs->nip);
+               return;
+       }
+
+#if defined(CONFIG_8xx) && defined(CONFIG_PCI)
+       /* the qspan pci read routines can cause machine checks -- Cort */
+       bad_page_fault(regs, regs->dar, SIGBUS);
+       return;
+#endif
+
+       if (debugger_fault_handler(regs)) {
+               regs->msr |= MSR_RI;
+               return;
+       }
+
+       if (check_io_access(regs))
+               return;
+
        if (debugger_fault_handler(regs))
                return;
        die("Machine check", regs, SIGBUS);
-
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  http://vger.kernel.org/majordomo-info.html

Reply via email to