aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorRobin Getz <rgetz@blackfin.uclinux.org>2008-07-26 19:41:40 +0800
committerBryan Wu <cooloney@kernel.org>2008-07-26 19:41:40 +0800
commit2d2009806dd843f3adc0cbbb5d2204980f28111a (patch)
tree682a1c5ef0136bdd8f31cdb1dad025bb8d5d3791 /arch
parentBlackfin arch: When icache is off, make sure people know it (diff)
downloadlinux-dev-2d2009806dd843f3adc0cbbb5d2204980f28111a.tar.xz
linux-dev-2d2009806dd843f3adc0cbbb5d2204980f28111a.zip
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')
-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)
_bfin_swrst = bfin_read_SWRST();
+ /* If we double fault, reset the system - otherwise we hang forever */
+ bfin_write_SWRST(DOUBLE_FAULT);
+
if (_bfin_swrst & RESET_DOUBLE)
printk(KERN_INFO "Recovering from Double Fault event\n");
else if (_bfin_swrst & RESET_WDOG)
@@ -1017,10 +1020,10 @@ static int show_cpuinfo(struct seq_file *m, void *v)
}
/* Is it turned on? */
- if (bfin_read_DMEM_CONTROL() & (ENDCPLB | DMC_ENABLE) != (ENDCPLB | DMC_ENABLE))
+ if ((bfin_read_DMEM_CONTROL() & (ENDCPLB | DMC_ENABLE)) != (ENDCPLB | DMC_ENABLE))
dcache_size = 0;
- if (bfin_read_IMEM_CONTROL() & (IMC | ENICPLB) == (IMC | ENICPLB))
+ if ((bfin_read_IMEM_CONTROL() & (IMC | ENICPLB)) == (IMC | ENICPLB))
icache_size = 0;
seq_printf(m, "cache size\t: %d KB(L1 icache) "