Compile fix for 2.1.31

kdp0101@hpmail.lrz-muenchen.de
Fri, 04 Apr 1997 19:55:05 METDST


Hi,

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.

Thanks,
-Andi

--- linux/arch/i386/kernel/irq.c~ Fri Apr 4 15:37:48 1997
+++ linux/arch/i386/kernel/irq.c Fri Apr 4 16:58:10 1997
@@ -320,6 +320,7 @@
}
#endif

+unsigned int local_irq_count[NR_CPUS];

/*
* Global interrupt locks for SMP. Allow interrupts to come in on any
@@ -329,7 +330,6 @@
unsigned char global_irq_holder = NO_PROC_ID;
unsigned volatile int global_irq_lock;
unsigned volatile int global_irq_count;
-unsigned int local_irq_count[NR_CPUS];

#define irq_active(cpu) \
(global_irq_count != local_irq_count[cpu])