linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* HPET timer broken using 2.6.23.13 / nanosleep() hangs
@ 2008-01-13 11:10 Andrew Paprocki
  2008-01-13 12:03 ` Dhaval Giani
  2008-01-14 12:59 ` Clemens Ladisch
  0 siblings, 2 replies; 12+ messages in thread
From: Andrew Paprocki @ 2008-01-13 11:10 UTC (permalink / raw)
  To: linux-kernel

I started debugging a problem I was having with my sky2 network driver
under 2.6.23.13. The investigation led me to find that the HPET timer
wasn't working at all, causing the sky2 driver to not work properly.
Simple example:

am2:/sys/devices/system/clocksource/clocksource0# cat current_clocksource
jiffies
am2:/sys/devices/system/clocksource/clocksource0# time sleep 1
real    0m1.000s
user    0m0.000s
sys     0m0.000s
am2:/sys/devices/system/clocksource/clocksource0# echo tsc > current_clocksource
am2:/sys/devices/system/clocksource/clocksource0# time sleep 1
real    0m1.005s
user    0m0.004s
sys     0m0.000s
am2:/sys/devices/system/clocksource/clocksource0# echo hpet >
current_clocksource
am2:/sys/devices/system/clocksource/clocksource0# time sleep 1
<hangs indefinetly...>

Running strace shows it blocked on nanosleep(). I'm building the
kernel with the processor type set to Athalon64. I've built it with
and without SMP and high-res timers enabled and I get the same result.
My previous 2.6.18-4 kernel works because it does not install HPET as
the default timer. The same behavior occurs in 2.6.24-rc7 git head.
I've attached the config/dmesg below.

-Andrew

Under 2.6.18-4 (Debian stock kernel):

ACPI: HPET id: 0x10b9a201 base: 0xfed00000
hpet0: at MMIO 0xfed00000 (virtual 0xf8800000), IRQs 2, 8, 0, 0
hpet0: 4 32-bit timers, 14318180 Hz
Using HPET for base-timer
hpet_resources: 0xfed00000 is busy
Time: tsc clocksource has been installed.

Under 2.6.23.13 w/ SMP:

ACPI: HPET 37FE7400, 0038 (r1 RS690  AWRDACPI 42302E31 AWRD       98)
ACPI: HPET id: 0x10b9a201 base: 0xfed00000
Time: tsc clocksource has been installed.
Clocksource tsc unstable (delta = 500013666 ns)
Time: hpet clocksource has been installed.

Relevant top of .config from 2.6.23.13:

CONFIG_X86_32=y
CONFIG_GENERIC_TIME=y
CONFIG_GENERIC_CMOS_UPDATE=y
CONFIG_CLOCKSOURCE_WATCHDOG=y
CONFIG_GENERIC_CLOCKEVENTS=y
CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
CONFIG_LOCKDEP_SUPPORT=y
CONFIG_STACKTRACE_SUPPORT=y
CONFIG_SEMAPHORE_SLEEPERS=y
CONFIG_X86=y
CONFIG_MMU=y
CONFIG_ZONE_DMA=y
CONFIG_QUICKLIST=y
CONFIG_GENERIC_ISA_DMA=y
CONFIG_GENERIC_IOMAP=y
CONFIG_GENERIC_BUG=y
CONFIG_GENERIC_HWEIGHT=y
CONFIG_ARCH_MAY_HAVE_PC_FDC=y
CONFIG_DMI=y
CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"

#
# General setup
#
CONFIG_EXPERIMENTAL=y
CONFIG_LOCK_KERNEL=y
CONFIG_INIT_ENV_ARG_LIMIT=32
CONFIG_LOCALVERSION=""
# CONFIG_LOCALVERSION_AUTO is not set
CONFIG_SWAP=y
CONFIG_SYSVIPC=y
CONFIG_SYSVIPC_SYSCTL=y
# CONFIG_POSIX_MQUEUE is not set
# CONFIG_BSD_PROCESS_ACCT is not set
# CONFIG_TASKSTATS is not set
# CONFIG_USER_NS is not set
# CONFIG_AUDIT is not set
# CONFIG_IKCONFIG is not set
CONFIG_LOG_BUF_SHIFT=17
# CONFIG_CPUSETS is not set
CONFIG_SYSFS_DEPRECATED=y
# CONFIG_RELAY is not set
CONFIG_BLK_DEV_INITRD=y
CONFIG_INITRAMFS_SOURCE=""
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_SYSCTL=y
# CONFIG_EMBEDDED is not set
CONFIG_UID16=y
CONFIG_SYSCTL_SYSCALL=y
CONFIG_KALLSYMS=y
# CONFIG_KALLSYMS_EXTRA_PASS is not set
CONFIG_HOTPLUG=y
CONFIG_PRINTK=y
CONFIG_BUG=y
CONFIG_ELF_CORE=y
CONFIG_BASE_FULL=y
CONFIG_FUTEX=y
CONFIG_ANON_INODES=y
CONFIG_EPOLL=y
CONFIG_SIGNALFD=y
CONFIG_EVENTFD=y
CONFIG_SHMEM=y
CONFIG_VM_EVENT_COUNTERS=y
CONFIG_SLAB=y
# CONFIG_SLUB is not set
# CONFIG_SLOB is not set
CONFIG_RT_MUTEXES=y
# CONFIG_TINY_SHMEM is not set
CONFIG_BASE_SMALL=0
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
CONFIG_MODULE_FORCE_UNLOAD=y
CONFIG_MODVERSIONS=y
# CONFIG_MODULE_SRCVERSION_ALL is not set
CONFIG_KMOD=y
CONFIG_STOP_MACHINE=y
CONFIG_BLOCK=y
CONFIG_LBD=y
# CONFIG_BLK_DEV_IO_TRACE is not set
CONFIG_LSF=y
# CONFIG_BLK_DEV_BSG is not set

#
# IO Schedulers
#
CONFIG_IOSCHED_NOOP=y
CONFIG_IOSCHED_AS=y
CONFIG_IOSCHED_DEADLINE=y
CONFIG_IOSCHED_CFQ=y
# CONFIG_DEFAULT_AS is not set
# CONFIG_DEFAULT_DEADLINE is not set
CONFIG_DEFAULT_CFQ=y
# CONFIG_DEFAULT_NOOP is not set
CONFIG_DEFAULT_IOSCHED="cfq"

