[PATCH] [S/master-next] [Config] armhf: RTC_DRV_PL031=y

Paolo Pisati paolo.pisati at canonical.com
Wed Nov 20 14:45:27 UTC 2013

BugLink: http://bugs.launchpad.net/bugs/1252242

SRU Justification:

Impact: the Linux kernel resets the wall clock (RTC_HCTOSYS=y) using the value
read from a specific rtc device (RTC_HCTOSYS_DEVICE=rtc0) as a late_initcall()
(see drivers/rtc/hctosys.c::rtc_hctosys()). That implies that the
RTC_HCTOSYS_DEVICE must be available when rtc_hctosys() is called, making all
the rtc drivers that are built as a module unsuitable for this task.


[ 5.396605] /home/ppisati/ubuntu-saucy/drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
# rtc_hctosys() is called, it tries to open rtc0 but the driver is unavailable at this time so it fails to set the system time
[ 10.609622] rtc-pl031 fff35000.rtc: rtc core: registered pl031 as rtc0
# later on the rtc driver is loaded, but it's too late
ubuntu at m01:~$ date
Wed Dec 31 19:25:24 EST 1969

Fix: compile in the rtc driver that your board uses to set the wall clock (pl031 on calxeda) - see the attached patch

Test case:

[ 5.303860] rtc-pl031 fff35000.rtc: rtc core: registered pl031 as rtc0
[ 5.421639] rtc-pl031 fff35000.rtc: setting system clock to 2013-11-19 16:47:18 UTC (1384879638)

Paolo Pisati (1):
  UBUNTU: [Config] armhf: RTC_DRV_PL031=y

 debian.master/abi/3.11.0-13.20/armhf/generic-lpae.modules | 1 -
 debian.master/abi/3.11.0-13.20/armhf/generic.modules      | 1 -
 debian.master/config/config.common.ubuntu                 | 2 +-
 3 files changed, 1 insertion(+), 3 deletions(-)


More information about the kernel-team mailing list