Re: Noname patch

Linus Torvalds (Linus.Torvalds@cs.Helsinki.FI)
Mon, 10 Jul 1995 08:50:17 +0300


Bob Manson: "Re: Noname patch" (Jul 7, 22:28):
>
> >Regarding networking, Bob reported there is a problem with
> > drivers/net/auto_irq.c:autoirq_probe()
> >when compiling under Linux. The set_irq() call seems to blow away the
> >compiler. Replacing that call with
>
> Actually it will compile, but the resulting kernel gets a segfault in
> that set_bit() call. Replacing it with the or/shift makes it work just
> fine, so I'm assuming it is some sort of problem with either set_bit()
> or the way gcc-2.7.0 is compiling it.

It seems to be due to incorrect use of "set_bit()": on the i386 the
alignment doesn't matter, but on the alpha (and according to my "coding
standards", yet to be written down), the bit operations need to have a
"long" alignment (for the simple reason that the bit operations need to
be atomic, and "long" seems to be the best guarantee of a entity that is
settable atomically).

I changed the stuff in drivers/net/auto_irq.c to use unsigned longs
instead of ints, and the problem will probably go away. That said, it
would indeed probably be better to use the irq detection in "irq.c"
instead of doing it by hand as in the current auto_irq.c.

Linus