Re: IO-APIC on nforce2 [PATCH] + [PATCH] for nmi_debug=1 + [PATCH]for idle=C1halt, 2.6.5

From: Maciej W. Rozycki
Date: Fri Apr 23 2004 - 07:20:12 EST

On Thu, 22 Apr 2004, Len Brown wrote:

> date seems to gain 9sec/hour on my Shuttle/SN41G2/FN41 when using IOAPIC
> timer.
> booted with "noapic" for XT-PIC timer, it stays locked
> onto my wristwatch after an hour. If the workaround is disabled,
> and XT-PIC timer is used, it matches the "noapic" behaviour -- no drift.
> I can't explain it. I think it is a timer problem independent of the
> IRQ routing.
> -Len
> ps. when i ran in XT-PIC mode there were lots of ERR's registered in
> /proc/interrupts -- doesn't look healthy.

It looks like a noise on the timer IRQ line causing spurious interrupt
edges. In the XT-PIC mode it gets ignored -- at the time the CPU issues
an ack, the request is already gone and the PIC signals a spurious
interrupt. In the APIC mode the interrupt is delivered as a regular one
as edge interrupt events are persistent for the APICs -- if a falling edge
happens before an interrupt is acked it's not assumed to be gone and is
delivered as a real one.

Another possibility is there's a bug in our APIC interrupt setup, leading
to the timer interrupt being enabled both in the APIC and in the PIC.
You can verify that by calling debug functions for dumping states of the
controllers from io_apic.c. They are print_IO_APIC(), print_local_APIC()
and print_PIC() -- you may call them from an ad-hoc written small module,
although the first one is (accidentally?) marked __init, so you'd have to
remove the mark first. You need to call all of them to get a complete


+ Maciej W. Rozycki, Technical University of Gdansk, Poland +
+ e-mail: macro@xxxxxxxxxxxxx, PGP key available +
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at