On Wed, Feb 15, Paul Mackeras wrote: > Benjamin Herrenschmidt writes: > > > Ok, does not using NTP fixes it ? > > Try this patch. With this the values from gettimeofday() or the VDSO > should stay exactly in sync with xtime even if NTP is adjusting the > clock. > > This patch still has quite a few debugging printks in it, so it's not > final by any means. I'll be interested to hear how it goes, and in > particular whether or not you see any "oops, time got ahead" messages. This fixes my hang during boot. --- bad.txt 2006-02-03 12:01:24.000000000 +0100 +++ good.txt 2006-02-03 11:47:59.000000000 +0100 @@ -34,12 +34,20 @@ GMT Delta read from XPRAM: 120 minutes, DST: on time_init: decrementer frequency = 33.290001 MHz time_init: processor frequency = 466.666665 MHz +HZ = 250 tb_freq = 33290001 tick_nsec = 4000000 +tb_to_xs = 810448dc5c2ca70 (old way) +ticklen_to_xs = 0 10e9155d07742ee3 +tb_to_xs = 8104491d617e483 (new way) Console: colour dummy device 80x25 pmac_zilog: i2c-modem detected, id: 1 Dentry cache hash table entries: 65536 (order: 6, 262144 bytes) Inode-cache hash table entries: 32768 (order: 5, 131072 bytes) +oops, time got ahead: 1138967190.003999 > 1138959990.000000000 + xtime was 0.000000000 tb was 0 tick 909725147 + tlen 0x3d0900000 tb now 909726490 tpj 133160 + gtod tbstamp 909591987 xsec 0x43e3429600000 t2x 0x8104491d617e483 High memory: 0k -Memory: 251768k/262144k available (3416k kernel code, 10064k reserved, 556k data, 467k bss, 196k init) +Memory: 251768k/262144k available (3420k kernel code, 10072k reserved, 556k data, 467k bss, 196k init) Calibrating delay loop... 66.30 BogoMIPS (lpj=132608) Security Framework v1.0.0 initialized Mount-cache hash table entries: 512 @@ -71,7 +79,7 @@ TC classifier action (bugs to netdev@vger.kernel.org cc hadi@cyberus.ca) Thermal assist unit using timers, shrink_timer: 500 jiffies audit: initializing netlink socket (disabled) -audit(1138960784.708:1): initialized +audit(1138959990.708:1): initialized VFS: Disk quotas dquot_6.5.1 Dquot-cache hash table entries: 1024 (order 0, 4096 bytes) Initializing Cryptographic API @@ -198,8 +206,8 @@ ide-floppy driver 0.99.newide hdd: No disk in drive hdd: 0kB, 0/64/32 CHS, 4096 kBps, 512 sector size, 2941 rpm -device-mapper: 4.5.0-ioctl (2005-10-04) initialised: dm-devel@redhat.com -dm-netlink version 0.0.2 loaded +hdc: ATAPI 32X CD-ROM CD-R/RW drive, 4096kB Cache, (U)DMA +Uniform CD-ROM driver Revision: 3.20 USB Universal Host Controller Interface driver v2.3 PCI: Enabling device 0001:10:12.0 (0014 -> 0015) PCI: Via IRQ fixup for 0001:10:12.0, from 52 to 4 @@ -241,34 +249,36 @@ usb usb5: configuration #1 chosen from 1 choice hub 5-0:1.0: USB hub found hub 5-0:1.0: 4 ports detected -hdc: ATAPI 32X CD-ROM CD-R/RW drive, 4096kB Cache, (U)DMA -Uniform CD-ROM driver Revision: 3.20 8139too Fast Ethernet driver 0.9.27 +sungem.c:v0.98 8/24/03 David S. Miller (davem@redhat.com) PCI: Enabling device 0001:10:14.0 (0004 -> 0007) -eth0: RealTek RTL8139 at 0xd106e000, 00:50:fc:76:65:12, IRQ 54 +eth0: RealTek RTL8139 at 0xd105a000, 00:50:fc:76:65:12, IRQ 54 eth0: Identified 8139 chip type 'RTL-8100B/8139D' -8139cp: 10/100 PCI Ethernet driver v1.2 (Mar 22, 2004) -sungem.c:v0.98 8/24/03 David S. Miller (davem@redhat.com) PHY ID: 206053, addr: 0 +eth1: Sun GEM (PCI) 10/100/1000BaseT Ethernet 00:30:65:f3:4c:ae +eth1: Found BCM5401 PHY +8139cp: 10/100 PCI Ethernet driver v1.2 (Mar 22, 2004) ieee1394: Initialized config rom entry `ip1394' +JBD: barrier-based sync failed on hda13 - disabling barriers PCI: Enabling device 0001:10:12.3 (0090 -> 0093) PCI: Via IRQ fixup for 0001:10:12.3, from 52 to 4 ohci1394: fw-host0: OHCI-1394 1.0 (PCI): IRQ=[52] MMIO=[80084000-800847ff] Max Packet=[2048] IR/IT contexts=[8/8] -eth1: Sun GEM (PCI) 10/100/1000BaseT Ethernet 00:30:65:f3:4c:ae -eth1: Found BCM5401 PHY ohci1394: fw-host1: Unexpected PCI resource length of 1000! ohci1394: fw-host1: OHCI-1394 1.0 (PCI): IRQ=[40] MMIO=[f5000000-f50007ff] Max Packet=[2048] IR/IT contexts=[8/8] -JBD: barrier-based sync failed on hda13 - disabling barriers ieee1394: Host added: ID:BUS[0-00:1023] GUID[0011060000006685] -ieee1394: Host added: ID:BUS[1-00:1023] GUID[003065fffef34cae] eth1: Link is up at 100 Mbps, full-duplex. +ieee1394: Host added: ID:BUS[1-00:1023] GUID[003065fffef34cae] +device-mapper: 4.5.0-ioctl (2005-10-04) initialised: dm-devel@redhat.com +dm-netlink version 0.0.2 loaded +hdd: No disk in drive loop: loaded (max 8 devices) kjournald starting. Commit interval 5 seconds EXT3 FS on hda14, internal journal EXT3-fs: mounted filesystem with ordered data mode. AppArmor: AppArmor (version 2.0-19.43r6152) initialized -audit(1138960811.468:2): AppArmor (version 2.0-19.43r6152) initialized +audit(1138960018.908:2): AppArmor (version 2.0-19.43r6152) initialized +do_settimeofday(1138963619.000000000) eth1: Link is up at 100 Mbps, full-duplex. eth1: Pause is enabled (rxfifo: 10240 off: 7168 on: 5632) NET: Registered protocol family 10