#
# Processor type and features
#
# CONFIG_TICK_ONESHOT is not set
# CONFIG_NO_HZ is not set
# CONFIG_HIGH_RES_TIMERS is not set
CONFIG_SMP=y
CONFIG_X86_PC=y
CONFIG_MK8=y
CONFIG_X86_GENERIC=y
CONFIG_X86_CMPXCHG=y
CONFIG_X86_L1_CACHE_SHIFT=7
CONFIG_X86_XADD=y
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
CONFIG_GENERIC_CALIBRATE_DELAY=y
CONFIG_X86_WP_WORKS_OK=y
CONFIG_X86_INVLPG=y
CONFIG_X86_BSWAP=y
CONFIG_X86_POPAD_OK=y
CONFIG_X86_GOOD_APIC=y
CONFIG_X86_INTEL_USERCOPY=y
CONFIG_X86_USE_PPRO_CHECKSUM=y
CONFIG_X86_TSC=y
CONFIG_X86_MINIMUM_CPU_FAMILY=4
CONFIG_HPET_TIMER=y
CONFIG_HPET_EMULATE_RTC=y
CONFIG_NR_CPUS=2
# CONFIG_SCHED_SMT is not set
CONFIG_SCHED_MC=y
CONFIG_PREEMPT_NONE=y
# CONFIG_PREEMPT_VOLUNTARY is not set
# CONFIG_PREEMPT is not set
CONFIG_PREEMPT_BKL=y
CONFIG_X86_LOCAL_APIC=y
CONFIG_X86_IO_APIC=y
# CONFIG_X86_MCE is not set
CONFIG_VM86=y
# CONFIG_TOSHIBA is not set
# CONFIG_I8K is not set
# CONFIG_X86_REBOOTFIXUPS is not set
# CONFIG_MICROCODE is not set
CONFIG_X86_MSR=y
CONFIG_X86_CPUID=y

dmesg full output until HPET is installed:

Linux version 2.6.23.13 (root@am2) (gcc version 4.1.2 20061115
(prerelease) (Debian 4.1.1-21)) #7 SMP Sun Jan 13 05:02:40
 EST 2008
BIOS-provided physical RAM map:
 BIOS-e820: 0000000000000000 - 000000000009f800 (usable)
 BIOS-e820: 000000000009f800 - 00000000000a0000 (reserved)
 BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)
 BIOS-e820: 0000000000100000 - 0000000037fe0000 (usable)
 BIOS-e820: 0000000037fe0000 - 0000000037fe3000 (ACPI NVS)
 BIOS-e820: 0000000037fe3000 - 0000000037ff0000 (ACPI data)
 BIOS-e820: 0000000037ff0000 - 0000000038000000 (reserved)
 BIOS-e820: 00000000e0000000 - 00000000f0000000 (reserved)
 BIOS-e820: 00000000fec00000 - 0000000100000000 (reserved)
0MB HIGHMEM available.
895MB LOWMEM available.
found SMP MP-table at 000f3b50
Entering add_active_range(0, 0, 229344) 0 entries of 256 used
Zone PFN ranges:
  DMA             0 ->     4096
  Normal       4096 ->   229344
  HighMem    229344 ->   229344
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
    0:        0 ->   229344
On node 0 totalpages: 229344
  DMA zone: 32 pages used for memmap
  DMA zone: 0 pages reserved
  DMA zone: 4064 pages, LIFO batch:0
  Normal zone: 1759 pages used for memmap
  Normal zone: 223489 pages, LIFO batch:31
  HighMem zone: 0 pages used for memmap
  Movable zone: 0 pages used for memmap
DMI 2.5 present.
ACPI: RSDP 000F7CE0, 0024 (r2 RS690 )
ACPI: RSDT 37FE3040, 0034 (r1 RS690  AWRDACPI 42302E31 AWRD        0)
ACPI: FACP 37FE30C0, 0074 (r1 RS690  AWRDACPI 42302E31 AWRD        0)
ACPI: DSDT 37FE3180, 4146 (r1 RS690  AWRDACPI     1000 MSFT  100000E)
ACPI: FACS 37FE0000, 0040
ACPI: HPET 37FE7400, 0038 (r1 RS690  AWRDACPI 42302E31 AWRD       98)
ACPI: MCFG 37FE7480, 003C (r1 RS690  AWRDACPI 42302E31 AWRD        0)
ACPI: APIC 37FE7340, 0068 (r1 RS690  AWRDACPI 42302E31 AWRD        0)
ATI board detected. Disabling timer routing over 8254.
ACPI: PM-Timer IO Port: 0x4008
ACPI: Local APIC address 0xfee00000
ACPI: LAPIC (acpi_id[0x00] lapic_id[0x00] enabled)
Processor #0 15:15 APIC version 16
ACPI: LAPIC (acpi_id[0x01] lapic_id[0x01] disabled)
ACPI: LAPIC_NMI (acpi_id[0x00] high edge lint[0x1])
ACPI: LAPIC_NMI (acpi_id[0x01] high edge lint[0x1])
ACPI: IOAPIC (id[0x02] address[0xfec00000] gsi_base[0])
IOAPIC[0]: apic_id 2, version 33, address 0xfec00000, GSI 0-23
ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 low level)
ACPI: IRQ0 used by override.
ACPI: IRQ2 used by override.
ACPI: IRQ9 used by override.
Enabling APIC mode:  Flat.  Using 1 I/O APICs
ACPI: HPET id: 0x10b9a201 base: 0xfed00000
Using ACPI (MADT) for SMP configuration information
Allocating PCI resources starting at 40000000 (gap: 38000000:a8000000)
Built 1 zonelists in Zone order.  Total pages: 227553
Kernel command line: vga=0x31a root=/dev/sda1 ro
mapped APIC to ffffb000 (fee00000)
mapped IOAPIC to ffffa000 (fec00000)
Enabling fast FPU save and restore... done.
Enabling unmasked SIMD FPU exception support... done.
Initializing CPU#0
PID hash table entries: 4096 (order: 12, 16384 bytes)
Detected 2400.121 MHz processor.
Console: colour dummy device 80x25
console [tty0] enabled
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
Memory: 904288k/917376k available (2775k kernel code, 12644k reserved,
1154k data, 228k init, 0k highmem)
virtual kernel memory layout:
    fixmap  : 0xfff9b000 - 0xfffff000   ( 400 kB)
    pkmap   : 0xff800000 - 0xffc00000   (4096 kB)
    vmalloc : 0xf8800000 - 0xff7fe000   ( 111 MB)
    lowmem  : 0xc0000000 - 0xf7fe0000   ( 895 MB)
      .init : 0xc04df000 - 0xc0518000   ( 228 kB)
      .data : 0xc03b5d36 - 0xc04d66ac   (1154 kB)
      .text : 0xc0100000 - 0xc03b5d36   (2775 kB)
