aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/sysdev/mpic.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/sysdev/mpic.c')
-rw-r--r--arch/powerpc/sysdev/mpic.c36
1 files changed, 0 insertions, 36 deletions
diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
index 3f995dcf95c9..d3bc7e595d0b 100644
--- a/arch/powerpc/sysdev/mpic.c
+++ b/arch/powerpc/sysdev/mpic.c
@@ -597,42 +597,6 @@ static void __init mpic_scan_ht_pics(struct mpic *mpic)
597 597
598#endif /* CONFIG_MPIC_U3_HT_IRQS */ 598#endif /* CONFIG_MPIC_U3_HT_IRQS */
599 599
600#ifdef CONFIG_SMP
601static int irq_choose_cpu(const struct cpumask *mask)
602{
603 int cpuid;
604
605 if (cpumask_equal(mask, cpu_all_mask)) {
606 static int irq_rover = 0;
607 static DEFINE_RAW_SPINLOCK(irq_rover_lock);
608 unsigned long flags;
609
610 /* Round-robin distribution... */
611 do_round_robin:
612 raw_spin_lock_irqsave(&irq_rover_lock, flags);
613
614 irq_rover = cpumask_next(irq_rover, cpu_online_mask);
615 if (irq_rover >= nr_cpu_ids)
616 irq_rover = cpumask_first(cpu_online_mask);
617
618 cpuid = irq_rover;
619
620 raw_spin_unlock_irqrestore(&irq_rover_lock, flags);
621 } else {
622 cpuid = cpumask_first_and(mask, cpu_online_mask);
623 if (cpuid >= nr_cpu_ids)
624 goto do_round_robin;
625 }
626
627 return get_hard_smp_processor_id(cpuid);
628}
629#else
630static int irq_choose_cpu(const struct cpumask *mask)
631{
632 return hard_smp_processor_id();
633}
634#endif
635
636/* Find an mpic associated with a given linux interrupt */ 600/* Find an mpic associated with a given linux interrupt */
637static struct mpic *mpic_find(unsigned int irq) 601static struct mpic *mpic_find(unsigned int irq)
638{ 602{