From: Dave A. <ai...@us...> - 2001-02-27 22:33:54
|
Update of /cvsroot/linux-vax/kernel-2.4/include/asm-vax In directory usw-pr-cvs1:/tmp/cvs-serv27444/include/asm-vax Modified Files: hardirq.h Log Message: make our hardirq look like everyone elses... Index: hardirq.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-vax/hardirq.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- hardirq.h 2001/02/22 23:53:36 1.3 +++ hardirq.h 2001/02/27 22:35:10 1.4 @@ -4,6 +4,7 @@ /* FIXME: copied from arm port (or any except i386/alpha ) */ /* stubs for irq scb code */ +#include <linux/config.h> #include <linux/threads.h> typedef struct { @@ -16,18 +17,16 @@ #include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */ - - -/*extern unsigned int local_irq_count[NR_CPUS];*/ - /* * Are we in an interrupt context? Either doing bottom half * or hardware interrupt processing? */ -#define in_interrupt() (local_irq_count(smp_processor_id()) + local_bh_count(smp_processor_id()) != 0) +#define in_interrupt() ({ const int __cpu = smp_processor_id(); \ + (local_irq_count(__cpu) + local_bh_count(__cpu) != 0); }) + #define in_irq() (local_irq_count(smp_processor_id()) != 0) -#ifndef __SMP__ +#ifndef CONFIG_SMP #define hardirq_trylock(cpu) (local_irq_count(cpu) == 0) #define hardirq_endlock(cpu) do { } while (0) @@ -35,10 +34,10 @@ #define irq_enter(cpu) (local_irq_count(cpu)++) #define irq_exit(cpu) (local_irq_count(cpu)--) -#define synchronize_irq() do { } while (0) +#define synchronize_irq() barrier(); #else -#error SMP not supported -#endif /* __SMP__ */ +#error Nil aon SMP agam +#endif /* CONFIG_SMP */ #endif /* _ASM_VAX_HARDIRQ_H */ |