aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2012-02-14 16:06:51 -0500
committerGrant Likely <grant.likely@secretlab.ca>2012-02-16 03:36:46 -0500
commit6d9285b00f776eebe459a858ebf07b56c36c60d2 (patch)
tree30bf9adb6a25125dc5919f0128b74cfbf2a73d3f /arch
parent4bbdd45afdae208a7c4ade89cf602f89a6397cff (diff)
irq_domain/powerpc: Eliminate virq_is_host()
There is only one user, and it is trivial to open-code. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Milton Miller <miltonm@bga.com> Tested-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/include/asm/irq.h1
-rw-r--r--arch/powerpc/kernel/irq.c7
-rw-r--r--arch/powerpc/sysdev/xics/xics-common.c12
3 files changed, 6 insertions, 14 deletions
diff --git a/arch/powerpc/include/asm/irq.h b/arch/powerpc/include/asm/irq.h
index abdd7ef28cbf..f80f262e0597 100644
--- a/arch/powerpc/include/asm/irq.h
+++ b/arch/powerpc/include/asm/irq.h
@@ -58,7 +58,6 @@ extern atomic_t ppc_n_lost_interrupts;
58struct irq_data; 58struct irq_data;
59extern irq_hw_number_t irqd_to_hwirq(struct irq_data *d); 59extern irq_hw_number_t irqd_to_hwirq(struct irq_data *d);
60extern irq_hw_number_t virq_to_hw(unsigned int virq); 60extern irq_hw_number_t virq_to_hw(unsigned int virq);
61extern bool virq_is_host(unsigned int virq, struct irq_domain *host);
62 61
63/** 62/**
64 * irq_alloc_host - Allocate a new irq_domain data structure 63 * irq_alloc_host - Allocate a new irq_domain data structure
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
index 03c95f03d792..269fbd5ac62f 100644
--- a/arch/powerpc/kernel/irq.c
+++ b/arch/powerpc/kernel/irq.c
@@ -510,13 +510,6 @@ irq_hw_number_t virq_to_hw(unsigned int virq)
510} 510}
511EXPORT_SYMBOL_GPL(virq_to_hw); 511EXPORT_SYMBOL_GPL(virq_to_hw);
512 512
513bool virq_is_host(unsigned int virq, struct irq_domain *host)
514{
515 struct irq_data *irq_data = irq_get_irq_data(virq);
516 return irq_data ? irq_data->domain == host : false;
517}
518EXPORT_SYMBOL_GPL(virq_is_host);
519
520static int default_irq_host_match(struct irq_domain *h, struct device_node *np) 513static int default_irq_host_match(struct irq_domain *h, struct device_node *np)
521{ 514{
522 return h->of_node != NULL && h->of_node == np; 515 return h->of_node != NULL && h->of_node == np;
diff --git a/arch/powerpc/sysdev/xics/xics-common.c b/arch/powerpc/sysdev/xics/xics-common.c
index c4b3ce17029a..fb2e303d25fb 100644
--- a/arch/powerpc/sysdev/xics/xics-common.c
+++ b/arch/powerpc/sysdev/xics/xics-common.c
@@ -212,16 +212,16 @@ void xics_migrate_irqs_away(void)
212 /* We can't set affinity on ISA interrupts */ 212 /* We can't set affinity on ISA interrupts */
213 if (virq < NUM_ISA_INTERRUPTS) 213 if (virq < NUM_ISA_INTERRUPTS)
214 continue; 214 continue;
215 if (!virq_is_host(virq, xics_host))
216 continue;
217 irq = (unsigned int)virq_to_hw(virq);
218 /* We need to get IPIs still. */
219 if (irq == XICS_IPI || irq == XICS_IRQ_SPURIOUS)
220 continue;
221 desc = irq_to_desc(virq); 215 desc = irq_to_desc(virq);
222 /* We only need to migrate enabled IRQS */ 216 /* We only need to migrate enabled IRQS */
223 if (!desc || !desc->action) 217 if (!desc || !desc->action)
224 continue; 218 continue;
219 if (desc->irq_data.domain != xics_host)
220 continue;
221 irq = desc->irq_data.hwirq;
222 /* We need to get IPIs still. */
223 if (irq == XICS_IPI || irq == XICS_IRQ_SPURIOUS)
224 continue;
225 chip = irq_desc_get_chip(desc); 225 chip = irq_desc_get_chip(desc);
226 if (!chip || !chip->irq_set_affinity) 226 if (!chip || !chip->irq_set_affinity)
227 continue; 227 continue;