via-cuda: Use spinlock_irq_save/restore instead of enable/disable_irq
authorFinn Thain <fthain@telegraphics.com.au>
Sun, 1 Jan 2017 00:56:26 +0000 (19:56 -0500)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 7 Feb 2017 05:56:22 +0000 (16:56 +1100)
commitac39452e942af6a212e8f89e8a36b71354323845
tree8627e90440f489cdcb0ce13449baf8f44edf3002
parenta64662432200f8af6f67cd3664885a323f6a2f2d
via-cuda: Use spinlock_irq_save/restore instead of enable/disable_irq

The cuda_start() function uses spinlock_irq_save/restore for mutual
exclusion. Let's have cuda_poll() do the same when polling the VIA
interrupt.

The benefit to disabling local irqs when the interrupt is being polled
is that the interrupt handler now has the same timing properties
regardless of whether it is invoked normally or from cuda_poll().

This driver was written back when local irqs remained enabled during
execution of interrupt handlers and cuda_poll() was probably trying
to achieve the same effect by use of enable/disable_irq.

Tested-by: Stan Johnson <userm57@yahoo.com>
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
drivers/macintosh/via-cuda.c