浏览代码

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>
David S. Miller 16 年之前
父节点
当前提交
7b1af32f52
共有 3 个文件被更改,包括 11 次插入12 次删除
  1. 0 11
      arch/sparc/include/asm/obio.h
  2. 0 1
      arch/sparc/kernel/sun4d_irq.c
  3. 11 0
      arch/sparc/kernel/sun4d_smp.c

+ 0 - 11
arch/sparc/include/asm/obio.h

@@ -155,17 +155,6 @@ static inline void bw_set_ctrl(int cpu, unsigned ctrl)
 			      "i" (ASI_M_CTL));
 }
 
-extern 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));
-}
-
 static inline unsigned cc_get_ipen(void)
 {
 	unsigned pending;

+ 0 - 1
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

+ 11 - 0
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();