aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin
diff options
context:
space:
mode:
authorRobin Getz <rgetz@blackfin.uclinux.org>2008-07-26 07:41:40 -0400
committerBryan Wu <cooloney@kernel.org>2008-07-26 07:41:40 -0400
commit2d2009806dd843f3adc0cbbb5d2204980f28111a (patch)
tree682a1c5ef0136bdd8f31cdb1dad025bb8d5d3791 /arch/blackfin
parent9de3a0b6979a4839d67ca840e386ea06acaabe39 (diff)
Blackfin arch: If we double fault, rather than hang forever, reset
Signed-off-by: Robin Getz <rgetz@blackfin.uclinux.org> Signed-off-by: Bryan Wu <cooloney@kernel.org>
Diffstat (limited to 'arch/blackfin')
-rw-r--r--arch/blackfin/kernel/setup.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/blackfin/kernel/setup.c b/arch/blackfin/kernel/setup.c
index c2248fe80588..23e637eb78da 100644
--- a/arch/blackfin/kernel/setup.c
+++ b/arch/blackfin/kernel/setup.c
@@ -771,6 +771,9 @@ void __init setup_arch(char **cmdline_p)
771 771
772 _bfin_swrst = bfin_read_SWRST(); 772 _bfin_swrst = bfin_read_SWRST();
773 773
774 /* If we double fault, reset the system - otherwise we hang forever */
775 bfin_write_SWRST(DOUBLE_FAULT);
776
774 if (_bfin_swrst & RESET_DOUBLE) 777 if (_bfin_swrst & RESET_DOUBLE)
775 printk(KERN_INFO "Recovering from Double Fault event\n"); 778 printk(KERN_INFO "Recovering from Double Fault event\n");
776 else if (_bfin_swrst & RESET_WDOG) 779 else if (_bfin_swrst & RESET_WDOG)
@@ -1017,10 +1020,10 @@ static int show_cpuinfo(struct seq_file *m, void *v)
1017 } 1020 }
1018 1021
1019 /* Is it turned on? */ 1022 /* Is it turned on? */
1020 if (bfin_read_DMEM_CONTROL() & (ENDCPLB | DMC_ENABLE) != (ENDCPLB | DMC_ENABLE)) 1023 if ((bfin_read_DMEM_CONTROL() & (ENDCPLB | DMC_ENABLE)) != (ENDCPLB | DMC_ENABLE))
1021 dcache_size = 0; 1024 dcache_size = 0;
1022 1025
1023 if (bfin_read_IMEM_CONTROL() & (IMC | ENICPLB) == (IMC | ENICPLB)) 1026 if ((bfin_read_IMEM_CONTROL() & (IMC | ENICPLB)) == (IMC | ENICPLB))
1024 icache_size = 0; 1027 icache_size = 0;
1025 1028
1026 seq_printf(m, "cache size\t: %d KB(L1 icache) " 1029 seq_printf(m, "cache size\t: %d KB(L1 icache) "