gcc -D__KERNEL__ -I/usr/src/linux-2.5.4-pre6/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=i686 -DKBUILD_BASENAME=sched -fno-omit-frame-pointer -c -o sched.o sched.c
sched.c: In function `schedule':
sched.c:664: `global_irq_holder' undeclared (first use in this function)
sched.c:664: (Each undeclared identifier is reported only once
sched.c:664: for each function it appears in.)
make[2]: *** [sched.o] Error 1
make[2]: Leaving directory `/usr/src/linux-2.5.4-pre6/kernel'
make[1]: *** [first_rule] Error 2
make[1]: Leaving directory `/usr/src/linux-2.5.4-pre6/kernel'
make: *** [_dir_kernel] Error 2
It appears that global_irq_holder will only be seen from
<asm/hardirq.h> if CONFIG_SMP is defined. I haven't dug
deeper to see whether this is due to CONFIG_PREEMPT (to
which I said 'Y') or not.
--alessandro
"If your heart is a flame burning brightly
you'll have light and you'll never be cold
And soon you will know that you just grow / You're not growing old"
(Husker Du, "Flexible Flyer")
On Sun, 2002-02-10 at 17:44, Alessandro Suardi wrote:
> It appears that global_irq_holder will only be seen from
> <asm/hardirq.h> if CONFIG_SMP is defined. I haven't dug
> deeper to see whether this is due to CONFIG_PREEMPT (to
> which I said 'Y') or not.
Indeed, there is a compile error if preemption is enabled but SMP is
not. I apologize. Fix is attached.
Robert Love
diff -urN linux-2.5.4-pre6/include/asm-i386/smplock.h linux/include/asm-i386/smplock.h
--- linux-2.5.4-pre6/include/asm-i386/smplock.h Sun Feb 10 15:35:55 2002
+++ linux/include/asm-i386/smplock.h Sun Feb 10 18:15:55 2002
@@ -15,6 +15,7 @@
#else
#ifdef CONFIG_PREEMPT
#define kernel_locked() preempt_get_count()
+#define global_irq_holder 0
#else
#define kernel_locked() 1
#endif