Re: [BUG][2.6.0-test3-bk7] x86-64 UP_IOAPIC panic caused bycpumask_t conversion

From: Andi Kleen
Date: Tue Aug 19 2003 - 18:44:53 EST


Mikael Pettersson <mikpe@xxxxxxxxx> writes:

> --- linux-2.6.0-test3-bk7/include/linux/cpumask.h.~1~ 2003-08-19 23:48:50.000000000 +0200
> +++ linux-2.6.0-test3-bk7/include/linux/cpumask.h 2003-08-20 00:07:17.000000000 +0200
> @@ -21,7 +21,7 @@
> typedef unsigned long cpumask_t;
> #endif
>
> -#ifdef CONFIG_SMP
> +#if defined(CONFIG_SMP) || defined(CONFIG_X86_IO_APIC)
> #if NR_CPUS > BITS_PER_LONG
> #include <asm-generic/cpumask_array.h>
> #else
>
> Since NR_CPUS==1 this makes UP_IOAPIC use cpumask_arith.h,
> which is what the code used before the cpumask_t conversion.
> With this change, the box boots Ok again.

Nasty.

But why does i386/UP work?

>
> (I believe this is the correct thing to do, except having
> CONFIG_X86_IO_APIC in generic code isn't quite right.)

Better would be to undo the cpumask_t changes in io_apic.c
and go back to unsigned long masks there again.

Obviously a cpu mask is not the right data structure to manage APICs

Another way would be to do whatever i386 does to avoid the problem.
The IO-APIC code is unfortunately quite out of date/unsynced compared to i386,
maybe it just needs some bug fix ported over. I will check that later.

-Andi
-
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/