mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/8] platform/x86: thinkpad_acpi: clean up hotkey polling and locking
@ 2026-11-25 23:11 Dmitry Torokhov
  2026-11-25 23:11 ` [PATCH 1/8] platform/x86: thinkpad_acpi: remove early exit in hotkey_kthread() Dmitry Torokhov
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Dmitry Torokhov @ 2026-11-25 23:11 UTC (permalink / raw)
  To: Henrique de Moraes Holschuh, Mark Pearson, Derek J. Clark,
	Rong Zhang, Hans de Goede, Ilpo Järvinen
  Cc: platform-driver-x86, ibm-acpi-devel, linux-kernel

This series fixes a kthread lifecycle bug and cleans up hotkey NVRAM
polling setup and locking in thinkpad_acpi:

- Remove the unsafe early return on TPACPI_LIFE_EXITING in
  hotkey_kthread() so kthread_stop() never races with kthread exit.
- Drop the dead -ENXIO check on hotkey_mask_set() in hotkey_init().
- Drop obsolete tpacpi_lifecycle checks from hotkey_inputdev_open() and
  hotkey_inputdev_close(), fold hotkey_poll_setup() calls into existing
  hotkey_mutex critical sections, and remove hotkey_poll_setup_safe().
- Call hotkey_poll_setup() in hotkey_user_mask_set() so that runtime
  hotkey mask updates via /proc/acpi/ibm/hotkey also start or stop the
  NVRAM polling thread.
- Replace the HOTKEY_CONFIG_CRITICAL_START/END macros and manual
  hotkey_thread_data_mutex lock/unlock calls with scoped_guard().
- Convert hotkey_thread_data_mutex to a spinlock.
- Remove the unused hotkey_poll_active bitfield from tp_features.
- Drop the redundant tpacpi_inputdev->dev.parent assignment in
  tpacpi_pdriver_probe().

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
Dmitry Torokhov (8):
      platform/x86: thinkpad_acpi: remove early exit in hotkey_kthread()
      platform/x86: thinkpad_acpi: drop dead -ENXIO check in hotkey_init()
      platform/x86: thinkpad_acpi: simplify hotkey open/close and poll setup
      platform/x86: thinkpad_acpi: update polling state in hotkey_user_mask_set()
      platform/x86: thinkpad_acpi: use scoped_guard() for hotkey config locking
      platform/x86: thinkpad_acpi: convert hotkey_thread_data_mutex to a spinlock
      platform/x86: thinkpad_acpi: remove unused hotkey_poll_active flag
      platform/x86: thinkpad_acpi: drop redundant input device parent assignment

 drivers/platform/x86/lenovo/thinkpad_acpi.c | 148 ++++++++++------------------
 1 file changed, 52 insertions(+), 96 deletions(-)
---
base-commit: 9437046953b2fb3bf55b36582450ea0267df82a7
change-id: 20260930-thinkpad-acpi-hotkey-poll-6c5e037cbf3c

Thanks.

-- 
Dmitry


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-11-25 23:11 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-25 23:11 [PATCH 0/8] platform/x86: thinkpad_acpi: clean up hotkey polling and locking Dmitry Torokhov
2026-11-25 23:11 ` [PATCH 1/8] platform/x86: thinkpad_acpi: remove early exit in hotkey_kthread() Dmitry Torokhov
2026-11-25 23:11 ` [PATCH 2/8] platform/x86: thinkpad_acpi: drop dead -ENXIO check in hotkey_init() Dmitry Torokhov
2026-11-25 23:11 ` [PATCH 3/8] platform/x86: thinkpad_acpi: simplify hotkey open/close and poll setup Dmitry Torokhov
2026-11-25 23:11 ` [PATCH 4/8] platform/x86: thinkpad_acpi: update polling state in hotkey_user_mask_set() Dmitry Torokhov
2026-11-25 23:11 ` [PATCH 5/8] platform/x86: thinkpad_acpi: use scoped_guard() for hotkey config locking Dmitry Torokhov
2026-11-25 23:11 ` [PATCH 6/8] platform/x86: thinkpad_acpi: convert hotkey_thread_data_mutex to a spinlock Dmitry Torokhov
2026-11-25 23:11 ` [PATCH 7/8] platform/x86: thinkpad_acpi: remove unused hotkey_poll_active flag Dmitry Torokhov
2026-11-25 23:11 ` [PATCH 8/8] platform/x86: thinkpad_acpi: drop redundant input device parent assignment Dmitry Torokhov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®