From e4002b2045b1b7fd6b697738e4fd4b76c8e1b079 Mon Sep 17 00:00:00 2001 From: Robin Getz Date: Sat, 26 Jul 2008 19:41:40 +0800 Subject: [PATCH] --- yaml --- r: 106303 b: refs/heads/master c: 2d2009806dd843f3adc0cbbb5d2204980f28111a h: refs/heads/master i: 106301: 1091986cb1fb7ce13960e9aacc8e90720a8552bf 106299: 719fcfe143dc07f169701e5c7839921c0ca277e7 106295: adbe5fbf65498461f878fb1d34951f2f31e933f5 106287: 5e0349cf97d5eaa47982279af14a07f907a72d3f 106271: fe2fab72640187bc5ad9f4ccf7cb0520aac76d76 106239: a129d423e02069ef81f275394733ff4a3f88fbd8 v: v3 --- [refs] | 2 +- trunk/arch/blackfin/kernel/setup.c | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 80c55426a6aa..8e5732f2aa9e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 9de3a0b6979a4839d67ca840e386ea06acaabe39 +refs/heads/master: 2d2009806dd843f3adc0cbbb5d2204980f28111a diff --git a/trunk/arch/blackfin/kernel/setup.c b/trunk/arch/blackfin/kernel/setup.c index c2248fe80588..23e637eb78da 100644 --- a/trunk/arch/blackfin/kernel/setup.c +++ b/trunk/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) "