Checking if this processor honours the WP bit even in supervisor mode... Ok.
Calibrating delay using timer specific routine.. 4927.60 BogoMIPS (lpj=9855209)
Mount-cache hash table entries: 512
CPU: After generic identify, caps: 078bfbff ebd3fbff 00000000 00000000
00002001 00000000 0000001d 00000000
CPU: L1 I Cache: 64K (64 bytes/line), D cache 64K (64 bytes/line)
CPU: L2 Cache: 512K (64 bytes/line)
CPU: After all inits, caps: 078bfbff ebd3fbff 00000000 00000410
00002001 00000000 0000001d 00000000
Compat vDSO mapped to ffffe000.
Checking 'hlt' instruction... OK.
SMP alternatives: switching to UP code
Freeing SMP alternatives: 16k freed
ACPI: Core revision 20070126
CPU0: AMD Athlon(tm) 64 Processor 3800+ stepping 02
Total of 1 processors activated (4927.60 BogoMIPS).
ENABLING IO-APIC IRQs
..TIMER: vector=0x31 apic1=0 pin1=2 apic2=-1 pin2=-1
Brought up 1 CPUs
xor: automatically using best checksumming function: pIII_sse
   pIII_sse  :  7361.000 MB/sec
xor: using function: pIII_sse (7361.000 MB/sec)
NET: Registered protocol family 16
ACPI: bus type pci registered
PCI: Using MMCONFIG
PCI: No mmconfig possible on device 00:18
Setting up standard PCI resources
ACPI: EC: Look up EC in DSDT
ACPI: Interpreter enabled
ACPI: (supports S0 S1 S5)
ACPI: Using IOAPIC for interrupt routing
ACPI: PCI Root Bridge [PCI0] (0000:00)
PCI: Transparent bridge - 0000:00:14.4
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.P2P_._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.PCE6._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.AGP_._PRT]
ACPI: PCI Interrupt Link [LNKA] (IRQs 3 4 5 6 7 10 11) *0, disabled.
ACPI: PCI Interrupt Link [LNKB] (IRQs 3 4 5 6 7 10 11) *0, disabled.
ACPI: PCI Interrupt Link [LNKC] (IRQs 3 4 5 6 7 10 11) *0, disabled.
ACPI: PCI Interrupt Link [LNKD] (IRQs 3 4 5 6 7 10 11) *0, disabled.
ACPI: PCI Interrupt Link [LNKE] (IRQs 3 4 5 6 7 10 11) *0, disabled.
ACPI: PCI Interrupt Link [LNKF] (IRQs 3 4 5 6 7 10 11) *0, disabled.
ACPI: PCI Interrupt Link [LNK0] (IRQs 3 4 5 6 7 10 11) *0, disabled.
ACPI: PCI Interrupt Link [LNK1] (IRQs 3 4 5 6 7 10 11) *0, disabled.
Linux Plug and Play Support v0.97 (c) Adam Belay
pnp: PnP ACPI init
ACPI: bus type pnp registered
pnp: PnP ACPI: found 11 devices
ACPI: ACPI bus type pnp unregistered
SCSI subsystem initialized
libata version 2.21 loaded.
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
PCI: Using ACPI for IRQ routing
PCI: If a device doesn't work, try "pci=routeirq".  If it helps, post a report
PCI: Cannot allocate resource region 1 of device 0000:00:14.0
ACPI: RTC can wake from S4
Time: tsc clocksource has been installed.
pnp: 00:01: ioport range 0x4100-0x411f has been reserved
pnp: 00:01: ioport range 0x228-0x22f has been reserved
pnp: 00:01: ioport range 0x40b-0x40b has been reserved
pnp: 00:01: ioport range 0x4d6-0x4d6 has been reserved
pnp: 00:01: ioport range 0xc00-0xc01 has been reserved
pnp: 00:01: ioport range 0xc14-0xc14 has been reserved
pnp: 00:01: ioport range 0xc50-0xc52 has been reserved
pnp: 00:01: ioport range 0xc6c-0xc6d has been reserved
pnp: 00:09: iomem range 0xe0000000-0xefffffff could not be reserved
pnp: 00:0a: iomem range 0xf0000-0xfffff could not be reserved
pnp: 00:0a: iomem range 0xfed00000-0xfed000ff could not be reserved
pnp: 00:0a: iomem range 0x37fe0000-0x37ffffff could not be reserved
pnp: 00:0a: iomem range 0xffff0000-0xffffffff could not be reserved
PCI: Bridge: 0000:00:01.0
  IO window: d000-dfff
  MEM window: fde00000-fdffffff
  PREFETCH window: d8000000-dfffffff
PCI: Bridge: 0000:00:06.0
  IO window: e000-efff
  MEM window: fdd00000-fddfffff
  PREFETCH window: fdc00000-fdcfffff
PCI: Bridge: 0000:00:14.4
  IO window: c000-cfff
  MEM window: fdb00000-fdbfffff
  PREFETCH window: fda00000-fdafffff
PCI: Setting latency timer of device 0000:00:06.0 to 64
...
input: Power Button (FF) as /class/input/input0
ACPI: Power Button (FF) [PWRF]
input: Power Button (CM) as /class/input/input1
ACPI: Power Button (CM) [PWRB]
ACPI: Fan [FAN] (on)
ACPI Exception (processor_core-0818): AE_NOT_FOUND, Processor Device
is not present [20070126]
ACPI Exception (processor_core-0818): AE_NOT_FOUND, Processor Device
is not present [20070126]
ACPI Exception (processor_core-0818): AE_NOT_FOUND, Processor Device
is not present [20070126]
ACPI: Thermal Zone [THRM] (-127 C)
Real Time Clock Driver v1.12ac
Non-volatile memory driver v1.2
...
Clocksource tsc unstable (delta = 500013666 ns)
Time: hpet clocksource has been installed.

dmidecode:

BIOS Information
        Vendor: Phoenix Technologies, LTD
        Version: 6.00 PG
        Release Date: 04/03/2007
        Address: 0xE0000
        Runtime Size: 128 kB
        ROM Size: 512 kB

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: HPET timer broken using 2.6.23.13 / nanosleep() hangs
  2008-01-13 11:10 HPET timer broken using 2.6.23.13 / nanosleep() hangs Andrew Paprocki
