linux/arch/blackfin
Robin Getz b9a3899d59 Blackfin: make deferred hardware errors more exact
Hardware errors on the Blackfin architecture are queued by nature of the
hardware design.  Things that could generate a hardware level queue up at
the system interface and might not process until much later, at which
point the system would send a notification back to the core.

As such, it is possible for user space code to do something that would
trigger a hardware error, but have it delay long enough for the process
context to switch.  So when the hardware error does signal, we mistakenly
evaluate it as a different process or as kernel context and panic (erp!).
This makes it pretty difficult to find the offending context.  But wait,
there is good news somewhere.

By forcing a SSYNC in the interrupt entry, we force all pending queues at
the system level to be processed and all hardware errors to be signaled.
Then we check the current interrupt state to see if the hardware error is
now signaled.  If so, we re-queue the current interrupt and return thus
allowing the higher priority hardware error interrupt to process properly.
Since we haven't done any other context processing yet, the right context
will be selected and killed.  There is still the possibility that the
exact offending instruction will be unknown, but at least we'll have a
much better idea of where to look.

The downside of course is that this causes system-wide syncs at every
interrupt point which results in significant performance degradation.
Since this situation should not occur in any properly configured system
(as hardware errors are triggered by things like bad pointers), make it a
debug configuration option and disable it by default.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-06-12 06:11:44 -04:00
..
boot kbuild: use KECHO convenience echo 2008-12-03 21:32:01 +01:00
configs Blackfin: update defconfigs 2009-06-12 06:11:23 -04:00
include/asm Blackfin: make deferred hardware errors more exact 2009-06-12 06:11:44 -04:00
kernel Blackfin: make sure MPU CPLB for first 1k is marked as valid 2009-06-12 06:11:40 -04:00
lib Blackfin: fix strncmp.o build error 2009-05-27 00:27:05 -04:00
mach-bf518 Blackfin: rename some Blackfin drivers 2009-06-12 06:11:41 -04:00
mach-bf527 Blackfin: rename some Blackfin drivers 2009-06-12 06:11:41 -04:00
mach-bf533 Blackfin: rename some Blackfin drivers 2009-06-12 06:11:41 -04:00
mach-bf537 Blackfin: rename some Blackfin drivers 2009-06-12 06:11:41 -04:00
mach-bf538 Blackfin: add support for gptimer0 as a tick source 2009-06-12 06:11:37 -04:00
mach-bf548 Blackfin: rename some Blackfin drivers 2009-06-12 06:11:41 -04:00
mach-bf561 Blackfin: rename some Blackfin drivers 2009-06-12 06:11:41 -04:00
mach-common Blackfin: make deferred hardware errors more exact 2009-06-12 06:11:44 -04:00
mm Blackfin: fix bug found by traps test case 21 2009-06-12 06:03:45 -04:00
oprofile Blackfin arch: remove hardware PM code, oprofile not use it 2009-01-07 23:14:39 +08:00
Kconfig Blackfin: work around anomaly 05000220 2009-06-12 06:11:41 -04:00
Kconfig.debug Blackfin: make deferred hardware errors more exact 2009-06-12 06:11:44 -04:00
Makefile Blackfin arch: line up machine-/cpu- vars after BF54xM addition 2009-02-04 16:49:45 +08:00