]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitd8e82e55a5d4b8ae33dca24a9e91a2ffc3285ef0
tree8627e90440f489cdcb0ce13449baf8f44edf3002
parent5805d6e43bcc49f7a3ac091db21b95cf8e0b2b2f
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