diff options
author | Milton Miller <miltonm@bga.com> | 2011-05-10 15:29:49 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2011-05-19 01:31:33 -0400 |
commit | e085255ebce87c0b85d4752638d8a7d4f35f5b64 (patch) | |
tree | 389a7c5574f98bbb65f09d25afcd5e40aad03ee6 /arch/powerpc | |
parent | 714542721b4a53a3ebbdd5f0619ac0f66e7df610 (diff) |
powerpc/xics: Cleanup xics_host_map and ipi
Since we already have a special case in map to set the ipi handler, use
the desired flow.
If we don't find an ics to handle the interrupt complain instead of
returning 0 without having set a chip or handler.
Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/sysdev/xics/xics-common.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/powerpc/sysdev/xics/xics-common.c b/arch/powerpc/sysdev/xics/xics-common.c index a31a7103218f..43b2a791e204 100644 --- a/arch/powerpc/sysdev/xics/xics-common.c +++ b/arch/powerpc/sysdev/xics/xics-common.c | |||
@@ -135,9 +135,8 @@ static void xics_request_ipi(void) | |||
135 | 135 | ||
136 | /* | 136 | /* |
137 | * IPIs are marked IRQF_DISABLED as they must run with irqs | 137 | * IPIs are marked IRQF_DISABLED as they must run with irqs |
138 | * disabled | 138 | * disabled, and PERCPU. The handler was set in map. |
139 | */ | 139 | */ |
140 | irq_set_handler(ipi, handle_percpu_irq); | ||
141 | BUG_ON(request_irq(ipi, icp_ops->ipi_action, | 140 | BUG_ON(request_irq(ipi, icp_ops->ipi_action, |
142 | IRQF_DISABLED|IRQF_PERCPU, "IPI", NULL)); | 141 | IRQF_DISABLED|IRQF_PERCPU, "IPI", NULL)); |
143 | } | 142 | } |
@@ -341,15 +340,16 @@ static int xics_host_map(struct irq_host *h, unsigned int virq, | |||
341 | /* Don't call into ICS for IPIs */ | 340 | /* Don't call into ICS for IPIs */ |
342 | if (hw == XICS_IPI) { | 341 | if (hw == XICS_IPI) { |
343 | irq_set_chip_and_handler(virq, &xics_ipi_chip, | 342 | irq_set_chip_and_handler(virq, &xics_ipi_chip, |
344 | handle_fasteoi_irq); | 343 | handle_percpu_irq); |
345 | return 0; | 344 | return 0; |
346 | } | 345 | } |
347 | 346 | ||
348 | /* Let the ICS setup the chip data */ | 347 | /* Let the ICS setup the chip data */ |
349 | list_for_each_entry(ics, &ics_list, link) | 348 | list_for_each_entry(ics, &ics_list, link) |
350 | if (ics->map(ics, virq) == 0) | 349 | if (ics->map(ics, virq) == 0) |
351 | break; | 350 | return 0; |
352 | return 0; | 351 | |
352 | return -EINVAL; | ||
353 | } | 353 | } |
354 | 354 | ||
355 | static int xics_host_xlate(struct irq_host *h, struct device_node *ct, | 355 | static int xics_host_xlate(struct irq_host *h, struct device_node *ct, |