@ 2008-01-13 12:03 ` Dhaval Giani
  2008-01-13 13:10   ` Andrew Paprocki
  2008-01-14 12:59 ` Clemens Ladisch
  1 sibling, 1 reply; 12+ messages in thread
From: Dhaval Giani @ 2008-01-13 12:03 UTC (permalink / raw)
  To: Andrew Paprocki; +Cc: linux-kernel, Balaji Rao

On Sun, Jan 13, 2008 at 06:10:52AM -0500, Andrew Paprocki wrote:
> I started debugging a problem I was having with my sky2 network driver
> under 2.6.23.13. The investigation led me to find that the HPET timer
> wasn't working at all, causing the sky2 driver to not work properly.
> Simple example:
> 
> am2:/sys/devices/system/clocksource/clocksource0# cat current_clocksource
> jiffies
> am2:/sys/devices/system/clocksource/clocksource0# time sleep 1
> real    0m1.000s
> user    0m0.000s
> sys     0m0.000s
> am2:/sys/devices/system/clocksource/clocksource0# echo tsc > current_clocksource
> am2:/sys/devices/system/clocksource/clocksource0# time sleep 1
> real    0m1.005s
> user    0m0.004s
> sys     0m0.000s
> am2:/sys/devices/system/clocksource/clocksource0# echo hpet >
> current_clocksource
> am2:/sys/devices/system/clocksource/clocksource0# time sleep 1
> <hangs indefinetly...>
> 
> Running strace shows it blocked on nanosleep(). I'm building the
> kernel with the processor type set to Athalon64. I've built it with
> and without SMP and high-res timers enabled and I get the same result.
> My previous 2.6.18-4 kernel works because it does not install HPET as
> the default timer. The same behavior occurs in 2.6.24-rc7 git head.
> I've attached the config/dmesg below.
> 

It seems the HPET timer was not being assigned any IRQs at all. Can you
try the patch at http://lkml.org/lkml/2008/1/12/128 ?

Thanks,
-- 
regards,
Dhaval

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: HPET timer broken using 2.6.23.13 / nanosleep() hangs
  2008-01-13 12:03 ` Dhaval Giani
@ 2008-01-13 13:10   ` Andrew Paprocki
  2008-01-13 14:06     ` Dhaval Giani
  0 siblings, 1 reply; 12+ messages in thread
From: Andrew Paprocki @ 2008-01-13 13:10 UTC (permalink / raw)
  To: Dhaval Giani; +Cc: linux-kernel, Balaji Rao

I applied the patch to my 2.6.23.13 tree and upon reboot it stopped right after:

Clocksource tsc unstable (delta = ... ns)
Time: hpet clocksource has been installed.

It locked up hard.. cursor stopped blinking and SysRq isn't working either.

-Andrew

On Jan 13, 2008 7:03 AM, Dhaval Giani <dhaval@linux.vnet.ibm.com> wrote:
>
> On Sun, Jan 13, 2008 at 06:10:52AM -0500, Andrew Paprocki wrote:
> > I started debugging a problem I was having with my sky2 network driver
> > under 2.6.23.13. The investigation led me to find that the HPET timer
> > wasn't working at all, causing the sky2 driver to not work properly.
> > Simple example:
> >
> > am2:/sys/devices/system/clocksource/clocksource0# cat current_clocksource
> > jiffies
> > am2:/sys/devices/system/clocksource/clocksource0# time sleep 1
> > real    0m1.000s
> > user    0m0.000s
> > sys     0m0.000s
> > am2:/sys/devices/system/clocksource/clocksource0# echo tsc > current_clocksource
> > am2:/sys/devices/system/clocksource/clocksource0# time sleep 1
> > real    0m1.005s
> > user    0m0.004s
> > sys     0m0.000s
> > am2:/sys/devices/system/clocksource/clocksource0# echo hpet >
> > current_clocksource
> > am2:/sys/devices/system/clocksource/clocksource0# time sleep 1
> > <hangs indefinetly...>
> >
> > Running strace shows it blocked on nanosleep(). I'm building the
> > kernel with the processor type set to Athalon64. I've built it with
> > and without SMP and high-res timers enabled and I get the same result.
> > My previous 2.6.18-4 kernel works because it does not install HPET as
> > the default timer. The same behavior occurs in 2.6.24-rc7 git head.
> > I've attached the config/dmesg below.
> >
>
> It seems the HPET timer was not being assigned any IRQs at all. Can you
> try the patch at http://lkml.org/lkml/2008/1/12/128 ?
>
> Thanks,
> --
> regards,
> Dhaval
>
>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: HPET timer broken using 2.6.23.13 / nanosleep() hangs
  2008-01-13 13:10   ` Andrew Paprocki
@ 2008-01-13 14:06     ` Dhaval Giani
  2008-01-16 14:15       ` Thomas Gleixner
  0 siblings, 1 reply; 12+ messages in thread
From: Dhaval Giani @ 2008-01-13 14:06 UTC (permalink / raw)
  To: Andrew Paprocki
  Cc: linux-kernel, Balaji Rao, Andrew Morton, Ingo Molnar, tglx,
	clemens, venkatesh.pallipadi, bob.picco

On Sun, Jan 13, 2008 at 08:10:46AM -0500, Andrew Paprocki wrote:
> I applied the patch to my 2.6.23.13 tree and upon reboot it stopped right after:
> 
> Clocksource tsc unstable (delta = ... ns)
> Time: hpet clocksource has been installed.
> 
> It locked up hard.. cursor stopped blinking and SysRq isn't working either.
> 

It obviously is the wrong fix then :).

Adding a few cc's. Hopefully they will know what to do better than me.

> -Andrew
> 
> On Jan 13, 2008 7:03 AM, Dhaval Giani <dhaval@linux.vnet.ibm.com> wrote:
> >
> > On Sun, Jan 13, 2008 at 06:10:52AM -0500, Andrew Paprocki wrote:
> > > I started debugging a problem I was having with my sky2 network driver
> > > under 2.6.23.13. The investigation led me to find that the HPET timer
> > > wasn't working at all, causing the sky2 driver to not work properly.
> > > Simple example:
> > >
> > > am2:/sys/devices/system/clocksource/clocksource0# cat current_clocksource
> > > jiffies
> > > am2:/sys/devices/system/clocksource/clocksource0# time sleep 1
> > > real    0m1.000s
> > > user    0m0.000s
> > > sys     0m0.000s
> > > am2:/sys/devices/system/clocksource/clocksource0# echo tsc > current_clocksource
> > > am2:/sys/devices/system/clocksource/clocksource0# time sleep 1
> > > real    0m1.005s
> > > user    0m0.004s
> > > sys     0m0.000s
> > > am2:/sys/devices/system/clocksource/clocksource0# echo hpet >
> > > current_clocksource
> > > am2:/sys/devices/system/clocksource/clocksource0# time sleep 1
> > > <hangs indefinetly...>
> > >
> > > Running strace shows it blocked on nanosleep(). I'm building the
> > > kernel with the processor type set to Athalon64. I've built it with
> > > and without SMP and high-res timers enabled and I get the same result.
> > > My previous 2.6.18-4 kernel works because it does not install HPET as
> > > the default timer. The same behavior occurs in 2.6.24-rc7 git head.
> > > I've attached the config/dmesg below.
> > >
> >
> > It seems the HPET timer was not being assigned any IRQs at all. Can you
> > try the patch at http://lkml.org/lkml/2008/1/12/128 ?
> >
> > Thanks,
> > --
> > regards,
> > Dhaval
> >
> >

-- 
regards,
Dhaval

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: HPET timer broken using 2.6.23.13 / nanosleep() hangs
  2008-01-13 11:10 HPET timer broken using 2.6.23.13 / nanosleep() hangs Andrew Paprocki
  2008-01-13 12:03 ` Dhaval Giani
