aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/kernel
diff options
context:
space:
mode:
authorSam Ravnborg <sam@ravnborg.org>2011-04-18 07:25:42 -0400
committerDavid S. Miller <davem@davemloft.net>2011-04-20 01:11:39 -0400
commitdb1cdd146a0814b6f312fe1a7fa1ab87ac177b2a (patch)
tree3a328c40640ce1f7aa7d44709fc46d7ba5b0d72b /arch/sparc/kernel
parent2f666bcf757cb72549f360ef6da02f03620a48b6 (diff)
sparc32,sun4d: rename sbus_tid to board_to_cpu in irq support
The new name reflects the actual usage much better. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/kernel')
-rw-r--r--arch/sparc/kernel/sun4d_irq.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/arch/sparc/kernel/sun4d_irq.c b/arch/sparc/kernel/sun4d_irq.c
index 77b4a8992710..ee35c45ffb89 100644
--- a/arch/sparc/kernel/sun4d_irq.c
+++ b/arch/sparc/kernel/sun4d_irq.c
@@ -51,7 +51,11 @@ static struct sun4d_timer_regs __iomem *sun4d_timers;
51#define TIMER_IRQ 10 51#define TIMER_IRQ 10
52 52
53#define MAX_STATIC_ALLOC 4 53#define MAX_STATIC_ALLOC 4
54static unsigned char sbus_tid[32]; 54
55/* Specify which cpu handle interrupts from which board.
56 * Index is board - value is cpu.
57 */
58static unsigned char board_to_cpu[32];
55 59
56static struct irqaction *irq_action[NR_IRQS]; 60static struct irqaction *irq_action[NR_IRQS];
57 61
@@ -363,7 +367,7 @@ out:
363 367
364static void sun4d_disable_irq(unsigned int irq) 368static void sun4d_disable_irq(unsigned int irq)
365{ 369{
366 int tid = sbus_tid[(irq >> 5) - 1]; 370 int tid = board_to_cpu[(irq >> 5) - 1];
367 unsigned long flags; 371 unsigned long flags;
368 372
369 if (irq < NR_IRQS) 373 if (irq < NR_IRQS)
@@ -376,7 +380,7 @@ static void sun4d_disable_irq(unsigned int irq)
376 380
377static void sun4d_enable_irq(unsigned int irq) 381static void sun4d_enable_irq(unsigned int irq)
378{ 382{
379 int tid = sbus_tid[(irq >> 5) - 1]; 383 int tid = board_to_cpu[(irq >> 5) - 1];
380 unsigned long flags; 384 unsigned long flags;
381 385
382 if (irq < NR_IRQS) 386 if (irq < NR_IRQS)
@@ -413,7 +417,7 @@ void __init sun4d_distribute_irqs(void)
413 for_each_node_by_name(dp, "sbi") { 417 for_each_node_by_name(dp, "sbi") {
414 int devid = of_getintprop_default(dp, "device-id", 0); 418 int devid = of_getintprop_default(dp, "device-id", 0);
415 int board = of_getintprop_default(dp, "board#", 0); 419 int board = of_getintprop_default(dp, "board#", 0);
416 sbus_tid[board] = cpuid; 420 board_to_cpu[board] = cpuid;
417 set_sbi_tid(devid, cpuid << 3); 421 set_sbi_tid(devid, cpuid << 3);
418 } 422 }
419 printk(KERN_ERR "All sbus IRQs directed to CPU%d\n", cpuid); 423 printk(KERN_ERR "All sbus IRQs directed to CPU%d\n", cpuid);
@@ -587,7 +591,7 @@ void __init sun4d_init_sbi_irq(void)
587 unsigned int mask; 591 unsigned int mask;
588 592
589 set_sbi_tid(devid, target_cpu << 3); 593 set_sbi_tid(devid, target_cpu << 3);
590 sbus_tid[board] = target_cpu; 594 board_to_cpu[board] = target_cpu;
591 595
592 /* Get rid of pending irqs from PROM */ 596 /* Get rid of pending irqs from PROM */
593 mask = acquire_sbi(devid, 0xffffffff); 597 mask = acquire_sbi(devid, 0xffffffff);