Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7728ec33faf88605fb871b9b0ecf8e45d4359678
Commit:     7728ec33faf88605fb871b9b0ecf8e45d4359678
Parent:     4ad1ec7154d7e26c1bd82c03c44690ba2b566f2f
Author:     Robin Getz <[EMAIL PROTECTED]>
AuthorDate: Mon Oct 29 18:12:15 2007 +0800
Committer:  Bryan Wu <[EMAIL PROTECTED]>
CommitDate: Mon Oct 29 18:12:15 2007 +0800

    Blackfin arch: fix bug: tell users if the kernel is recovering from a fault 
condition
    
    Signed-off-by: Robin Getz <[EMAIL PROTECTED]>
    Signed-off-by: Bryan Wu <[EMAIL PROTECTED]>
---
 arch/blackfin/kernel/setup.c |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/arch/blackfin/kernel/setup.c b/arch/blackfin/kernel/setup.c
index f1b059e..fc22ec8 100644
--- a/arch/blackfin/kernel/setup.c
+++ b/arch/blackfin/kernel/setup.c
@@ -316,6 +316,15 @@ void __init setup_arch(char **cmdline_p)
 
        init_leds();
 
+       _bfin_swrst = bfin_read_SWRST();
+
+       if (_bfin_swrst & RESET_DOUBLE)
+               printk(KERN_INFO "Recovering from Double Fault event\n");
+       else if (_bfin_swrst & RESET_WDOG)
+               printk(KERN_INFO "Recovering from Watchdog event\n");
+       else if (_bfin_swrst & RESET_SOFTWARE)
+               printk(KERN_NOTICE "Reset caused by Software reset\n");
+
        printk(KERN_INFO "Blackfin support (C) 2004-2007 Analog Devices, 
Inc.\n");
        if (bfin_compiled_revid() == 0xffff)
                printk(KERN_INFO "Compiled for ADSP-%s Rev any\n", CPU);
@@ -402,8 +411,6 @@ void __init setup_arch(char **cmdline_p)
        if (l1_length > L1_DATA_A_LENGTH)
                panic("L1 data memory overflow\n");
 
-       _bfin_swrst = bfin_read_SWRST();
-
        /* Copy atomic sequences to their fixed location, and sanity check that
           these locations are the ones that we advertise to userspace.  */
        memcpy((void *)FIXED_CODE_START, &fixed_code_start,
-
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