From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 83C13CD5829 for ; Wed, 7 Jan 2026 10:05:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Subject:CC:To: From:Date:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=HxNde3KR94/N4DZv16if/hks/1v+RCJgcAMk3nISRpw=; b=fTQOEhnfZ2gs5BuV7AXHifc3iS RMD69+VeMnqVn8Zu/4WoeGNavmESQnHJksqsY3WF+peXTLWS8qoNrIXg3rAXveVaPxEPdqFcp0cwj jdtuWDd5BgqA66uPvkVSPn6Bq/0Axo6GmPumL48oV8QQMtCmr/TJRghP5soU423CoKyZOL6mkgucc 8nlfVzgTZ/c1/gTimu4gAImu6byOfYG1CakmeFYRjk6PyW3AAW6F5k25OyfhYeg87eFKufqrDe32d 9NTr8fGqq8Yt3+2iRT+5G4bPfaF5if/pwpP+ny644exV2JGwFXRs0qXyhL5kpcNjKr4a+DzcdrdmB FSMXS/mA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1vdQPd-0000000EdvQ-1lPn; Wed, 07 Jan 2026 10:05:09 +0000 Received: from frasgout.his.huawei.com ([185.176.79.56]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1vdQPZ-0000000Edti-1InP for linux-arm-kernel@lists.infradead.org; Wed, 07 Jan 2026 10:05:08 +0000 Received: from mail.maildlp.com (unknown [172.18.224.150]) by frasgout.his.huawei.com (SkyGuard) with ESMTPS id 4dmNtr3skPzJ46DQ; Wed, 7 Jan 2026 18:04:52 +0800 (CST) Received: from dubpeml100005.china.huawei.com (unknown [7.214.146.113]) by mail.maildlp.com (Postfix) with ESMTPS id 8D57B40565; Wed, 7 Jan 2026 18:04:55 +0800 (CST) Received: from localhost (10.203.177.15) by dubpeml100005.china.huawei.com (7.214.146.113) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.36; Wed, 7 Jan 2026 10:04:54 +0000 Date: Wed, 7 Jan 2026 10:04:52 +0000 From: Jonathan Cameron To: Lorenzo Pieralisi CC: "Rafael J. Wysocki" , Len Brown , Robert Moore , Thomas Gleixner , Hanjun Guo , Sudeep Holla , Marc Zyngier , Bjorn Helgaas , , , , , Subject: Re: [PATCH v2 3/7] irqdomain: Add parent field to struct irqchip_fwid Message-ID: <20260107100452.00004b6f@huawei.com> In-Reply-To: References: <20251218-gicv5-host-acpi-v2-0-eec76cd1d40b@kernel.org> <20251218-gicv5-host-acpi-v2-3-eec76cd1d40b@kernel.org> <20260105120108.00002016@huawei.com> X-Mailer: Claws Mail 4.3.0 (GTK 3.24.42; x86_64-w64-mingw32) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.203.177.15] X-ClientProxiedBy: lhrpeml100009.china.huawei.com (7.191.174.83) To dubpeml100005.china.huawei.com (7.214.146.113) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260107_020505_646118_FFBD3EB1 X-CRM114-Status: GOOD ( 34.73 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, 7 Jan 2026 09:58:07 +0100 Lorenzo Pieralisi wrote: > On Mon, Jan 05, 2026 at 12:01:08PM +0000, Jonathan Cameron wrote: > > On Thu, 18 Dec 2025 11:14:29 +0100 > > Lorenzo Pieralisi 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 > > > Cc: Thomas Gleixner > > > Cc: Marc Zyngier > > 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 ? I meant all the different irq_domain_alloc_xxxxx variants that call __irq_domain_alloc_fwnode() with a subset of parameters set to NULL. That seems to say there is a precedence for making the presence of the parameter part of the name rather than requiring callers to set the ones they don't want to NULL. So it argues for a helper like this one just for consistency. > > > 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. Agreed. Let's see what Thomas prefers (i.e. make the decision his problem ;) Jonathan > > > 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); > > > } > > > > >