Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 196027 - "rtc class" doesn't find a clock which "enhanced rtc" does
Summary: "rtc class" doesn't find a clock which "enhanced rtc" does
Status: VERIFIED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High minor (vote)
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-16 08:00 UTC by Christopher Head
Modified: 2008-04-19 07:40 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Kconfig from kernel using CONFIG_RTC (config-bak,22.99 KB, text/plain)
2007-10-16 08:05 UTC, Christopher Head
Details
Kconfig from kernel using CONFIG_RTC_CLASS/CONFIG_RTC_DRV_CMOS (config,23.54 KB, text/plain)
2007-10-16 08:06 UTC, Christopher Head
Details
debug patch (rtc.patch,844 bytes, patch)
2007-10-29 15:29 UTC, Daniel Drake (RETIRED)
Details | Diff
dmesg output with debug patch (dmesg,7.23 KB, text/plain)
2007-11-04 18:25 UTC, Christopher Head
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christopher Head 2007-10-16 08:00:19 UTC
Using sys-kernel/gentoo-sources-2.6.22-r8.
Compiling on a particular machine with CONFIG_RTC=y causes /dev/rtc to appear as a symlink to /dev/misc/rtc, which exists and seems to work properly (hwclock -r -D indicates it can open and use the device file).

Compiling the same kernel on the same machine with CONFIG_RTC=n, CONFIG_RTC_CLASS=y, CONFIG_RTC_HCTOSYS=y, CONFIG_RTC_HCTOSYS_DEVICE="rtc0", CONFIG_RTC_INTF_SYSFS=y, CONFIG_RTC_INTF_PROC=y, CONFIG_RTC_INTF_DEV=y, and CONFIG_RTC_DRV_CMOS=y does not create /dev/rtc*, and only mentions rtc in an error message about hctosys (unlike another machine where rtc class works, where it has some nice info lines about rtc firing up).

It looks like the RTC Class CMOS driver is missing support for some kind of clock which is present in this machine and is supported by the Enhanced RTC driver.

I will post dmesg outputs and kernel configs from both configurations.

Reproducible: Always

Steps to Reproduce:
Nothing to say here - it looks machine-specific, but it's 100% deterministic and happens on every boot.
Actual Results:  
/dev/rtc0 does not exist; error message about hctosys in dmesg output.

Expected Results:  
/dev/rtc0 should exist; rtc class should start up properly in dmesg output.
Comment 1 Christopher Head 2007-10-16 08:01:18 UTC
dmesg output for a kernel using CONFIG_RTC:


Linux version 2.6.22-gentoo-r8 (root@fp) (gcc version 4.1.2 (Gentoo 4.1.2)) #4 Tue Oct 16 00:32:16 PDT 2007
BIOS-provided physical RAM map:
 BIOS-e801: 0000000000000000 - 000000000009f000 (usable)
 BIOS-e801: 0000000000100000 - 000000000a000000 (usable)
160MB LOWMEM available.
Entering add_active_range(0, 0, 40960) 0 entries of 256 used
Zone PFN ranges:
  DMA             0 ->     4096
  Normal       4096 ->    40960
early_node_map[1] active PFN ranges
    0:        0 ->    40960
On node 0 totalpages: 40960
  DMA zone: 32 pages used for memmap
  DMA zone: 0 pages reserved
  DMA zone: 4064 pages, LIFO batch:0
  Normal zone: 288 pages used for memmap
  Normal zone: 36576 pages, LIFO batch:7
DMI not present or invalid.
Allocating PCI resources starting at 10000000 (gap: 0a000000:f6000000)
Built 1 zonelists.  Total pages: 40640
Kernel command line: root=/dev/evms/Root ro lapic panic=120 ide=nodma
ide_setup: ide=nodma : Prevented DMA
Local APIC disabled by BIOS -- reenabling.
Found and enabled local APIC!
mapped APIC to ffffd000 (fee00000)
Initializing CPU#0
PID hash table entries: 1024 (order: 10, 4096 bytes)
Detected 266.688 MHz processor.
Console: colour VGA+ 80x25
Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
Memory: 156728k/163840k available (1260k kernel code, 6576k reserved, 435k data, 148k init, 0k highmem)
virtual kernel memory layout:
    fixmap  : 0xfffbc000 - 0xfffff000   ( 268 kB)
    vmalloc : 0xca800000 - 0xfffba000   ( 855 MB)
    lowmem  : 0xc0000000 - 0xca000000   ( 160 MB)
      .init : 0xc02aa000 - 0xc02cf000   ( 148 kB)
      .data : 0xc023b17d - 0xc02a7f04   ( 435 kB)
      .text : 0xc0100000 - 0xc023b17d   (1260 kB)
