Message ID | 20200520164927.39090-3-andriy.shevchenko@linux.intel.com (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
Series | [v1,1/3] irqdomain: Make __irq_domain_add() less OF-dependent | expand |
Hi Andy, On 2020-05-20 17:49, Andy Shevchenko wrote: > In some cases we might need to have an IRQ domain created out of > software node. > One of such cases is DesignWare GPIO driver when it's instantiated from > half-baked ACPI table (alas, we can't fix it for devices which are few > years > on market) and thus using software nodes to quirk this up. But the > driver > is using IRQ domains based on per GPIO port firmware nodes, which are > in > the above case software ones. This brings a warning message to be > printed > > [ 73.957183] irq: Invalid fwnode type for irqdomain > > and creates an unknown IRQ domain. > > When we allow software node to be correct one for IRQ domain we will > get rid of the warning message and nice domain name at the same time: > > % ls -1 /sys/kernel/debug/irq/domains/ > ... > intel-quark-dw-apb-gpio:portA > > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> > --- > kernel/irq/irqdomain.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c > index c6204bc606a2..e4ebc5398ef5 100644 > --- a/kernel/irq/irqdomain.c > +++ b/kernel/irq/irqdomain.c > @@ -161,7 +161,8 @@ struct irq_domain *__irq_domain_add(struct > fwnode_handle *fwnode, int size, > domain->name = fwid->name; > break; > } > - } else if (is_of_node(fwnode) || is_acpi_device_node(fwnode)) { > + } else if (is_of_node(fwnode) || is_acpi_device_node(fwnode) || > + is_software_node(fwnode)) { > char *name; > > /* Thanks for this. I've applied it to irqchip-next. In the future, please consider adding a cover letter describing the overall goal of the series. Cheers, M.
On Thu, May 21, 2020 at 09:59:57AM +0100, Marc Zyngier wrote: > On 2020-05-20 17:49, Andy Shevchenko wrote: > Thanks for this. I've applied it to irqchip-next. Thank you, Marc! > In the future, > please consider adding a cover letter describing the overall > goal of the series. I will keep in mind and follow.
diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c index c6204bc606a2..e4ebc5398ef5 100644 --- a/kernel/irq/irqdomain.c +++ b/kernel/irq/irqdomain.c @@ -161,7 +161,8 @@ struct irq_domain *__irq_domain_add(struct fwnode_handle *fwnode, int size, domain->name = fwid->name; break; } - } else if (is_of_node(fwnode) || is_acpi_device_node(fwnode)) { + } else if (is_of_node(fwnode) || is_acpi_device_node(fwnode) || + is_software_node(fwnode)) { char *name; /*
In some cases we might need to have an IRQ domain created out of software node. One of such cases is DesignWare GPIO driver when it's instantiated from half-baked ACPI table (alas, we can't fix it for devices which are few years on market) and thus using software nodes to quirk this up. But the driver is using IRQ domains based on per GPIO port firmware nodes, which are in the above case software ones. This brings a warning message to be printed [ 73.957183] irq: Invalid fwnode type for irqdomain and creates an unknown IRQ domain. When we allow software node to be correct one for IRQ domain we will get rid of the warning message and nice domain name at the same time: % ls -1 /sys/kernel/debug/irq/domains/ ... intel-quark-dw-apb-gpio:portA Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> --- kernel/irq/irqdomain.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)