]> git.baikalelectronics.ru Git - kernel.git/commit
m68k/mac: Fix apparent race condition in Baboon interrupt dispatch
authorFinn Thain <fthain@telegraphics.com.au>
Sat, 27 Jan 2018 23:51:40 +0000 (18:51 -0500)
committerGeert Uytterhoeven <geert@linux-m68k.org>
Mon, 19 Mar 2018 09:22:59 +0000 (10:22 +0100)
commitdac935d433353aa7365d5776756d44c24046f7f7
tree0196913c4bc5eab8872d31788558e8ee098e5ba4
parent2b3c2db1e5a3dbfcfa6d75ec294187933d4f9ea1
m68k/mac: Fix apparent race condition in Baboon interrupt dispatch

The algorithm used in baboon_irq() appears to be subject to a race
condition: an IRQ flag could be lost if asserted between the MOV
instructions from and to the interrupt flag register. However,
testing shows that the write to the flag register has no effect.
Rewrite this loop to remove the apparent race condition.

No-one seems to know how to clear Baboon IRQ flags, or whether
that's even possible, so add a comment about this.

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>
arch/m68k/mac/baboon.c