Checking if this processor honours the WP bit even in supervisor mode... Ok.
SLUB: Genslabs=22, HWalign=32, Order=0-1, MinObjects=4, CPUs=1, Nodes=1
Calibrating delay using timer specific routine.. 533.84 BogoMIPS (lpj=2669200)
Mount-cache hash table entries: 512
CPU: After generic identify, caps: 0080fbff 00000000 00000000 00000000 00000000 00000000 00000000
CPU: L1 I cache: 16K, L1 D cache: 16K
CPU: L2 cache: 512K
CPU: After all inits, caps: 0080fbff 00000000 00000000 00000040 00000000 00000000 00000000
Intel machine check architecture supported.
Intel machine check reporting enabled on CPU#0.
Compat vDSO mapped to ffffe000.
CPU: Intel Pentium II (Klamath) stepping 03
Checking 'hlt' instruction... OK.
NET: Registered protocol family 16
PCI: PCI BIOS revision 2.10 entry at 0xfd85c, last bus=1
PCI: Using configuration type 1
Setting up standard PCI resources
PCI: Probing PCI hardware
PCI: Probing PCI hardware (bus 00)
PCI quirk: region 1200-123f claimed by PIIX4 ACPI
PCI quirk: region 1240-124f claimed by PIIX4 SMB
PIIX4 devres B PIO at 00ec-00ed
PCI: Using IRQ router PIIX/ICH [8086/7110] at 0000:00:07.0
PCI: Bridge: 0000:00:01.0
  IO window: 2000-2fff
  MEM window: 20000000-200fffff
  PREFETCH window: 21000000-21ffffff
NET: Registered protocol family 2
Time: tsc clocksource has been installed.
IP route cache hash table entries: 2048 (order: 1, 8192 bytes)
TCP established hash table entries: 8192 (order: 4, 65536 bytes)
TCP bind hash table entries: 8192 (order: 3, 32768 bytes)
TCP: Hash tables configured (established 8192 bind 8192)
TCP reno registered
checking if image is initramfs...it isn't (no cpio magic); looks like an initrd
Freeing initrd memory: 3074k freed
IA-32 Microcode Update Driver: v1.14a <tigran@aivazian.fsnet.co.uk>
apm: BIOS version 1.2 Flags 0x03 (Driver version 1.16ac)
io scheduler noop registered
io scheduler deadline registered (default)
Limiting direct PCI/PCI transfers.
Boot video device is 0000:01:00.0
Real Time Clock Driver v1.12ac
Floppy drive(s): fd0 is 1.44M
FDC 0 is a post-1991 82077
RAMDISK driver initialized: 1 RAM disks of 8192K size 1024 blocksize
PCI: setting IRQ 12 as level-triggered
PCI: Assigned IRQ 12 for device 0000:00:0a.0
3c59x: Donald Becker and others.
0000:00:0a.0: 3Com PCI 3c905B Cyclone 100baseTx at ca800000.
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
PIIX4: IDE controller at PCI slot 0000:00:07.1
PIIX4: chipset revision 1
PIIX4: not 100% native mode: will probe irqs later
    ide0: BM-DMA at 0x1250-0x1257, BIOS settings: hda:DMA, hdb:pio
    ide1: BM-DMA at 0x1258-0x125f, BIOS settings: hdc:pio, hdd:pio
Probing IDE interface ide0...
hda: QUANTUM BIGFOOT_CY6480A, ATA DISK drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
Probing IDE interface ide1...
hdd: MATSHITA CR-585, ATAPI CD/DVD-ROM drive
ide1 at 0x170-0x177,0x376 on irq 15
hda: max request size: 128KiB
hda: 12611970 sectors (6457 MB) w/67KiB Cache, CHS=13346/15/63
 hda: hda1 hda2
