alarmtimer: Drop the spinlock around the rtcdev variable
Status from this message: The following commit has been merged into the timers/core branch of tip:
Get series with b4
b4 am [email protected] change-id 20261015-alarmtimer-locking-2e7abe32a23aVersions newest first
Patches in v1 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | alarmtimer: Drop the spinlock around the rtcdev variablekernel/ | +8 | 0 replies | |
| 2/3 | alarmtimer: Return early if platform_device_register_data() failskernel/ | +5 | 0 replies | |
| 3/3 | alarmtimer: Return early if try_module_get() failskernel/ | +8 | 1 reply |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/3] alarmtimer: Drop the spinlock around the rtcdev variable
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.
---
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,
Signature · 1 line
Thomas Weißschuh <[email protected]>