summaryrefslogtreecommitdiffstats
path: root/arch/m68k/mac
diff options
context:
space:
mode:
authorFinn Thain2017-10-27 04:45:24 +0200
committerGeert Uytterhoeven2017-11-09 23:02:57 +0100
commit92178fcabbcd39fc9ccd4e58ec4be83dd5323a46 (patch)
treee06ac4b6dd750c56f16f8c29e2a58a9eb855da1a /arch/m68k/mac
parentm68k/mac: Disentangle VIA/RBV and NuBus initialization (diff)
downloadkernel-qcow2-linux-92178fcabbcd39fc9ccd4e58ec4be83dd5323a46.tar.gz
kernel-qcow2-linux-92178fcabbcd39fc9ccd4e58ec4be83dd5323a46.tar.xz
kernel-qcow2-linux-92178fcabbcd39fc9ccd4e58ec4be83dd5323a46.zip
m68k/mac: Add mutual exclusion for IOP interrupt polling
The IOP interrupt handler iop_ism_irq() is used by the adb-iop driver to poll for ADB request completion. Unfortunately, it is not re-entrant. Fix the race condition by adding an iop_ism_irq_poll() function with suitable mutual exclusion. Tested-by: Stan Johnson <userm57@yahoo.com> Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Diffstat (limited to 'arch/m68k/mac')
-rw-r--r--arch/m68k/mac/iop.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/m68k/mac/iop.c b/arch/m68k/mac/iop.c
index a2ea52db7d18..9bfa17015768 100644
--- a/arch/m68k/mac/iop.c
+++ b/arch/m68k/mac/iop.c
@@ -598,3 +598,12 @@ irqreturn_t iop_ism_irq(int irq, void *dev_id)
}
return IRQ_HANDLED;
}
+
+void iop_ism_irq_poll(uint iop_num)
+{
+ unsigned long flags;
+
+ local_irq_save(flags);
+ iop_ism_irq(0, (void *)iop_num);
+ local_irq_restore(flags);
+}