i8042.c: Warning: Keylock active.
serio: i8042 KBD port at 0x60,0x64 irq 1
mice: PS/2 mouse device common for all mice
input: PC Speaker as /class/input/input0
input: AT Translated Set 2 keyboard as /class/input/input1
device-mapper: ioctl: 4.11.0-ioctl (2006-10-12) initialised: dm-devel@redhat.com
nf_conntrack version 0.5.0 (1280 buckets, 10240 max)
ip_tables: (C) 2000-2006 Netfilter Core Team
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
Testing NMI watchdog ... OK.
Using IPI Shortcut mode
RAMDISK: Compressed image found at block 0
VFS: Mounted root (ext2 filesystem).
ReiserFS: dm-8: found reiserfs format "3.6" with standard journal
ReiserFS: dm-8: using ordered data mode
ReiserFS: dm-8: journal params: device dm-8, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30
ReiserFS: dm-8: checking transaction log (dm-8)
ReiserFS: dm-8: Using r5 hash to sort names
Freeing unused kernel memory: 148k freed
ReiserFS: dm-1: found reiserfs format "3.6" with standard journal
ReiserFS: dm-1: using ordered data mode
ReiserFS: dm-1: journal params: device dm-1, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30
ReiserFS: dm-1: checking transaction log (dm-1)
ReiserFS: dm-1: Using r5 hash to sort names
ReiserFS: dm-6: warning: read_super_block: found reiserfs format "3.6" with non-standard journal
ReiserFS: dm-6: using ordered data mode
ReiserFS: dm-6: journal params: device dm-6, size 512, journal first block 66, max trans len 256, max batch 225, max commit age 30, max trans age 30
ReiserFS: dm-6: checking transaction log (dm-6)
ReiserFS: dm-6: Using r5 hash to sort names
ReiserFS: dm-14: found reiserfs format "3.6" with standard journal
ReiserFS: dm-14: using ordered data mode
ReiserFS: dm-14: journal params: device dm-14, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30
ReiserFS: dm-14: checking transaction log (dm-14)
ReiserFS: dm-14: Using r5 hash to sort names
ReiserFS: dm-10: found reiserfs format "3.6" with standard journal
ReiserFS: dm-10: using ordered data mode
ReiserFS: dm-10: journal params: device dm-10, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30
ReiserFS: dm-10: checking transaction log (dm-10)
ReiserFS: dm-10: Using r5 hash to sort names
ReiserFS: dm-4: found reiserfs format "3.6" with standard journal
ReiserFS: dm-4: using ordered data mode
ReiserFS: dm-4: journal params: device dm-4, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30
ReiserFS: dm-4: checking transaction log (dm-4)
ReiserFS: dm-4: Using r5 hash to sort names
Adding 1048564k swap on /dev/evms/Swap.  Priority:-1 extents:1 across:1048564k
eth0:  setting half-duplex.
Comment 2 Christopher Head 2007-10-16 08:02:22 UTC
dmesg output from a kernel with CONFIG_RTC_CLASS/CONFIG_RTC_DRV_CMOS:


Linux version 2.6.22-gentoo-r8 (root@fp) (gcc version 4.1.2 (Gentoo 4.1.2)) #5 Tue Oct 16 00:54:16 PDT 2007
BIOS-provided physical RAM map:
 BIOS-e801: 0000000000000000 - 000000000009f000 (usable)
 BIOS-e801: 0000000000100000 - 000000000a000000 (usable)
160MB LOWMEM available.
Entering add_active_range(0, 0, 40960) 0 entries of 256 used
Zone PFN ranges:
  DMA             0 ->     4096
  Normal       4096 ->    40960
early_node_map[1] active PFN ranges
    0:        0 ->    40960
On node 0 totalpages: 40960
  DMA zone: 32 pages used for memmap
  DMA zone: 0 pages reserved
  DMA zone: 4064 pages, LIFO batch:0
  Normal zone: 288 pages used for memmap
  Normal zone: 36576 pages, LIFO batch:7
DMI not present or invalid.
Allocating PCI resources starting at 10000000 (gap: 0a000000:f6000000)
Built 1 zonelists.  Total pages: 40640
Kernel command line: root=/dev/evms/Root ro lapic panic=120 ide=nodma
ide_setup: ide=nodma : Prevented DMA
Local APIC disabled by BIOS -- reenabling.
Found and enabled local APIC!
mapped APIC to ffffd000 (fee00000)
Initializing CPU#0
PID hash table entries: 1024 (order: 10, 4096 bytes)
Detected 266.694 MHz processor.
Console: colour VGA+ 80x25
Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
Memory: 156720k/163840k available (1264k kernel code, 6584k reserved, 435k data, 148k init, 0k highmem)
virtual kernel memory layout:
    fixmap  : 0xfffbc000 - 0xfffff000   ( 268 kB)
    vmalloc : 0xca800000 - 0xfffba000   ( 855 MB)
    lowmem  : 0xc0000000 - 0xca000000   ( 160 MB)
      .init : 0xc02ac000 - 0xc02d1000   ( 148 kB)
      .data : 0xc023c08d - 0xc02a8f04   ( 435 kB)
      .text : 0xc0100000 - 0xc023c08d   (1264 kB)
