Re: Severe IRQ problems on Foster (P4 Xeon) system

Pavel Machek (pavel@suse.cz)
Wed, 20 Mar 2002 00:28:37 +0100


Hi!

> --- ./arch/i386/kernel/time.c.ORIG Fri Mar 15 14:57:00 2002
> +++ ./arch/i386/kernel/time.c Tue Mar 19 17:27:12 2002
> @@ -384,7 +384,9 @@
> /* last time the cmos clock got updated */
> static long last_rtc_update;
>
> +#ifndef CONFIG_X86_TSC
> int timer_ack;
> +#endif
>
> /*
> * timer_interrupt() needs to keep up the real-time clock,
> @@ -392,7 +394,7 @@
> */
> static inline void do_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
> {
> -#ifdef CONFIG_X86_IO_APIC
> +#if defined (CONFIG_X86_IO_APIC) && ! defined (CONFIG_X86_TSC)
> if (timer_ack) {
> /*
> * Subtle, when I/O APICs are used we have to ack timer IRQ
> --- ./arch/i386/kernel/io_apic.c.ORIG Tue Mar 19 17:31:25 2002
> +++ ./arch/i386/kernel/io_apic.c Tue Mar 19 17:30:02 2002
> @@ -1478,7 +1478,9 @@
> */
> static inline void check_timer(void)
> {
> +#ifndef CONFIG_X86_TSC
> extern int timer_ack;
> +#endif
> int pin1, pin2;
> int vector;
>
> @@ -1498,7 +1500,7 @@
> */
> apic_write_around(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_EXTINT);
> init_8259A(1);
> - timer_ack = 1;
> + timer_ack = !(cpu_has_tsc);
> enable_8259A_irq(0);
>
> pin1 = find_isa_irq_pin(0, mp_INT);
>
>
> This would get us rid of our problem (although the BIOS hack may
> suffice). However, more than that, it also spares ~2 us on each timer
> interrupt for CPUs which do not need do_slow_gettimeoffset.
>
> What do you think?

Well, you should get your bios fixed.

Then... Those ifdefs are not neccessary, right? You only need ...

> @@ -1498,7 +1500,7 @@
> */
> apic_write_around(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_EXTINT);
> init_8259A(1);
> - timer_ack = 1;
> + timer_ack = !(cpu_has_tsc);
> enable_8259A_irq(0);
>
> pin1 = find_isa_irq_pin(0, mp_INT);

... these lines.
Pavel

-- 
(about SSSCA) "I don't say this lightly.  However, I really think that the U.S.
no longer is classifiable as a democracy, but rather as a plutocracy." --hpa
-
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/