patch-2.4.0-test6 linux/arch/sparc/kernel/irq.c
Next file: linux/arch/sparc/kernel/rtrap.S
Previous file: linux/arch/sparc/defconfig
Back to the patch index
Back to the overall index
- Lines: 86
- Date:
Sun Aug 6 11:43:17 2000
- Orig file:
v2.4.0-test5/linux/arch/sparc/kernel/irq.c
- Orig date:
Thu Jul 27 17:37:59 2000
diff -u --recursive --new-file v2.4.0-test5/linux/arch/sparc/kernel/irq.c linux/arch/sparc/kernel/irq.c
@@ -1,4 +1,4 @@
-/* $Id: irq.c,v 1.105 2000/07/26 01:04:02 davem Exp $
+/* $Id: irq.c,v 1.106 2000/08/05 10:48:40 davem Exp $
* arch/sparc/kernel/irq.c: Interrupt request handling routines. On the
* Sparc the IRQ's are basically 'cast in stone'
* and you are supposed to probe the prom's device
@@ -195,16 +195,9 @@
restore_flags(flags);
}
-#ifndef CONFIG_SMP
-unsigned int __local_bh_count;
-unsigned int __local_irq_count;
-
-#else
+#ifdef CONFIG_SMP
/* SMP interrupt locking on Sparc. */
-unsigned int __local_bh_count[NR_CPUS];
-unsigned int __local_irq_count[NR_CPUS];
-
/* Who has global_irq_lock. */
unsigned char global_irq_holder = NO_PROC_ID;
@@ -229,14 +222,14 @@
printk("irq: %d [ ", atomic_read(&global_irq_count));
for (i = 0; i < NR_CPUS; i++) {
- printk("%d ", __local_irq_count[i]);
+ printk("%d ", local_irq_count(i));
}
printk("]\n");
printk("bh: %d [ ", (spin_is_locked(&global_bh_lock) ? 1 : 0));
for (i = 0; i < NR_CPUS; i++) {
- printk("%d ", __local_bh_count[cpu]);
+ printk("%d ", local_bh_count(cpu));
}
printk("]\n");
@@ -263,7 +256,7 @@
* already executing in one..
*/
if (!atomic_read(&global_irq_count)) {
- if (__local_bh_count[cpu] || !spin_is_locked(&global_bh_lock))
+ if (local_bh_count(cpu) || !spin_is_locked(&global_bh_lock))
break;
}
@@ -282,7 +275,7 @@
continue;
if (spin_is_locked (&global_irq_lock))
continue;
- if (!__local_bh_count[cpu] && spin_is_locked(&global_bh_lock))
+ if (!local_bh_count(cpu) && spin_is_locked(&global_bh_lock))
continue;
if (spin_trylock(&global_irq_lock))
break;
@@ -358,7 +351,7 @@
if ((flags & PSR_PIL) != PSR_PIL) {
int cpu = smp_processor_id();
__cli();
- if (!__local_irq_count[cpu])
+ if (!local_irq_count(cpu))
get_irqlock(cpu);
}
}
@@ -367,7 +360,7 @@
{
int cpu = smp_processor_id();
- if (!__local_irq_count[cpu])
+ if (!local_irq_count(cpu))
release_irqlock(cpu);
__sti();
}
@@ -394,7 +387,7 @@
retval = 2 + local_enabled;
/* check for global flags if we're not in an interrupt */
- if (!__local_irq_count[smp_processor_id()]) {
+ if (!local_irq_count(smp_processor_id())) {
if (local_enabled)
retval = 1;
if (global_irq_holder == (unsigned char) smp_processor_id())
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)