Checking if this processor honours the WP bit even in supervisor mode... Ok.
SLUB: Genslabs=22, HWalign=32, Order=0-1, MinObjects=4, CPUs=1, Nodes=1
Calibrating delay using timer specific routine.. 533.85 BogoMIPS (lpj=2669262)
Mount-cache hash table entries: 512
CPU: After generic identify, caps: 0080fbff 00000000 00000000 00000000 00000000 00000000 00000000
CPU: L1 I cache: 16K, L1 D cache: 16K
CPU: L2 cache: 512K
CPU: After all inits, caps: 0080fbff 00000000 00000000 00000040 00000000 00000000 00000000
Intel machine check architecture supported.
Intel machine check reporting enabled on CPU#0.
Compat vDSO mapped to ffffe000.
CPU: Intel Pentium II (Klamath) stepping 03
Checking 'hlt' instruction... OK.
NET: Registered protocol family 16
PCI: PCI BIOS revision 2.10 entry at 0xfd85c, last bus=1
PCI: Using configuration type 1
Setting up standard PCI resources
PCI: Probing PCI hardware
PCI: Probing PCI hardware (bus 00)
PCI quirk: region 1200-123f claimed by PIIX4 ACPI
PCI quirk: region 1240-124f claimed by PIIX4 SMB
PIIX4 devres B PIO at 00ec-00ed
PCI: Using IRQ router PIIX/ICH [8086/7110] at 0000:00:07.0
PCI: Bridge: 0000:00:01.0
  IO window: 2000-2fff
  MEM window: 20000000-200fffff
  PREFETCH window: 21000000-21ffffff
NET: Registered protocol family 2
Time: tsc clocksource has been installed.
IP route cache hash table entries: 2048 (order: 1, 8192 bytes)
TCP established hash table entries: 8192 (order: 4, 65536 bytes)
TCP bind hash table entries: 8192 (order: 3, 32768 bytes)
TCP: Hash tables configured (established 8192 bind 8192)
TCP reno registered
checking if image is initramfs...it isn't (no cpio magic); looks like an initrd
Freeing initrd memory: 3074k freed
IA-32 Microcode Update Driver: v1.14a <tigran@aivazian.fsnet.co.uk>
apm: BIOS version 1.2 Flags 0x03 (Driver version 1.16ac)
io scheduler noop registered
io scheduler deadline registered (default)
Limiting direct PCI/PCI transfers.
Boot video device is 0000:01:00.0
Floppy drive(s): fd0 is 1.44M
FDC 0 is a post-1991 82077
RAMDISK driver initialized: 1 RAM disks of 8192K size 1024 blocksize
PCI: setting IRQ 12 as level-triggered
PCI: Assigned IRQ 12 for device 0000:00:0a.0
3c59x: Donald Becker and others.
0000:00:0a.0: 3Com PCI 3c905B Cyclone 100baseTx at ca800000.
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
PIIX4: IDE controller at PCI slot 0000:00:07.1
PIIX4: chipset revision 1
PIIX4: not 100% native mode: will probe irqs later
    ide0: BM-DMA at 0x1250-0x1257, BIOS settings: hda:DMA, hdb:pio
    ide1: BM-DMA at 0x1258-0x125f, BIOS settings: hdc:pio, hdd:pio
Probing IDE interface ide0...
hda: QUANTUM BIGFOOT_CY6480A, ATA DISK drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
Probing IDE interface ide1...
hdd: MATSHITA CR-585, ATAPI CD/DVD-ROM drive
ide1 at 0x170-0x177,0x376 on irq 15
hda: max request size: 128KiB
hda: 12611970 sectors (6457 MB) w/67KiB Cache, CHS=13346/15/63
 hda: hda1 hda2
