Re: Compile fix for 2.1.31

Linus Torvalds (
Fri, 4 Apr 1997 10:45:48 -0800 (PST)

On Fri, 4 Apr 1997 wrote:
> This patch makes 2.1.31 compile on uniprocessor machines. Otherwise
> the macro in_interrupt() (used e.g. by the scsi layer) generates
> undefined symbol symbol errors. I'm not 100% sure if this is the
> right fix or if it would be better to define in_interrupt in
> asm-i386/hardirq.h to (intr_count). At least it works for me and
> didn't crash my machine yet ;)
> Is local_irq_count[] supposed to be used on uni processor machines
> too? What is the difference between intr_count and local_irq_count[]?
> It would be nice if someone knowledgeable could comment on this.

Yes, local_intr_count[] is supposed to work on both UP and SMP machines,
and 2.1.31 is broken in this regard (your patch is correct). "intr_count"
is slowly being phased out: most of the code that uses intr_count is
fundamentally broken on any sane SMP implementation.

"intr_count" _will_ continue to exist, but it will probably be renamed as
"soft_irq_count" or similar, because that is what it currently is used
for: software interrupt locking.