== Impact ==
Although we have CONFIG_RTC_HCTOSYS enabled and set CONFIG_RTC_HCTOSYS_DEVICE to "rtc0", system time would only be set if the RTC driver is built-in. This may not be an issue on most amd64 systems because CONFIG_RTC_DRV_CMOS is y for amd64, however it is an issue for other architectures since there may not be a proper RTC driver enabled as built-in. Also make every RTC driver that may be used as built-in is not a good option.
== Fix ==
The commit is in mainline since v5.7:
commit f9b2a4d6a5f18e0aaf715206a056565c56889d9f
Author: Steve Muckle <email address hidden>
Date: Wed Nov 6 11:46:25 2019 -0800
rtc: class: support hctosys from modular RTC drivers
Due to distribution constraints it may not be possible to statically
compile the required RTC driver into the kernel.
Expand RTC_HCTOSYS support to cover all RTC devices (statically compiled
or not) by checking at the end of RTC device registration whether the
time should be synced.
== Impact == RTC_HCTOSYS_ DEVICE to "rtc0", system time would only be set if the RTC driver is built-in. This may not be an issue on most amd64 systems because CONFIG_RTC_DRV_CMOS is y for amd64, however it is an issue for other architectures since there may not be a proper RTC driver enabled as built-in. Also make every RTC driver that may be used as built-in is not a good option.
Although we have CONFIG_RTC_HCTOSYS enabled and set CONFIG_
== Fix ==
The commit is in mainline since v5.7:
commit f9b2a4d6a5f18e0 aaf715206a05656 5c56889d9f
Author: Steve Muckle <email address hidden>
Date: Wed Nov 6 11:46:25 2019 -0800
rtc: class: support hctosys from modular RTC drivers
Due to distribution constraints it may not be possible to statically
compile the required RTC driver into the kernel.
Expand RTC_HCTOSYS support to cover all RTC devices (statically compiled
or not) by checking at the end of RTC device registration whether the
time should be synced.
Signed-off-by: Steve Muckle <email address hidden>
Link: https://<email address hidden>
Signed-off-by: Alexandre Belloni <email address hidden>
== Risk of Regression ==
It's a clean cherry-pick for v5.4 and looks straight forward so risk should be low.