linux/arch/m68k/mac
Finn Thain 317b749e37 m68k/mac: Fix race conditions in OSS interrupt dispatch
The interrupt dispatch algorithm used in the OSS driver seems to be
subject to race conditions: an IRQ flag could be lost if asserted between
the MOV instructions from and to the interrupt flag register. But testing
shows that the write to the flag register has no effect, so rewrite the
algorithm without the theoretical race condition.

There is a second theoretical race condition here. When oss_irq() is
called with say, IPL == 2 it will invoke the SCSI interrupt handler.
The SCSI IRQ is then cleared by the mac_scsi driver. If SCSI and NuBus
IRQs are now asserted together, oss_irq() will be invoked with IPL == 3
and the mac_scsi interrupt handler can be re-entered. This re-entrance
issue is not limited to SCSI and could affect NuBus and ADB drivers too.
Fix it by splitting up oss_irq() into separate handlers for each IPL.

No-one seems to know how OSS irq flags can be cleared, if at all, so add
a comment to this effect (actually reinstate one I previously removed).
Testing showed that a slot IRQ with no handler can remain asserted (in
this case a Radius video card) without causing problems for other IRQs.

Tested-by: Stan Johnson <userm57@yahoo.com>
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2018-01-16 16:52:17 +01:00
..
baboon.c m68k updates for 4.15 2017-11-13 12:10:24 -08:00
config.c nubus: Add expansion_type values for various Mac models 2018-01-16 16:47:29 +01:00
iop.c m68k/mac: Add mutual exclusion for IOP interrupt polling 2017-11-09 23:02:57 +01:00
mac_penguin.S License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
macboing.c m68k/macboing: Fix missed timer callback assignment 2017-11-24 16:19:40 +01:00
macints.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Makefile mac68k: replace mac68k SCC code with platform device 2010-02-27 18:31:09 +01:00
misc.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
oss.c m68k/mac: Fix race conditions in OSS interrupt dispatch 2018-01-16 16:52:17 +01:00
psc.c m68k/mac: More printk modernization 2017-11-09 23:02:56 +01:00
via.c m68k updates for 4.15 2017-11-13 12:10:24 -08:00