Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1680825
| From | Suzuki K Poulose <suzuki.poulose@arm.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 1/3] irqchip: gic-v3: Report failures in gic_irq_domain_alloc |
| Date | 2017-07-04 12:00 +0200 |
| Message-ID | <tZsMF-6xj-9@gated-at.bofh.it> (permalink) |
| References | <tZsMF-6xj-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
If the GIC cannot map an IRQ via irq_domain_ops->alloc(), it doesn't
return an error code. This can cause a problem with drivers, where
it thinks it has successfully got an IRQ for the device, but requesting
the same ends up failure with -ENOSYS (as the IRQ's chip is not set).
Fixes: commit 443acc4f37f6 ("irqchip: GICv3: Convert to domain hierarchy")
Cc: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
---
drivers/irqchip/irq-gic-v3.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c
index fc037d9..ea82342 100644
--- a/drivers/irqchip/irq-gic-v3.c
+++ b/drivers/irqchip/irq-gic-v3.c
@@ -835,8 +835,11 @@ static int gic_irq_domain_alloc(struct irq_domain *domain, unsigned int virq,
if (ret)
return ret;
- for (i = 0; i < nr_irqs; i++)
- gic_irq_domain_map(domain, virq + i, hwirq + i);
+ for (i = 0; i < nr_irqs; i++) {
+ ret = gic_irq_domain_map(domain, virq + i, hwirq + i);
+ if (ret)
+ return ret;
+ }
return 0;
}
--
2.7.5
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/3] irqchip: Miscellaneous fixes for GIC/GICv3 Suzuki K Poulose <suzuki.poulose@arm.com> - 2017-07-04 12:00 +0200 [PATCH 2/3] irqchip: gic-v2: Report failures in gic_irq_domain_alloc Suzuki K Poulose <suzuki.poulose@arm.com> - 2017-07-04 12:00 +0200 [PATCH 1/3] irqchip: gic-v3: Report failures in gic_irq_domain_alloc Suzuki K Poulose <suzuki.poulose@arm.com> - 2017-07-04 12:00 +0200 [PATCH 3/3] irq: gic-v3: Honor forced affinity setting Suzuki K Poulose <suzuki.poulose@arm.com> - 2017-07-04 12:00 +0200 Re: [PATCH 0/3] irqchip: Miscellaneous fixes for GIC/GICv3 Marc Zyngier <marc.zyngier@arm.com> - 2017-07-04 12:20 +0200
csiph-web