Messages in this thread Patch in this message | | | Subject | Re: Unresolved module symbols in 2.1.32 without SMP | Date | Sat, 05 Apr 1997 23:53:40 -0500 | From | John Gotts <> |
| |
In message <33481e5a.901484@mail.cybernex.net>, tenthumbs@cybernex.net writes:
>I built sd_mod.o and sr_mod.o with COMFIG_MODVERSIONS and without SMP and both >fail to load with an unresolved symbol local_irq_count. Both modules use >linux/interrupt.h which includes asm/hardirq.h which declares local_irq_count. >It's defined in arch/i386/kernel/irq.c but never used in this case.
>Maybe it would be a good idea to wrap both the declaration and the definition >inside ifdef __SMP__.
The following patch should go into 2.1.33 (I lost the e-mail address of the original poster, but Ingo Molnar and I agree on this one):
--- linux/include/asm-i386/hardirq.h.orig Sat Apr 5 23:43:26 1997 +++ linux/include/asm-i386/hardirq.h Sat Apr 5 23:44:12 1997 @@ -1,9 +1,6 @@ #ifndef __ASM_HARDIRQ_H #define __ASM_HARDIRQ_H -extern unsigned int local_irq_count[NR_CPUS]; -#define in_interrupt() (local_irq_count[smp_processor_id()] != 0) - #ifndef __SMP__ #define hardirq_trylock(cpu) ((cpu)==0) /* always true */ @@ -12,9 +9,14 @@ #define hardirq_enter(cpu) (local_irq_count[cpu]++) #define hardirq_exit(cpu) (local_irq_count[cpu]--) +#define in_interrupt() (intr_count != 0) + #define synchronize_irq() do { } while (0) #else + +extern unsigned int local_irq_count[NR_CPUS]; +#define in_interrupt() (local_irq_count[smp_processor_id()] != 0) extern unsigned char global_irq_holder; extern unsigned volatile int global_irq_lock; -- John GOTTS <jgotts@engin.umich.edu> http://www-personal.engin.umich.edu/~jgotts Senior, EE/Motif Programmer/SysAdmin/Linux Hacker/Amateur Radio Callsign N8QDW
| |