diff mbox

[05/26] sh: Use irq_set_affinity instead of homebrewn code

Message ID 20140223212736.774961401@linutronix.de (mailing list archive)
State Awaiting Upstream
Delegated to: Paul Mundt
Headers show

Commit Message

Thomas Gleixner Feb. 23, 2014, 9:40 p.m. UTC
There is no point in having an incomplete copy of irq_set_affinity()
for the hotplug irq migration code.

Use the core function instead.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: sh <linux-sh@vger.kernel.org>
---
 arch/sh/kernel/irq.c |   16 +---------------
 1 file changed, 1 insertion(+), 15 deletions(-)



--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

Index: tip/arch/sh/kernel/irq.c
===================================================================
--- tip.orig/arch/sh/kernel/irq.c
+++ tip/arch/sh/kernel/irq.c
@@ -217,19 +217,6 @@  void __init init_IRQ(void)
 }
 
 #ifdef CONFIG_HOTPLUG_CPU
-static void route_irq(struct irq_data *data, unsigned int irq, unsigned int cpu)
-{
-	struct irq_desc *desc = irq_to_desc(irq);
-	struct irq_chip *chip = irq_data_get_irq_chip(data);
-
-	printk(KERN_INFO "IRQ%u: moving from cpu%u to cpu%u\n",
-	       irq, data->node, cpu);
-
-	raw_spin_lock_irq(&desc->lock);
-	chip->irq_set_affinity(data, cpumask_of(cpu), false);
-	raw_spin_unlock_irq(&desc->lock);
-}
-
 /*
  * The CPU has been marked offline.  Migrate IRQs off this CPU.  If
  * the affinity settings do not allow other CPUs, force them onto any
@@ -253,8 +240,7 @@  void migrate_irqs(void)
 				newcpu = cpumask_any_and(data->affinity,
 							 cpu_online_mask);
 			}
-
-			route_irq(data, irq, newcpu);
+			irq_set_affinity(irq, cpumask_of(newcpu));
 		}
 	}
 }