@ 2008-01-14 12:59 ` Clemens Ladisch
  2008-01-14 14:12   ` Balaji Rao
  1 sibling, 1 reply; 12+ messages in thread
From: Clemens Ladisch @ 2008-01-14 12:59 UTC (permalink / raw)
  To: Andrew Paprocki; +Cc: linux-kernel

Andrew Paprocki wrote:
> I started debugging a problem I was having with my sky2 network driver
> under 2.6.23.13. The investigation led me to find that the HPET timer
> wasn't working at all, causing the sky2 driver to not work properly.
> Simple example:
>
> am2:/sys/devices/system/clocksource/clocksource0# echo hpet > current_clocksource
> am2:/sys/devices/system/clocksource/clocksource0# time sleep 1
> <hangs indefinetly...>
>
> Running strace shows it blocked on nanosleep(). I'm building the
> kernel with the processor type set to Athalon64. I've built it with
> and without SMP and high-res timers enabled and I get the same result.
> My previous 2.6.18-4 kernel works because it does not install HPET as
> the default timer. The same behavior occurs in 2.6.24-rc7 git head.
> I've attached the config/dmesg below.
>
> Under 2.6.18-4 (Debian stock kernel):
>
> ACPI: HPET id: 0x10b9a201 base: 0xfed00000
> hpet0: at MMIO 0xfed00000 (virtual 0xf8800000), IRQs 2, 8, 0, 0
> hpet0: 4 32-bit timers, 14318180 Hz
> Using HPET for base-timer
> hpet_resources: 0xfed00000 is busy
> Time: tsc clocksource has been installed.
>
> Under 2.6.23.13 w/ SMP:
>
> ACPI: HPET 37FE7400, 0038 (r1 RS690  AWRDACPI 42302E31 AWRD       98)
> ACPI: HPET id: 0x10b9a201 base: 0xfed00000
> Time: tsc clocksource has been installed.
> Clocksource tsc unstable (delta = 500013666 ns)
> Time: hpet clocksource has been installed.

The lines prefixed with "hpet0:" are missing; apparently, hpet_alloc()
was never called because hpet_reserve_platform_timers() is disabled
because CONFIG_HPET is not set.  Try enabling this option.  (CONFIG_HPET
is in the "Character Devices" kernel config menu.)

That this option would be required to get the platform HPET code to work
seems like a bug.


Regards,
Clemens

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: HPET timer broken using 2.6.23.13 / nanosleep() hangs
  2008-01-14 12:59 ` Clemens Ladisch
@ 2008-01-14 14:12   ` Balaji Rao
  0 siblings, 0 replies; 12+ messages in thread
From: Balaji Rao @ 2008-01-14 14:12 UTC (permalink / raw)
  To: Clemens Ladisch; +Cc: Andrew Paprocki, linux-kernel

On Monday 14 January 2008 06:29:27 pm Clemens Ladisch wrote:
> Andrew Paprocki wrote:
> > I started debugging a problem I was having with my sky2 network driver
> > under 2.6.23.13. The investigation led me to find that the HPET timer
> > wasn't working at all, causing the sky2 driver to not work properly.
> > Simple example:
> >
> > am2:/sys/devices/system/clocksource/clocksource0# echo hpet >
> > current_clocksource am2:/sys/devices/system/clocksource/clocksource0#
> > time sleep 1
> > <hangs indefinetly...>
> >
> > Running strace shows it blocked on nanosleep(). I'm building the
> > kernel with the processor type set to Athalon64. I've built it with
> > and without SMP and high-res timers enabled and I get the same result.
> > My previous 2.6.18-4 kernel works because it does not install HPET as
> > the default timer. The same behavior occurs in 2.6.24-rc7 git head.
> > I've attached the config/dmesg below.
> >
> > Under 2.6.18-4 (Debian stock kernel):
> >
> > ACPI: HPET id: 0x10b9a201 base: 0xfed00000
> > hpet0: at MMIO 0xfed00000 (virtual 0xf8800000), IRQs 2, 8, 0, 0
> > hpet0: 4 32-bit timers, 14318180 Hz
> > Using HPET for base-timer
> > hpet_resources: 0xfed00000 is busy
> > Time: tsc clocksource has been installed.
> >
> > Under 2.6.23.13 w/ SMP:
> >
> > ACPI: HPET 37FE7400, 0038 (r1 RS690  AWRDACPI 42302E31 AWRD       98)
> > ACPI: HPET id: 0x10b9a201 base: 0xfed00000
> > Time: tsc clocksource has been installed.
> > Clocksource tsc unstable (delta = 500013666 ns)
> > Time: hpet clocksource has been installed.
>
> The lines prefixed with "hpet0:" are missing; apparently, hpet_alloc()
> was never called because hpet_reserve_platform_timers() is disabled
> because CONFIG_HPET is not set.  Try enabling this option.  (CONFIG_HPET
> is in the "Character Devices" kernel config menu.)
>
> That this option would be required to get the platform HPET code to work
> seems like a bug.
>
This doesn't seem to be the issue, as I have not been able to reproduce the bug on my Core 2 system with the same config.
HPET clocksource works fine with only CONFIG_HPET_TIMER.
>
> Regards,
> Clemens
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: HPET timer broken using 2.6.23.13 / nanosleep() hangs
  2008-01-13 14:06     ` Dhaval Giani
@ 2008-01-16 14:15       ` Thomas Gleixner
  2008-01-16 14:28         ` Thomas Gleixner
  0 siblings, 1 reply; 12+ messages in thread
From: Thomas Gleixner @ 2008-01-16 14:15 UTC (permalink / raw)
  To: Dhaval Giani
  Cc: Andrew Paprocki, linux-kernel, Balaji Rao, Andrew Morton,
	Ingo Molnar, clemens, venkatesh.pallipadi, bob.picco

On Sun, 13 Jan 2008, Dhaval Giani wrote:
> On Sun, Jan 13, 2008 at 08:10:46AM -0500, Andrew Paprocki wrote:
> > I applied the patch to my 2.6.23.13 tree and upon reboot it stopped right after:
> > 
> > Clocksource tsc unstable (delta = ... ns)
> > Time: hpet clocksource has been installed.
> > 
> > It locked up hard.. cursor stopped blinking and SysRq isn't working either.

The hint is in the original report:

Clocksource tsc unstable (delta = 500013666 ns)

That means, that the TSC was counting, but HPET not. So it looks like
the HPET readout is stale. Which explains, why after switching to HPET
clocksource the time system gets hosed.

I wonder why the HPET counter works check did not catch this.

Can you please apply the path below and provide the output ?

Thanks,

	tglx

Index: linux-2.6/arch/x86/kernel/hpet.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/hpet.c	2008-01-16 08:29:28.000000000 +0100
+++ linux-2.6/arch/x86/kernel/hpet.c	2008-01-16 15:13:19.000000000 +0100
@@ -323,7 +323,7 @@ static struct clocksource clocksource_hp
 static int hpet_clocksource_register(void)
 {
 	u64 tmp, start, now;
-	cycle_t t1;
+	cycle_t t1, t2;
 
 	/* Start the counter */
 	hpet_start_counter();
@@ -343,12 +343,17 @@ static int hpet_clocksource_register(voi
 		rdtscll(now);
 	} while ((now - start) < 200000UL);
 
-	if (t1 == read_hpet()) {
+	t2 = read_hpet();
+	if (t1 == t2) {
 		printk(KERN_WARNING
 		       "HPET counter not counting. HPET disabled\n");
 		return -ENODEV;
 	}
 
+	printk(KERN_INFO "HPET check: t1=%lu t2=%lu s=%lu n=%lu\n",
+	       (unsigned long) t1, (unsigned long) t2,
+	       (unsigned long) start, (unsigned long) now);
+
 	/* Initialize and register HPET clocksource
 	 *
 	 * hpet period is in femto seconds per cycle


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: HPET timer broken using 2.6.23.13 / nanosleep() hangs
  2008-01-16 14:15       ` Thomas Gleixner
