From 0acad8dfee6bde7e246a95a52f864a8eee777ed8 Mon Sep 17 00:00:00 2001 From: Robin Getz Date: Mon, 11 May 2009 18:55:16 +0000 Subject: [PATCH] Blackfin: add workaround for anomaly 05000461 Returning too fast with a bad RETI can trigger false errors. Signed-off-by: Robin Getz Signed-off-by: Mike Frysinger --- arch/blackfin/kernel/traps.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/blackfin/kernel/traps.c b/arch/blackfin/kernel/traps.c index 0d04a4732b1f..778a75655a0c 100644 --- a/arch/blackfin/kernel/traps.c +++ b/arch/blackfin/kernel/traps.c @@ -594,6 +594,9 @@ asmlinkage void trap_c(struct pt_regs *fp) force_sig_info(sig, &info, current); } + if (ANOMALY_05000461 && trapnr == VEC_HWERR && !access_ok(VERIFY_READ, fp->pc, 8)) + fp->pc = SAFE_USER_INSTRUCTION; + trace_buffer_restore(j); return; }