All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] alarmtimer: Drop the spinlock around the rtcdev variable
@ 2026-11-02  6:11 Thomas Weißschuh
  2026-11-02  6:11 ` [PATCH 1/3] " Thomas Weißschuh
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Thomas Weißschuh @ 2026-11-02  6:11 UTC (permalink / raw)
  To: John Stultz, Thomas Gleixner, Stephen Boyd, Miroslav Lichvar
  Cc: linux-kernel, Thomas Weißschuh

The spinlock serves multiple purposes. It serializes calls to
alarmtimer_rtc_add_device(), making sure the 'rtcdev' variable is
written only once. It also makes the variables values is read in a
consistent state in alarmtimer_get_rtcdev().
But alarmtimer_rtc_add_device() is already synchronized externally
through the driver core's subsystem lock. So additional spinlock can be
dropped at replaced with WRITE_ONCE()/READ_ONCE() for consistent access.

This removes lock/unlock operations from the alarmtimer's clock
callbacks.
    

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
---
Thomas Weißschuh (3):
      alarmtimer: Drop the spinlock around the rtcdev variable
      alarmtimer: Return early if platform_device_register_data() fails
      alarmtimer: Return early if try_module_get() fails

 kernel/time/alarmtimer.c | 36 ++++++++++++++----------------------
 1 file changed, 14 insertions(+), 22 deletions(-)
---
base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4
change-id: 20261015-alarmtimer-locking-2e7abe32a23a

Best regards,
--  
Thomas Weißschuh <linux@weissschuh.net>


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

end of thread, other threads:[~2026-11-09 19:53 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-02  6:11 [PATCH 0/3] alarmtimer: Drop the spinlock around the rtcdev variable Thomas Weißschuh
2026-11-02  6:11 ` [PATCH 1/3] " Thomas Weißschuh
2026-11-09 19:53   ` [tip: timers/core] " tip-bot2 for Thomas Weißschuh
2026-11-02  6:11 ` [PATCH 2/3] alarmtimer: Return early if platform_device_register_data() fails Thomas Weißschuh
2026-11-09 19:53   ` [tip: timers/core] " tip-bot2 for Thomas Weißschuh
2026-11-02  6:11 ` [PATCH 3/3] alarmtimer: Return early if try_module_get() fails Thomas Weißschuh
2026-11-09 19:49   ` Thomas Gleixner
2026-11-09 19:53   ` [tip: timers/core] " tip-bot2 for Thomas Weißschuh

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.