Linux Input/HID development
 help / color / mirror / Atom feed
From: Emfox Zhou <emfox@debian.org>
To: Even Xu <even.xu@intel.com>, Xinpeng Sun <xinpeng.sun@intel.com>,
	Jiri Kosina <jikos@kernel.org>,
	Benjamin Tissoires <bentiss@kernel.org>
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] HID: intel-thc-hid: intel-thc: raw spinlocks for registers
Date: Wed, 18 Nov 2026 14:57:04 +0800	[thread overview]
Message-ID: <20261118065704.672557-1-emfox@debian.org> (raw)

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

             reply	other threads:[~2026-11-18  6:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-18  6:57 Emfox Zhou [this message]
2026-11-18  7:06 ` [PATCH] HID: intel-thc-hid: intel-thc: raw spinlocks for registers sashiko-bot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261118065704.672557-1-emfox@debian.org \
    --to=emfox@debian.org \
    --cc=bentiss@kernel.org \
    --cc=even.xu@intel.com \
    --cc=jikos@kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=xinpeng.sun@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox