Re: [2.6.4-rc2] bogus semicolon behind if()

From: Maciej W. Rozycki
Date: Wed Mar 17 2004 - 11:52:49 EST


On Tue, 9 Mar 2004, Thomas Schlichter wrote:

> 2. To fix my problem, timer_ack must be set to 1 for my (integrated) APIC, and
> as my CPU has a TSC, this cannot be correct for me:
> - timer_ack = 1;
> + if (nmi_watchdog == NMI_IO_APIC && !APIC_INTEGRATED(ver))
> + timer_ack = 1;
> + else
> + timer_ack = !cpu_has_tsc;
>
> I changed that if(...) to
> if (nmi_watchdog == NMI_IO_APIC || APIC_INTEGRATED(ver))
> which works fine for me here, but I am not 100% sure if this is what the
> author of the original patch ment and if it still fixes the original
> problem...

You need timer_ack set to one when either:

1. you use the I/O APIC NMI watchdog and you have a discrete APIC chip
(i.e. the 82489DX),

or:

2. the timer interrupt (IRQ 0) goes through one of the APICs (whatever
way; we check three variations) and the TSC is non-functional (absent or
disabled).

Since you have an integrated APIC and you use the TSC, you may have
timer_ack set to zero. That saves a few (possibly slow) I/O accesses and
works around problems that may arise due 8259A clone (in)compatibility or
bugs in SMM firmware.

Maciej

--
+ 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 http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/