Bug 43010 - rtc subsystem should detect devices and load modules before setting the clock to prevent "drivers/rtc/hctosys.c: unable to open rtc device (rtc0)"
Summary: rtc subsystem should detect devices and load modules before setting the clock...
Status: RESOLVED INVALID
Alias: None
Product: Drivers
Classification: Unclassified
Component: Other (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: drivers_other
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-29 14:53 UTC by Dennis Schridde
Modified: 2012-09-12 22:37 UTC (History)
1 user (show)

See Also:
Kernel Version: 3.3.0
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Dennis Schridde 2012-03-29 14:53:03 UTC
It appears that currently the rtc subsystem tries to set the clock before detecting devices and loading modules, which results in the error message "unable to open rtc device":
[    1.032601] drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
[    1.033133] Freeing unused kernel memory: 416k freed
[    1.063882] NET: Registered protocol family 1
[    1.064444] udevd[484]: starting version 181
[    1.094839] rtc_cmos 00:05: RTC can wake from S4
[    1.095180] rtc_cmos 00:05: rtc core: registered rtc_cmos as rtc0

I suggest detecting devices earlier or setting the clock later, to prevent this.
Comment 1 Alan 2012-09-04 11:12:37 UTC
That seems to be a distribution build error - you've got the hctosys driver compiled in and your rtc driver as a module so there is nothing the kernel can do about ordering here.
Comment 2 Dennis Schridde 2012-09-12 22:37:14 UTC
(In reply to comment #1)
> That seems to be a distribution build error - you've got the hctosys driver
> compiled in and your rtc driver as a module so there is nothing the kernel
> can
> do about ordering here.
Can't you make the hctosys function also a module? Then udev could load it after loading the rtc driver.

Or maybe you could run the code only after the specified rtc device was found?

Note You need to log in before you can comment on or make changes to this bug.