@ 2008-01-16 14:28         ` Thomas Gleixner
  2008-01-16 15:21           ` Thomas Gleixner
  0 siblings, 1 reply; 12+ messages in thread
From: Thomas Gleixner @ 2008-01-16 14:28 UTC (permalink / raw)
  To: Dhaval Giani
  Cc: Andrew Paprocki, linux-kernel, Balaji Rao, Andrew Morton,
	Ingo Molnar, clemens, venkatesh.pallipadi, bob.picco

On Wed, 16 Jan 2008, Thomas Gleixner wrote:

> On Sun, 13 Jan 2008, Dhaval Giani wrote:
> > On Sun, Jan 13, 2008 at 08:10:46AM -0500, Andrew Paprocki wrote:
> > > I applied the patch to my 2.6.23.13 tree and upon reboot it stopped right after:
> > > 
> > > Clocksource tsc unstable (delta = ... ns)
> > > Time: hpet clocksource has been installed.
> > > 
> > > It locked up hard.. cursor stopped blinking and SysRq isn't working either.
> 
> The hint is in the original report:
> 
> Clocksource tsc unstable (delta = 500013666 ns)
> 
> That means, that the TSC was counting, but HPET not. So it looks like
> the HPET readout is stale. Which explains, why after switching to HPET
> clocksource the time system gets hosed.
> 
> I wonder why the HPET counter works check did not catch this.
> 
> Can you please apply the path below and provide the output ?

Oh. Stupid me. This is 2.6.23. So the patch won't apply.

Andrew, can you please check, whether 2.6.24-rc8 works on your machine ?

I look into a backport fix for 2.6.23 later.

Thanks,
	tglx



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: HPET timer broken using 2.6.23.13 / nanosleep() hangs
  2008-01-16 14:28         ` Thomas Gleixner
@ 2008-01-16 15:21           ` Thomas Gleixner
  2008-01-16 19:39             ` Andrew Paprocki
  0 siblings, 1 reply; 12+ messages in thread
From: Thomas Gleixner @ 2008-01-16 15:21 UTC (permalink / raw)
  To: Dhaval Giani
  Cc: Andrew Paprocki, linux-kernel, Balaji Rao, Andrew Morton,
	Ingo Molnar, clemens, venkatesh.pallipadi, bob.picco

On Wed, 16 Jan 2008, Thomas Gleixner wrote:

> On Wed, 16 Jan 2008, Thomas Gleixner wrote:
> 
> > On Sun, 13 Jan 2008, Dhaval Giani wrote:
> > > On Sun, Jan 13, 2008 at 08:10:46AM -0500, Andrew Paprocki wrote:
> > > > I applied the patch to my 2.6.23.13 tree and upon reboot it stopped right after:
> > > > 
> > > > Clocksource tsc unstable (delta = ... ns)
> > > > Time: hpet clocksource has been installed.
> > > > 
> > > > It locked up hard.. cursor stopped blinking and SysRq isn't working either.
> > 
> > The hint is in the original report:
> > 
> > Clocksource tsc unstable (delta = 500013666 ns)
> > 
> > That means, that the TSC was counting, but HPET not. So it looks like
> > the HPET readout is stale. Which explains, why after switching to HPET
> > clocksource the time system gets hosed.
> > 
> > I wonder why the HPET counter works check did not catch this.
> > 
> > Can you please apply the path below and provide the output ?

This time against 2.6.23

Thanks,
	tglx


--- a/arch/i386/kernel/hpet.c
+++ b/arch/i386/kernel/hpet.c
@@ -233,7 +233,7 @@ int __init hpet_enable(void)
 	unsigned long id;
 	uint64_t hpet_freq;
 	u64 tmp, start, now;
-	cycle_t t1;
+	cycle_t t1, t2;
 
 	if (!is_hpet_capable())
 		return 0;
@@ -295,12 +295,17 @@ int __init hpet_enable(void)
 		rdtscll(now);
 	} while ((now - start) < 200000UL);
 
-	if (t1 == read_hpet()) {
+	t2 = read_hpet();
+	if (t1 == t2) {
 		printk(KERN_WARNING
 		       "HPET counter not counting. HPET disabled\n");
 		goto out_nohpet;
 	}
 
+	printk(KERN_INFO "HPET check: t1=%llu t2=%llu s=%llu n=%llu\n",
+	       (unsigned long long) t1, (unsigned long long) t2,
+	       (unsigned long long) start, (unsigned long long) now);
+
 	/* Initialize and register HPET clocksource
 	 *
 	 * hpet period is in femto seconds per cycle

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: HPET timer broken using 2.6.23.13 / nanosleep() hangs
  2008-01-16 15:21           ` Thomas Gleixner
