Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1728168

[PATCH v4 2/6] irqdomain: clear trigger type in irq_domain_push_irq()

From Masahiro Yamada <yamada.masahiro@socionext.com>
Newsgroups linux.kernel
Subject [PATCH v4 2/6] irqdomain: clear trigger type in irq_domain_push_irq()
Date 2017-09-07 13:50 +0200
Message-ID <un3tM-7Qh-3@gated-at.bofh.it> (permalink)
References <un3tM-7Qh-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Prior to the addition of irq_domain_push_irq(), the hierarchy
IRQ domain always allocates IRQs from the outer-most domain.
Each irqchip usually calls irq_domain_alloc_irqs_parent(),
ascending the topology up to the root irqchip.

The brand-new function irq_domain_push_irq() allows us to allocate
IRQs for parent domain first, then add a child irq_data to the
tail of the chain.

For the new use-case, if the parent sets a temporary trigger type,
it may differ from the type requested to the outer-most irqchip,
then irq_create_fwspec_mapping() warns "type mismatch, failed to map..."

Clear the trigger type when a new irq_data is connected to the chain.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

Changes in v4:
  - Newly added


 kernel/irq/irqdomain.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
index da3e0b6..18d11b9 100644
--- a/kernel/irq/irqdomain.c
+++ b/kernel/irq/irqdomain.c
@@ -1532,6 +1532,9 @@ int irq_domain_push_irq(struct irq_domain *domain, int virq, void *arg)
 	tail_irq_data->chip = NULL;
 	tail_irq_data->chip_data = NULL;
 
+	/* clear the trigger type to avoid "type mismatch" error */
+	irqd_set_trigger_type(tail_irq_data, IRQ_TYPE_NONE);
+
 	/* May (probably does) set hwirq, chip, etc. */
 	rv = irq_domain_alloc_irqs_hierarchy(domain, virq, 1, arg);
 	if (rv) {
-- 
2.7.4

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH v4 2/6] irqdomain: clear trigger type in irq_domain_push_irq() Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-09-07 13:50 +0200
  Re: [PATCH v4 2/6] irqdomain: clear trigger type in  irq_domain_push_irq() Marc Zyngier <marc.zyngier@arm.com> - 2017-09-07 14:30 +0200
    Re: [PATCH v4 2/6] irqdomain: clear trigger type in irq_domain_push_irq() Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-09-08 17:20 +0200

csiph-web