Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rtc: cmos: avoid taking rtc_lock for extended period of time
On my device reading entirety of /sys/devices/pnp0/00:03/cmos_nvram0/nvmem takes about 9 msec during which time interrupts are off on the CPU that does the read and the thread that performs the read can not be migrated or preempted by another higher priority thread (RT or not). Allow readers and writers be preempted by taking and releasing rtc_lock spinlock for each individual byte read or written rather than once per read/write request. Signed-off-by: Dmitry Torokhov <[email protected]> Reviewed-by: Mateusz Jończyk <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
- Loading branch information