lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aV4gH/yHaOmOtK0J@lpieralisi>
Date: Wed, 7 Jan 2026 09:58:07 +0100
From: Lorenzo Pieralisi <lpieralisi@...nel.org>
To: Jonathan Cameron <jonathan.cameron@...wei.com>
Cc: "Rafael J. Wysocki" <rafael@...nel.org>, Len Brown <lenb@...nel.org>,
	Robert Moore <robert.moore@...el.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Hanjun Guo <guohanjun@...wei.com>,
	Sudeep Holla <sudeep.holla@....com>, Marc Zyngier <maz@...nel.org>,
	Bjorn Helgaas <bhelgaas@...gle.com>, linux-acpi@...r.kernel.org,
	acpica-devel@...ts.linux.dev, linux-kernel@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org, linux-pci@...r.kernel.org
Subject: Re: [PATCH v2 3/7] irqdomain: Add parent field to struct irqchip_fwid

On Mon, Jan 05, 2026 at 12:01:08PM +0000, Jonathan Cameron wrote:
> On Thu, 18 Dec 2025 11:14:29 +0100
> Lorenzo Pieralisi <lpieralisi@...nel.org> wrote:
> 
> > The GICv5 driver IRQ domain hierarchy requires adding a parent field to
> > struct irqchip_fwid so that core code can reference a fwnode_handle parent
> > for a given fwnode.
> > 
> > Add a parent field to struct irqchip_fwid and update the related kernel API
> > functions to initialize and handle it.
> > 
> > Signed-off-by: Lorenzo Pieralisi <lpieralisi@...nel.org>
> > Cc: Thomas Gleixner <tglx@...utronix.de>
> > Cc: Marc Zyngier <maz@...nel.org>
> Hi Lorenzo,
> 
> Happy new year.

Happy New Year !

> > ---
> >  include/linux/irqdomain.h | 30 ++++++++++++++++++++++++++----
> >  kernel/irq/irqdomain.c    | 14 +++++++++++++-
> >  2 files changed, 39 insertions(+), 5 deletions(-)
> > 
> > diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h
> > index 62f81bbeb490..b9df84b447a1 100644
> > --- a/include/linux/irqdomain.h
> > +++ b/include/linux/irqdomain.h
> > @@ -257,7 +257,8 @@ static inline void irq_domain_set_pm_device(struct irq_domain *d, struct device
> >  
> >  #ifdef CONFIG_IRQ_DOMAIN
> >  struct fwnode_handle *__irq_domain_alloc_fwnode(unsigned int type, int id,
> > -						const char *name, phys_addr_t *pa);
> > +						const char *name, phys_addr_t *pa,
> > +						struct fwnode_handle *parent);
> >  
> >  enum {
> >  	IRQCHIP_FWNODE_REAL,
> > @@ -267,18 +268,39 @@ enum {
> >  
> >  static inline struct fwnode_handle *irq_domain_alloc_named_fwnode(const char *name)
> >  {
> > -	return __irq_domain_alloc_fwnode(IRQCHIP_FWNODE_NAMED, 0, name, NULL);
> > +	return __irq_domain_alloc_fwnode(IRQCHIP_FWNODE_NAMED, 0, name, NULL, NULL);
> > +}
> > +
> > +static inline
> > +struct fwnode_handle *irq_domain_alloc_named_fwnode_parent(const char *name,
> > +							   struct fwnode_handle *parent)
> 
> The name of this makes me think it's allocating the named fwnode parent, rather that
> the named fwnode + setting it's parent.
> 
> There aren't all that many calls to irq_domain_named_fwnode(), maybe to avoid challenge
> of a new name, just add the parameter to all of them? (25ish)  Mind you the current
> pattern for similar cases is a helper, so maybe not.

Similar cases ? Have you got anything specific I can look into ?

> Or go with something similar to named and have
> 
> irq_domain_alloc_named_parented_fwnode()?

Or I can add a set_parent() helper (though that's a bit of churn IMO) ?

If Thomas has a preference I will follow that, all of the above is doable
for me.

> I'm not that bothered though if you think the current naming is the best we can do.

I think you have a point - as per my comment above.

Thanks,
Lorenzo

> Jonathan
> 
> > +{
> > +	return __irq_domain_alloc_fwnode(IRQCHIP_FWNODE_NAMED, 0, name, NULL, parent);
> >  }
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