Re: More 2.1.81 compile errors(with fix)

Adam HeathA (adam@brainiac.egr.msu.edu)
Sat, 24 Jan 1998 00:52:18 -0500 (EST)


On Fri, 23 Jan 1998, Trevor Johnson wrote:

> > Here is the fix for the above.
> >
> > --- 2.1.81-pure/arch/i386/kernel/i386_ksyms.c Fri Jan 23 22:58:21 1998
> > +++ 2.1.81/arch/i386/kernel/i386_ksyms.c Fri Jan 23 23:50:45 1998
>
> After applying your patch, I had further errors when compiling without
> __SMP__:
>
> gcc -D__KERNEL__ -I/usr/sys/linux/include -Wall -Wstrict-prototypes -O2
> -fomit-frame-pointer -pipe -fno-strength-reduce -m486 -malign-loops=2
> -malign-jumps=2 -malign-functions=2 -DCPU=586 -c -o irq.o irq.c
> irq.c: In function `do_ioapic_IRQ':
> irq.c:653: `irq_owner' undeclared (first use this function)
> irq.c:653: (Each undeclared identifier is reported only once
> irq.c:653: for each function it appears in.)
> irq.c:669: warning: implicit declaration of function `release_irqlock'
> irq.c:676: `NO_PROC_ID' undeclared (first use this function)
> make[1]: *** [irq.o] Error 1
> make[1]: Leaving directory `/usr/sys/linux/arch/i386/kernel'
> ___
> Trevor Johnson
>
>
Here is the fix. I already had it done before I got this message, but
hadn't posted it yet. Isn't it great knowing that you can get linux
problems fixed so quick!

--- 2.1.81-pure/arch/i386/kernel/irq.c Fri Jan 23 22:58:21 1998
+++ 2.1.81/arch/i386/kernel/irq.c Sat Jan 24 00:18:40 1998
@@ -642,6 +642,7 @@
/*
* FIXME! This is completely broken.
*/
+#ifdef __SMP__
static void do_ioapic_IRQ(int irq, int cpu, struct pt_regs * regs)
{
int should_handle_irq;
@@ -679,6 +680,7 @@

enable_IO_APIC_irq(irq);
}
+#endif /* __SMP__ */

/*
* do_IRQ handles all normal device IRQ's (the special
@@ -714,9 +716,10 @@
kstat.irqs[cpu][irq]++;

do_lowlevel_IRQ = do_8259A_IRQ;
+#ifdef __SMP__
if (IO_APIC_IRQ(irq))
do_lowlevel_IRQ = do_ioapic_IRQ;
-
+#endif
do_lowlevel_IRQ(irq, cpu, &regs);

/*