pinctrl: lynxpoint: Use raw_spinlock for locking
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 18 Nov 2019 18:04:54 +0000 (20:04 +0200)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Fri, 13 Dec 2019 14:48:47 +0000 (16:48 +0200)
commitb2e05d63c295529879aabeb8781f947e1e2dca7b
tree22be0516bd025f3bf4a8d77326b352ed93340c10
parenteb83479e18999e34b3b800f54aa31137f7f41c33
pinctrl: lynxpoint: Use raw_spinlock for locking

The Intel Lynxpoint pinctrl driver implements irqchip callbacks which are
called with desc->lock raw_spinlock held. In mainline this is fine because
spinlock resolves to raw_spinlock. However, running the same code in -rt
we will get a BUG() asserted.

This is because in -rt spinlocks are preemptible so taking the driver
private spinlock in irqchip callbacks causes might_sleep() to trigger.

In order to keep -rt happy but at the same time make sure that register
accesses get serialized, convert the driver to use raw_spinlock instead.

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
drivers/pinctrl/intel/pinctrl-lynxpoint.c