i8042.c: Warning: Keylock active.
serio: i8042 KBD port at 0x60,0x64 irq 1
mice: PS/2 mouse device common for all mice
input: PC Speaker as /class/input/input0
input: AT Translated Set 2 keyboard as /class/input/input1
device-mapper: ioctl: 4.11.0-ioctl (2006-10-12) initialised: dm-devel@redhat.com
nf_conntrack version 0.5.0 (1280 buckets, 10240 max)
ip_tables: (C) 2000-2006 Netfilter Core Team
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
Testing NMI watchdog ... OK.
Using IPI Shortcut mode
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
RAMDISK: Compressed image found at block 0
VFS: Mounted root (ext2 filesystem).
ReiserFS: dm-8: found reiserfs format "3.6" with standard journal
ReiserFS: dm-8: using ordered data mode
ReiserFS: dm-8: journal params: device dm-8, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30
ReiserFS: dm-8: checking transaction log (dm-8)
ReiserFS: dm-8: Using r5 hash to sort names
Freeing unused kernel memory: 148k freed
ReiserFS: dm-1: found reiserfs format "3.6" with standard journal
ReiserFS: dm-1: using ordered data mode
ReiserFS: dm-1: journal params: device dm-1, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30
ReiserFS: dm-1: checking transaction log (dm-1)
ReiserFS: dm-1: Using r5 hash to sort names
ReiserFS: dm-6: warning: read_super_block: found reiserfs format "3.6" with non-standard journal
ReiserFS: dm-6: using ordered data mode
ReiserFS: dm-6: journal params: device dm-6, size 512, journal first block 66, max trans len 256, max batch 225, max commit age 30, max trans age 30
ReiserFS: dm-6: checking transaction log (dm-6)
ReiserFS: dm-6: Using r5 hash to sort names
ReiserFS: dm-14: found reiserfs format "3.6" with standard journal
ReiserFS: dm-14: using ordered data mode
ReiserFS: dm-14: journal params: device dm-14, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30
ReiserFS: dm-14: checking transaction log (dm-14)
ReiserFS: dm-14: Using r5 hash to sort names
ReiserFS: dm-10: found reiserfs format "3.6" with standard journal
ReiserFS: dm-10: using ordered data mode
ReiserFS: dm-10: journal params: device dm-10, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30
ReiserFS: dm-10: checking transaction log (dm-10)
ReiserFS: dm-10: Using r5 hash to sort names
ReiserFS: dm-4: found reiserfs format "3.6" with standard journal
ReiserFS: dm-4: using ordered data mode
ReiserFS: dm-4: journal params: device dm-4, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30
ReiserFS: dm-4: checking transaction log (dm-4)
ReiserFS: dm-4: Using r5 hash to sort names
Adding 1048564k swap on /dev/evms/Swap.  Priority:-1 extents:1 across:1048564k
eth0:  setting half-duplex.
Comment 3 Christopher Head 2007-10-16 08:05:42 UTC
Created attachment 133605 [details]
Kconfig from kernel using CONFIG_RTC
Comment 4 Christopher Head 2007-10-16 08:06:07 UTC
Created attachment 133607 [details]
Kconfig from kernel using CONFIG_RTC_CLASS/CONFIG_RTC_DRV_CMOS
Comment 5 Robert Trace 2007-10-23 01:58:39 UTC
(In reply to comment #0)
> Compiling on a particular machine with CONFIG_RTC=y causes /dev/rtc to appear
> as a symlink to /dev/misc/rtc, which exists and seems to work properly 
> ...
> Compiling the same kernel on the same machine with CONFIG_RTC=n,
> CONFIG_RTC_CLASS=y, CONFIG_RTC_HCTOSYS=y, CONFIG_RTC_HCTOSYS_DEVICE="rtc0",
> CONFIG_RTC_INTF_SYSFS=y, CONFIG_RTC_INTF_PROC=y, CONFIG_RTC_INTF_DEV=y, and
> CONFIG_RTC_DRV_CMOS=y does not create /dev/rtc*
>
> It looks like the RTC Class CMOS driver is missing support for some kind of
> clock which is present in this machine and is supported by the Enhanced RTC
> driver.

It's not the RTC class device.  It's either udev or hwclock, depending on your point of view.

The new RTC class drivers support more than one RTC on the system, so they (quite appropriately) make /dev/rtcN (where N starts at 0 and increments for each clock in the system).

udev makes these devices correctly, but it leaves out the legacy /dev/rtc device provided by the old RTC driver.

hwclock only looks for /dev/rtc.

So, either udev should be made smarter (to link /dev/rtc to the appropriate /dev/rtcN), or hwclock should be taught to accept an alternate RTC device.

Some distros (Fedora, at least[1], [2]) have taught udev to add a symlink to /dev/rtc0.


[1] http://www.redhat.com/archives/fedora-test-list/2007-September/msg00643.html)
[2] https://bugzilla.redhat.com/show_bug.cgi?id=290731
Comment 6 Christopher Head 2007-10-23 05:40:03 UTC
You misunderstand: it IS the kernel's fault.

First, I said that /dev/rtc* does not exist (not /dev/rtc) - this glob would match /dev/rtc0 as well.

Second, I said that on other machines, with identical configurations with respect to RTC class, that device node (/dev/rtc0) *does* exist.

Third, most importantly - the dmesg output. On machines where it "works", dmesg contains some lines about rtc0 being initialized. On machines where it doesn't work, dmesg does NOT contain those lines. Dmesg cannot be fooled by udev or hwclock, since the messages show up long before either program is run - in fact before ANY program is run, even init.
Comment 7 Robert Trace 2007-10-23 05:56:48 UTC
(In reply to comment #6)
> You misunderstand: it IS the kernel's fault.

Whoops, I see.  Sorry about that, I read your summary a little too quickly. :-)

The issue I detailed in comment #5 is still an issue, but you're corrent, it's not _this_ issue.  Sorry for the noise.

So, in (real :-) response to comment #0:
> It looks like the RTC Class CMOS driver is missing support for some kind of
> clock which is present in this machine and is supported by the Enhanced RTC
> driver.

What's the hardware platform?
Comment 8 Christopher Head 2007-10-23 07:15:45 UTC
Hardware is an archaic x86-based IBM Aptiva.

$ cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 3
model name      : Pentium II (Klamath)
stepping        : 3
cpu MHz         : 266.690
cache size      : 512 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 2
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov mmx
bogomips        : 533.86
clflush size    : 32

# lspci -vvvv
00:00.0 Host bridge: Intel Corporation 440LX/EX - 82443LX/EX Host bridge (rev 03)
        Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
        Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort+ >SERR- <PERR-
        Latency: 64
        Region 0: Memory at f8000000 (32-bit, prefetchable) [size=64M]
        Capabilities: [a0] AGP version 1.0
                Status: RQ=32 Iso- ArqSz=0 Cal=0 SBA+ ITACoh- GART64- HTrans- 64bit- FW- AGP3- Rate=x1,x2
                Command: RQ=1 ArqSz=0 Cal=0 SBA- AGP- GART64- 64bit- FW- Rate=<none>

00:01.0 PCI bridge: Intel Corporation 440LX/EX - 82443LX/EX AGP bridge (rev 03) (prog-if 00 [Normal decode])
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B-
        Status: Cap- 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
        Latency: 64
        Bus: primary=00, secondary=01, subordinate=01, sec-latency=64
        I/O behind bridge: 00002000-00002fff
        Memory behind bridge: 20000000-200fffff
        Prefetchable memory behind bridge: 21000000-21ffffff
        Secondary status: 66MHz+ FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- <SERR- <PERR-
        BridgeCtl: Parity- SERR- NoISA- VGA+ MAbort- >Reset- FastB2B-

00:07.0 ISA bridge: Intel Corporation 82371AB/EB/MB PIIX4 ISA (rev 01)
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
        Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
        Latency: 0

00:07.1 IDE interface: Intel Corporation 82371AB/EB/MB PIIX4 IDE (rev 01) (prog-if 80 [Master])
        Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
        Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
        Latency: 64
        Region 0: [virtual] Memory at 000001f0 (32-bit, non-prefetchable) [disabled] [size=8]
        Region 1: [virtual] Memory at 000003f0 (type 3, non-prefetchable) [disabled] [size=1]
        Region 2: [virtual] Memory at 00000170 (32-bit, non-prefetchable) [disabled] [size=8]
        Region 3: [virtual] Memory at 00000370 (type 3, non-prefetchable) [disabled] [size=1]
        Region 4: I/O ports at 1250 [size=16]

00:07.2 USB Controller: Intel Corporation 82371AB/EB/MB PIIX4 USB (rev 01) (prog-if 00 [UHCI])
        Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
        Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
        Interrupt: pin D routed to IRQ 0
        Region 4: I/O ports at 1000 [disabled] [size=32]

00:07.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 01)
        Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
        Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
        Interrupt: pin ? routed to IRQ 9

