Commit 37174f3
gpio: tegra: Use raw_spinlock
Use raw_spinlock in order to fix spurious messages about invalid context
when spinlock debugging is enabled. This happens because there is a legit
nested raw_spinlock->spinlock locking usage within IRQ-related code. IRQ
core uses raw spinlock and then Tegra GPIO driver uses a nested spinlock.
The debug code can't recognize and handle this case, hence we need to use
raw spinlock in the GPIO driver.
[ BUG: Invalid wait context ]
...
(dump_stack) from (__lock_acquire)
(__lock_acquire) from (lock_acquire)
(lock_acquire) from (_raw_spin_lock_irqsave)
(_raw_spin_lock_irqsave) from (tegra_gpio_irq_set_type)
(tegra_gpio_irq_set_type) from (__irq_set_trigger)
(__irq_set_trigger) from (__setup_irq)
(__setup_irq) from (request_threaded_irq)
(request_threaded_irq) from (devm_request_threaded_irq)
(devm_request_threaded_irq) from (elants_i2c_probe)
(elants_i2c_probe) from (i2c_device_probe)
...
Tested-by: Peter Geis <pgwipeout@gmail.com>
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>1 parent 6ea68fc commit 37174f3
1 file changed
+13
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
65 | | - | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
66 | 74 | | |
67 | 75 | | |
68 | 76 | | |
| |||
334 | 342 | | |
335 | 343 | | |
336 | 344 | | |
337 | | - | |
| 345 | + | |
338 | 346 | | |
339 | 347 | | |
340 | 348 | | |
341 | 349 | | |
342 | 350 | | |
343 | 351 | | |
344 | | - | |
| 352 | + | |
345 | 353 | | |
346 | 354 | | |
347 | 355 | | |
| |||
675 | 683 | | |
676 | 684 | | |
677 | 685 | | |
678 | | - | |
| 686 | + | |
679 | 687 | | |
680 | 688 | | |
681 | 689 | | |
| |||
0 commit comments