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 C6D9CCCD1A7 for ; Tue, 21 Oct 2025 15:15:35 +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-Type:MIME-Version: References:In-Reply-To:Subject:Cc:To:From:Message-ID:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=hgnFrpXidvfCdHtRoC6xMEtt8JVqz1TQu5QhyO+uCEI=; b=nOrwukIx0aYi/yFEgkGeFWREFb YNyHjX5iySNTlHSShXKiEJ0NIPgwQaxx/5OsHe0Yo5by4yKXdVih1VZfKOLOwmBC9h8S/XM/j6QR7 x8iW4LNgzWlWqBEMHXBf4ZY/n+8b4P++9fY+bzI+4sM/5/BgXdrOG7uSj5tBo80YiJTz3lAdzT9Oy rijv1ZcJJCKOS9qEzEZav2uFmXNcAfO09mouTuXgFRSPT4k+HCbsPaDbmXM+CZclRUIOO0yXDuxE5 QldzuYJlucppo14Ov6v8ey0wojPhY+MWa4TEZRieuuc+jqYZeE70vgkwQC3UrqhegSSV4lCaAzOl0 Bht0p2gw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1vBE5B-0000000HSwh-3i96; Tue, 21 Oct 2025 15:15:29 +0000 Received: from sea.source.kernel.org ([2600:3c0a:e001:78e:0:1991:8:25]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1vBE59-0000000HSw6-2rRT for linux-arm-kernel@lists.infradead.org; Tue, 21 Oct 2025 15:15:28 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id 0A20743B78; Tue, 21 Oct 2025 15:15:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D4771C4CEF1; Tue, 21 Oct 2025 15:15:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1761059726; bh=MgCXam1/mW0SmqZK+U1KcPTrQ31DfIrbzGnwcNoUJAo=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=mznYIclegWDskvSCmLAaalFM0uFXHZtex0TSHbihITxS2pbRir/3KXk12MRxco4ss Z8CpuUCd+ihY4fF6y/N+uC4e5rGHSynPC2qICWCclMsiCmkaNlxc4lyhNaX5ThNiMi gT3G1cdtAxeDwCGhcXw4dx5BesSxIwN1CebQOIQ5wdtgFICJw0acGIKSsgK0Azyv+9 56VAWXZcu50+l0yevg4Woj2qtQIfJlwF/FuN4YgkRPPSfx+Lr79GHc3W5dg28nhz3P QEo/SUdvo5rHFMgzLhtDIwwy2czuuNhi9rHoLK16f1ufJZdV8DyZ8E7pikDkaLgjay C1iIkch+9VX+A== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1vBE56-0000000FtDi-1fUu; Tue, 21 Oct 2025 15:15:24 +0000 Date: Tue, 21 Oct 2025 16:15:23 +0100 Message-ID: <868qh4wak4.wl-maz@kernel.org> From: Marc Zyngier To: Lorenzo Pieralisi Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-pci@vger.kernel.org, Frank Li , Sascha Bischoff , Thomas Gleixner , Rob Herring , Scott Branden , Bjorn Helgaas , Ray Jui , Manivannan Sadhasivam , Krzysztof =?UTF-8?B?V2lsY3p5xYRza2k=?= Subject: Re: [PATCH v4 5/5] irqchip/gic-its: Rework platform MSI deviceID detection In-Reply-To: <20251021124103.198419-6-lpieralisi@kernel.org> References: <20251021124103.198419-1-lpieralisi@kernel.org> <20251021124103.198419-6-lpieralisi@kernel.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/30.1 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: lpieralisi@kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-pci@vger.kernel.org, Frank.Li@nxp.com, sascha.bischoff@arm.com, tglx@linutronix.de, robh@kernel.org, sbranden@broadcom.com, bhelgaas@google.com, rjui@broadcom.com, mani@kernel.org, kwilczynski@kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20251021_081527_763238_55E46D75 X-CRM114-Status: GOOD ( 18.98 ) 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 Tue, 21 Oct 2025 13:41:03 +0100, Lorenzo Pieralisi wrote: > > Current code retrieving platform devices MSI devID in the GIC ITS MSI > parent helpers suffers from some minor issues: > > - It leaks a struct device_node reference > - It is duplicated between GICv3 and GICv5 for no good reason > - It does not use the OF phandle iterator code that simplifies > the msi-parent property parsing > > Consolidate GIC v3 and v5 deviceID retrieval in a function that addresses > the full set of issues in one go by merging GIC v3 and v5 code and > converting the msi-parent parsing loop to the more modern OF phandle > iterator API, fixing the struct device_node reference leak in the process. > > Signed-off-by: Lorenzo Pieralisi > Reviewed-by: Frank Li > Cc: Sascha Bischoff > Cc: Thomas Gleixner > Cc: Rob Herring > Cc: Frank Li > Cc: Marc Zyngier > --- > drivers/irqchip/irq-gic-its-msi-parent.c | 91 ++++++------------------ > 1 file changed, 23 insertions(+), 68 deletions(-) Reviewed-by: Marc Zyngier M. -- Without deviation from the norm, progress is not possible.