00:0a.0 Ethernet controller: 3Com Corporation 3c905B 100BaseTX [Cyclone] (rev 30)
        Subsystem: 3Com Corporation 3C905B Fast Etherlink XL 10/100
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B-
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
        Latency: 72 (2500ns min, 2500ns max), Cache Line Size: 32 bytes
        Interrupt: pin A routed to IRQ 12
        Region 0: I/O ports at 3000 [size=128]
        Region 1: Memory at 20100000 (32-bit, non-prefetchable) [size=128]
        [virtual] Expansion ROM at 10100000 [disabled] [size=128K]
        Capabilities: [dc] Power Management version 1
                Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0-,D1+,D2+,D3hot+,D3cold-)
                Status: D0 PME-Enable- DSel=0 DScale=0 PME-

00:12.0 Multimedia audio controller: Cirrus Logic CS 4610/11 [CrystalClear SoundFusion Audio Accelerator] (rev 01)
        Subsystem: IBM CS4610 SoundFusion Audio Accelerator
        Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
        Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
        Interrupt: pin A routed to IRQ 0
        Region 0: Memory at 10120000 (32-bit, non-prefetchable) [disabled] [size=4K]
        Region 1: Memory at 10000000 (32-bit, non-prefetchable) [disabled] [size=1M]

01:00.0 VGA compatible controller: ATI Technologies Inc 3D Rage Pro AGP 1X/2X (rev 5c) (prog-if 00 [VGA])
        Subsystem: ATI Technologies Inc Rage Pro Turbo AGP 2X
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping+ SERR- FastB2B-
        Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
        Latency: 64 (2000ns min), Cache Line Size: 32 bytes
        Region 0: Memory at 21000000 (32-bit, prefetchable) [size=16M]
        Region 1: I/O ports at 2000 [size=256]
        Region 2: Memory at 20000000 (32-bit, non-prefetchable) [size=4K]
        [virtual] Expansion ROM at 20020000 [disabled] [size=128K]
        Capabilities: [50] AGP version 1.0
                Status: RQ=256 Iso- ArqSz=0 Cal=0 SBA+ ITACoh- GART64- HTrans- 64bit- FW- AGP3- Rate=x1,x2
                Command: RQ=1 ArqSz=0 Cal=0 SBA- AGP- GART64- 64bit- FW- Rate=<none>

