OSDN Git Service

fsi/master-gpio: Replace bit_bit lock with IRQ disable/enable
authorJeremy Kerr <jk@ozlabs.org>
Thu, 24 May 2018 03:29:56 +0000 (11:29 +0800)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Tue, 12 Jun 2018 04:05:28 +0000 (14:05 +1000)
commit26d79b272d388e2180d93d01b4085208c028f79a
treec055875bb46f3adc9c788049aa2fc5a9ab94e2f1
parentc49e34401a32acc05bafec2b3d28d8e58410724c
fsi/master-gpio: Replace bit_bit lock with IRQ disable/enable

We currently use a spinlock (bit_lock) around operations that clock bits
out of the FSI bus, and a mutex to protect against simultaneous access
to the master.

This means that bit_lock isn't needed for mutual exlusion, only to
prevent timing issues when clocking bits out.

To reflect this, this change converts bit_lock to just the
local_irq_save/restore operation.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Tested-by: Joel Stanley <joel@jms.id.au>
drivers/fsi/fsi-master-gpio.c