diff options
author | David S. Miller <davem@davemloft.net> | 2008-09-02 01:17:41 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-09-08 15:40:45 -0700 |
commit | 7b1af32f52077402157f8bb8fc22d8da17606095 (patch) | |
tree | 892fea67b0775b1d87319b092e93e206e293a911 /arch/sparc/kernel | |
parent | 365b50f0f09c1a24f1a60e0c027f300ed423c192 (diff) |
sparc32: Move sun4d show_leds() out of asm/obio.h
Put it, as well as cpu_leds[] array, into sun4d_irq.c
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/kernel')
-rw-r--r-- | arch/sparc/kernel/sun4d_irq.c | 1 | ||||
-rw-r--r-- | arch/sparc/kernel/sun4d_smp.c | 11 |
2 files changed, 11 insertions, 1 deletions
diff --git a/arch/sparc/kernel/sun4d_irq.c b/arch/sparc/kernel/sun4d_irq.c index c4a2bfb750a..12541f51fcf 100644 --- a/arch/sparc/kernel/sun4d_irq.c +++ b/arch/sparc/kernel/sun4d_irq.c @@ -51,7 +51,6 @@ struct sun4d_timer_regs *sun4d_timers; #define MAX_STATIC_ALLOC 4 extern struct irqaction static_irqaction[MAX_STATIC_ALLOC]; extern int static_irq_count; -unsigned char cpu_leds[32]; #ifdef CONFIG_SMP static unsigned char sbus_tid[32]; #endif diff --git a/arch/sparc/kernel/sun4d_smp.c b/arch/sparc/kernel/sun4d_smp.c index 72fa8daab60..49a08b487ca 100644 --- a/arch/sparc/kernel/sun4d_smp.c +++ b/arch/sparc/kernel/sun4d_smp.c @@ -71,6 +71,17 @@ static void smp_setup_percpu_timer(void); extern void cpu_probe(void); extern void sun4d_distribute_irqs(void); +static unsigned char cpu_leds[32]; + +static inline void show_leds(int cpuid) +{ + cpuid &= 0x1e; + __asm__ __volatile__ ("stba %0, [%1] %2" : : + "r" ((cpu_leds[cpuid] << 4) | cpu_leds[cpuid+1]), + "r" (ECSR_BASE(cpuid) | BB_LEDS), + "i" (ASI_M_CTL)); +} + void __init smp4d_callin(void) { int cpuid = hard_smp4d_processor_id(); |