Anything else I can tell you? The dmesg outputs and kernel configs already posted are also from this same machine (actually I have another machine whose RTC also fails in the same way - works with Enhanced RTC but fails with RTC Class - also a fairly archaic IBM model).
Comment 9 Daniel Drake (RETIRED) gentoo-dev 2007-10-29 15:29:43 UTC
Created attachment 134648 [details, diff]
debug patch

please apply this kernel patch, boot an affected system with the RTC class drivers, and attach dmesg output. (please don't post it inline)
Comment 10 Christopher Head 2007-11-04 18:25:41 UTC
Created attachment 135178 [details]
dmesg output with debug patch

Looks like init happens, but probe doesn't.
Comment 11 Daniel Drake (RETIRED) gentoo-dev 2007-11-05 12:59:24 UTC
How about if you enable CONFIG_ISA (or CONFIG_ACPI), then enable CONFIG_PNP, then recompile/reboot/etc?

It will silence my patch but might make your rtc appear.
Comment 12 Christopher Head 2007-11-09 08:04:34 UTC
OK, I enabled CONFIG_ISA, CONFIG_PNP, CONFIG_ISAPNP, and CONFIG_PNPBIOS. One of those items made my RTC show up and start working apparently-perfectly. I'm going to figure out which option made it work and which I can turn back off.

I'll close the bug now and open a new one if this solution doesn't work on my other machine (since all the attachments and such would have the wrong information in them).

In retrospect, it's entirely possible that all the other machines on which the RTC class worked had ACPI support (these two machines are too old; they don't have ACPI tables).
Comment 13 Daniel Drake (RETIRED) gentoo-dev 2007-11-09 08:54:51 UTC
You just need CONFIG_PNP, but that requires either CONFIG_ISA or CONFIG_ACPI.

When CONFIG_PNP is set, the behaviour of the rtc-cmos driver changes drastically. Without CONFIG_PNP, rtc-cmos uses a platform device which is only created on a few lesser common platforms (MIPS and something else).

The only reason the old "enhanced RTC" driver works without CONFIG_PNP is because it's a bit of a hack :)