* [PATCH] HID: intel-thc-hid: intel-thc: raw spinlocks for registers
@ 2026-11-18 6:57 Emfox Zhou
2026-11-18 7:06 ` sashiko-bot
0 siblings, 1 reply; 2+ messages in thread
From: Emfox Zhou @ 2026-11-18 6:57 UTC (permalink / raw)
To: Even Xu, Xinpeng Sun, Jiri Kosina, Benjamin Tissoires
Cc: linux-input, linux-kernel
The primary interrupt handlers of intel-quickspi, intel-quicki2c and
intel-ipts reach the registers from hardirq context. The map is a fast_io
one, so its lock is a spinlock_t, which on PREEMPT_RT is a sleeping lock:
taking it there is an invalid wait context.
Ask for a raw spinlock instead. The accessors only touch MMIO, and the map
is fast_io precisely because it is used where sleeping is not possible, so
nothing else changes.
Signed-off-by: Emfox Zhou <emfox@debian.org>
---
drivers/hid/intel-thc-hid/intel-thc/intel-thc-dev.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/hid/intel-thc-hid/intel-thc/intel-thc-dev.c b/drivers/hid/intel-thc-hid/intel-thc/intel-thc-dev.c
index 7feda4160..e318f26ad 100644
--- a/drivers/hid/intel-thc-hid/intel-thc/intel-thc-dev.c
+++ b/drivers/hid/intel-thc-hid/intel-thc/intel-thc-dev.c
@@ -49,6 +49,7 @@ static const struct regmap_config thc_regmap_cfg = {
.reg_write = thc_regmap_write,
.cache_type = REGCACHE_NONE,
.fast_io = true,
+ .use_raw_spinlock = true,
.rd_table = &thc_rw_table,
.wr_table = &thc_rw_table,
.volatile_table = &thc_rw_table,
base-commit: aebb7274476403040d582c61478df8f4a7bf9cd3
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] HID: intel-thc-hid: intel-thc: raw spinlocks for registers
2026-11-18 6:57 [PATCH] HID: intel-thc-hid: intel-thc: raw spinlocks for registers Emfox Zhou
@ 2026-11-18 7:06 ` sashiko-bot
0 siblings, 0 replies; 2+ messages in thread
From: sashiko-bot @ 2026-11-18 7:06 UTC (permalink / raw)
To: Emfox Zhou; +Cc: linux-input, dmitry.torokhov
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] HID: intel-thc-hid: missing Fixes trailer for thc_regmap_cfg raw
spinlock fix
--
commit 68e15b8b74f173320164f31790193df2ee43dccc
Author: Emfox Zhou <emfox@debian.org>
> HID: intel-thc-hid: intel-thc: raw spinlocks for registers
>
> The primary interrupt handlers of intel-quickspi, intel-quicki2c and
> intel-ipts reach the registers from hardirq context. The map is a fast_io
> one, so its lock is a spinlock_t, which on PREEMPT_RT is a sleeping lock:
> taking it there is an invalid wait context.
>
> Ask for a raw spinlock instead. The accessors only touch MMIO, and the map
> is fast_io precisely because it is used where sleeping is not possible, so
> nothing else changes.
>
> Signed-off-by: Emfox Zhou <emfox@debian.org>
[Severity: Low]
Since this fixes an invalid wait context when accessing thc_regmap_cfg
from hardirq handlers, should this include a Fixes tag?
Fixes: 1b2d05384c29 ("HID: intel-thc-hid: Add basic THC driver skeleton")
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261118065704.672557-1-emfox@debian.org?part=1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-18 7:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-18 6:57 [PATCH] HID: intel-thc-hid: intel-thc: raw spinlocks for registers Emfox Zhou
2026-11-18 7:06 ` sashiko-bot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.