summaryrefslogtreecommitdiffstats
path: root/arch/sparc/kernel
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-08-08 18:54:49 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-08-08 18:54:49 +0000
commit5514f4babeeb3af00ee0c325e3cda7a562cc3d65 (patch)
treeedd733879cab73e41324a99ca5da7bc154c4196d /arch/sparc/kernel
parent6a9366db547e958e8c9bf8e1c13bcea6cb2bf393 (diff)
Merge with Linux 2.4.0-test6-pre4.
Diffstat (limited to 'arch/sparc/kernel')
-rw-r--r--arch/sparc/kernel/irq.c23
-rw-r--r--arch/sparc/kernel/rtrap.S6
-rw-r--r--arch/sparc/kernel/sparc_ksyms.c2
3 files changed, 11 insertions, 20 deletions
diff --git a/arch/sparc/kernel/irq.c b/arch/sparc/kernel/irq.c
index 65e95afdb..a6fd32fa4 100644
--- a/arch/sparc/kernel/irq.c
+++ b/arch/sparc/kernel/irq.c
@@ -195,16 +195,9 @@ void free_irq(unsigned int irq, void *dev_id)
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 @@ static void show(char * str)
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 @@ static inline void wait_on_irq(int cpu)
* 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 @@ static inline void wait_on_irq(int cpu)
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 @@ void __global_cli(void)
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 @@ void __global_sti(void)
{
int cpu = smp_processor_id();
- if (!__local_irq_count[cpu])
+ if (!local_irq_count(cpu))
release_irqlock(cpu);
__sti();
}
@@ -394,7 +387,7 @@ unsigned long __global_save_flags(void)
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())
diff --git a/arch/sparc/kernel/rtrap.S b/arch/sparc/kernel/rtrap.S
index dcfc2dc78..c44040bde 100644
--- a/arch/sparc/kernel/rtrap.S
+++ b/arch/sparc/kernel/rtrap.S
@@ -50,10 +50,10 @@ rtrap_7win_patch5: and %g1, 0x7f, %g1
ret_trap_entry:
ld [%curptr + AOFF_task_processor], %l3
sll %l3, 5, %l3
- sethi %hi(C_LABEL(softirq_state)), %l4
+ sethi %hi(C_LABEL(irq_stat)), %l4 ! &softirq_active
add %l4, %l3, %l4
- ld [%l4 + %lo(C_LABEL(softirq_state))], %g5
- ld [%l4 + %lo(C_LABEL(softirq_state) + 4)], %g4
+ ld [%l4 + %lo(C_LABEL(irq_stat))], %g5 ! softirq_active
+ ld [%l4 + %lo(C_LABEL(irq_stat) + 4)], %g4 ! softirq_mask
andcc %g4, %g5, %g0
be C_LABEL(ret_trap_lockless_ipi)
nop
diff --git a/arch/sparc/kernel/sparc_ksyms.c b/arch/sparc/kernel/sparc_ksyms.c
index a51995713..37c276c7f 100644
--- a/arch/sparc/kernel/sparc_ksyms.c
+++ b/arch/sparc/kernel/sparc_ksyms.c
@@ -146,8 +146,6 @@ EXPORT_SYMBOL(global_bh_lock);
EXPORT_SYMBOL(global_irq_count);
EXPORT_SYMBOL(synchronize_irq);
#endif
-EXPORT_SYMBOL(__local_irq_count);
-EXPORT_SYMBOL(__local_bh_count);
EXPORT_SYMBOL(udelay);
EXPORT_SYMBOL(mstk48t02_regs);