@ 2008-01-16 19:39             ` Andrew Paprocki
  2008-01-18 10:26               ` Thomas Gleixner
  0 siblings, 1 reply; 12+ messages in thread
From: Andrew Paprocki @ 2008-01-16 19:39 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: Dhaval Giani, linux-kernel, Balaji Rao, Andrew Morton,
	Ingo Molnar, clemens, venkatesh.pallipadi, bob.picco

I applied the patch and I am still locking up after
Time: hpet clocksource has been installed.

I rebooted with "clocksource=tsc" to get the logs of the trace which
was added. I'm assuming the grep below gets all the interesting parts.
I enabled the HPET character device as mentioned before, which is why
the hpet0 lines appear now.

# dmesg | egrep -i "(hpet|time|clock)"
ACPI: HPET 37FE7400, 0038 (r1 RS690  AWRDACPI 42302E31 AWRD       98)
ATI board detected. Disabling timer routing over 8254.
ACPI: PM-Timer IO Port: 0x4008
ACPI: HPET id: 0x10b9a201 base: 0xfed00000
Kernel command line: vga=0x31a root=/dev/sda1 ro clocksource=tsc
HPET check: t1=5 t2=1139 s=56226339975 n=56226539985
hpet0: at MMIO 0xfed00000, IRQs 2, 8, 0, 0
hpet0: 4 32-bit timers, 14318180 Hz
Calibrating delay using timer specific routine.. 4927.58 BogoMIPS (lpj=9855168)
..TIMER: vector=0x31 apic1=0 pin1=2 apic2=-1 pin2=-1
Time: tsc clocksource has been installed.
PCI: Setting latency timer of device 0000:00:06.0 to 64
Real Time Clock Driver v1.12ac
hpet_resources: 0xfed00000 is busy
Clocksource tsc unstable (delta = 459979812 ns)
Software Watchdog Timer: 0.07 initialized. soft_noboot=0
soft_margin=60 sec (nowayout= 0)
PCI: Setting latency timer of device 0000:02:00.0 to 64

I ran a 'sleep 1', which hung as expected when I installed hpet as the
clocksource via /sys. I dumped the sysrq trace showing where it was
hung:

Jan 16 14:44:48 am2 kernel: sleep         S f582df68     0  2205   2155
Jan 16 14:44:48 am2 kernel:        f582df50 00000086 c1706e80 f582df68
c1706f04 c1706e78 00000000 c01371be
Jan 16 14:44:48 am2 kernel:        c17f8ab0 c17f8bf4 c1709a40 00000000
f7077200 00000286 c0137803 00000001
Jan 16 14:44:43 am2 kernel:        c1706e78 00000000 00000286 f582df68
00000000 f582c020 f582c000 c03ac8d3
Jan 16 14:44:43 am2 kernel: Call Trace:
Jan 16 14:44:48 am2 kernel:  [<c01371be>] enqueue_hrtimer+0xd7/0xe2
Jan 16 14:44:48 am2 kernel:  [<c0137803>] hrtimer_start+0xe8/0xf4
Jan 16 14:44:48 am2 kernel:  [<c03ac8d3>] do_nanosleep+0x48/0x73
Jan 16 14:44:48 am2 kernel:  [<c03ac932>] hrtimer_nanosleep_restart+0x34/0xa1
Jan 16 14:44:48 am2 kernel:  [<c013735d>] hrtimer_wakeup+0x0/0x18
Jan 16 14:44:48 am2 kernel:  [<c012e837>] sys_restart_syscall+0xe/0xf
Jan 16 14:44:48 am2 kernel:  [<c0103d0a>] sysenter_past_esp+0x5f/0x85

My 'cron' and 'atd' processes were also hung with this exact stack in
'enqueue_hrtimer'.

Thanks,
-Andrew

On Jan 16, 2008 10:21 AM, Thomas Gleixner <tglx@linutronix.de> wrote:
> > > The hint is in the original report:
> > >
> > > Clocksource tsc unstable (delta = 500013666 ns)
> > >
> > > That means, that the TSC was counting, but HPET not. So it looks like
> > > the HPET readout is stale. Which explains, why after switching to HPET
> > > clocksource the time system gets hosed.
> > >
> > > I wonder why the HPET counter works check did not catch this.
> > >
> > > Can you please apply the path below and provide the output ?
>
> This time against 2.6.23
>
> Thanks,
>         tglx

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: HPET timer broken using 2.6.23.13 / nanosleep() hangs
  2008-01-16 19:39             ` Andrew Paprocki
@ 2008-01-18 10:26               ` Thomas Gleixner
  2008-02-09 23:27                 ` Andrew Paprocki
  0 siblings, 1 reply; 12+ messages in thread
From: Thomas Gleixner @ 2008-01-18 10:26 UTC (permalink / raw)
  To: Andrew Paprocki
  Cc: Dhaval Giani, linux-kernel, Balaji Rao, Andrew Morton,
	Ingo Molnar, clemens, venkatesh.pallipadi, bob.picco

On Wed, 16 Jan 2008, Andrew Paprocki wrote:

> I applied the patch and I am still locking up after
> Time: hpet clocksource has been installed.

That was expected :)
 
> I rebooted with "clocksource=tsc" to get the logs of the trace which
> was added. I'm assuming the grep below gets all the interesting parts.
> I enabled the HPET character device as mentioned before, which is why
> the hpet0 lines appear now.
> 
> # dmesg | egrep -i "(hpet|time|clock)"
> ACPI: HPET 37FE7400, 0038 (r1 RS690  AWRDACPI 42302E31 AWRD       98)
> ATI board detected. Disabling timer routing over 8254.
> ACPI: PM-Timer IO Port: 0x4008
> ACPI: HPET id: 0x10b9a201 base: 0xfed00000
> Kernel command line: vga=0x31a root=/dev/sda1 ro clocksource=tsc
> HPET check: t1=5 t2=1139 s=56226339975 n=56226539985

Ok, the counter works when we initialize the HPET.

t2-t1 = 1134 ticks ~= 79us
s-n = 200010 ~= 2525MHz --> That should be the frequency of your CPU.

> Jan 16 14:44:43 am2 kernel: Call Trace:
> Jan 16 14:44:48 am2 kernel:  [<c01371be>] enqueue_hrtimer+0xd7/0xe2
> Jan 16 14:44:48 am2 kernel:  [<c0137803>] hrtimer_start+0xe8/0xf4
> Jan 16 14:44:48 am2 kernel:  [<c03ac8d3>] do_nanosleep+0x48/0x73
> Jan 16 14:44:48 am2 kernel:  [<c03ac932>] hrtimer_nanosleep_restart+0x34/0xa1
> Jan 16 14:44:48 am2 kernel:  [<c013735d>] hrtimer_wakeup+0x0/0x18
> Jan 16 14:44:48 am2 kernel:  [<c012e837>] sys_restart_syscall+0xe/0xf
> Jan 16 14:44:48 am2 kernel:  [<c0103d0a>] sysenter_past_esp+0x5f/0x85

When the system is hung, can you please hit SysRq-Q wait a bit and hit
SysRq-Q again. Please provide the output.

Thanks,
	tglx

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: HPET timer broken using 2.6.23.13 / nanosleep() hangs
  2008-01-18 10:26               ` Thomas Gleixner
@ 2008-02-09 23:27                 ` Andrew Paprocki
  0 siblings, 0 replies; 12+ messages in thread
From: Andrew Paprocki @ 2008-02-09 23:27 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: Dhaval Giani, linux-kernel, Balaji Rao, Andrew Morton,
	Ingo Molnar, clemens, venkatesh.pallipadi, bob.picco

Thomas,

I haven't found a good way to capture the SysRq output for this. I
found that when it locks up at boot time, even SysRq is unresponsive.
I don't have another way of getting console on the machine right now
to get the output off of it. I have since upgraded to 2.6.24 and the
problem still persists.

Another interesting twist though.. I just rebuilt my kernel with
ARCH=x86_64 and HPET works perfectly. So this only appears to break
when in 32-bit mode. For some reason it picks tsc at boot time, but if
I install hpet afterwards under x86_64 it no longer hangs when I run
'sleep 1'. Does that shed any more light on the problem?

Thanks,
-Andrew

# uname -a
Linux am2 2.6.24 #7 Sat Feb 9 18:06:50 EST 2008 x86_64 GNU/Linux
# dmesg | egrep -i clock\|hpet
ACPI: HPET 3DFE7780, 0038 (r1 RS690  AWRDACPI 42302E31 AWRD       98)
ACPI: HPET id: 0x10b9a201 base: 0xfed00000
hpet clockevent registered
TSC calibrated against HPET
hpet0: at MMIO 0xfed00000, IRQs 2, 8, 0, 0
hpet0: 4 32-bit timers, 14318180 Hz
Time: tsc clocksource has been installed.
Real Time Clock Driver v1.12ac
hpet_resources: 0xfed00000 is busy
# echo -n hpet >
/sys/devices/system/clocksource/clocksource0/current_clocksource
# dmesg | tail -1
Time: hpet clocksource has been installed.
# time sleep 1

real    0m1.001s
user    0m0.000s
sys     0m0.000s

On Jan 18, 2008 5:26 AM, Thomas Gleixner <tglx@linutronix.de> wrote:
> On Wed, 16 Jan 2008, Andrew Paprocki wrote:
>
> > I applied the patch and I am still locking up after
> > Time: hpet clocksource has been installed.
>
> That was expected :)
>
> > I rebooted with "clocksource=tsc" to get the logs of the trace which
> > was added. I'm assuming the grep below gets all the interesting parts.
> > I enabled the HPET character device as mentioned before, which is why
> > the hpet0 lines appear now.
> >
> > # dmesg | egrep -i "(hpet|time|clock)"
> > ACPI: HPET 37FE7400, 0038 (r1 RS690  AWRDACPI 42302E31 AWRD       98)
> > ATI board detected. Disabling timer routing over 8254.
> > ACPI: PM-Timer IO Port: 0x4008
> > ACPI: HPET id: 0x10b9a201 base: 0xfed00000
> > Kernel command line: vga=0x31a root=/dev/sda1 ro clocksource=tsc
> > HPET check: t1=5 t2=1139 s=56226339975 n=56226539985
>
> Ok, the counter works when we initialize the HPET.
>
> t2-t1 = 1134 ticks ~= 79us
> s-n = 200010 ~= 2525MHz --> That should be the frequency of your CPU.
>
> > Jan 16 14:44:43 am2 kernel: Call Trace:
> > Jan 16 14:44:48 am2 kernel:  [<c01371be>] enqueue_hrtimer+0xd7/0xe2
> > Jan 16 14:44:48 am2 kernel:  [<c0137803>] hrtimer_start+0xe8/0xf4
> > Jan 16 14:44:48 am2 kernel:  [<c03ac8d3>] do_nanosleep+0x48/0x73
> > Jan 16 14:44:48 am2 kernel:  [<c03ac932>] hrtimer_nanosleep_restart+0x34/0xa1
> > Jan 16 14:44:48 am2 kernel:  [<c013735d>] hrtimer_wakeup+0x0/0x18
> > Jan 16 14:44:48 am2 kernel:  [<c012e837>] sys_restart_syscall+0xe/0xf
> > Jan 16 14:44:48 am2 kernel:  [<c0103d0a>] sysenter_past_esp+0x5f/0x85
>
> When the system is hung, can you please hit SysRq-Q wait a bit and hit
> SysRq-Q again. Please provide the output.
>
> Thanks,
>         tglx
>
>

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2008-02-09 23:27 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-13 11:10 HPET timer broken using 2.6.23.13 / nanosleep() hangs Andrew Paprocki
2008-01-13 12:03 ` Dhaval Giani
2008-01-13 13:10   ` Andrew Paprocki
2008-01-13 14:06     ` Dhaval Giani
2008-01-16 14:15       ` Thomas Gleixner
2008-01-16 14:28         ` Thomas Gleixner
2008-01-16 15:21           ` Thomas Gleixner
2008-01-16 19:39             ` Andrew Paprocki
2008-01-18 10:26               ` Thomas Gleixner
2008-02-09 23:27                 ` Andrew Paprocki
2008-01-14 12:59 ` Clemens Ladisch
2008-01-14 14:12   ` Balaji Rao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).