From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796294859; b=3BKj/xh+Yc/dVEace17RtXcuRJSL7wGqjk/ri8jnnCGO/m1gHigITVsytFm6298v5ccv L/drLe7js+ymB/8sscr1ey6DFcbZ1QpDOXcaFzULY7dBCSLBl7XctLFqQANBzUpHZz+3h pmzBPKx+hOfCpLSABbVx5YhDBUZ7M/o62HKCVlczDY2mXXsy0oi9acpYRxGptgC6Y2Boo dLV6JsamgEIYPbtR/T13Gz2N003gifWJDFrBJXBVF14QYrvdRaQQ2ro/Wr82Zg2wLY8Yu q0TTC9QlEqlp+WlRgdh5C58Bfe+3kGstkU4wpKECd11IWMAEACL82h0mePLiIFj3PgQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796294859; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=FeJS0RXTbpxKbZ34VEmUw/rU4opmTpJ5cq0sH9py76s=; b=foFFchbsbp/+MGFoVdNs2SQdnbWXvEGBGMtd87fFFKVoZUL7b/Oaj4halEXq9Eq1zDPa n0wGeSEDRVF478DF/GuozjZuE1RQWm1gvufiDBAMolOKd2uRufeBtKYAlcavWb0t2QXuX EdXUB0G7Bh11kZHSlxQO20SNo+L7HMlfmx8taFiPCoq60/7gXCcsm6Bi7lKke8NNnOgGe gxQhxZ/ccAGIcO5p9TMrghdP5GPLnc3ljynYZz6dVFJYvXEwK3qQnz5SYxMyD62S5Xztw j0gFEAEInMMGlTkntBLlmNzGiU6J8YrwHGkEgcSloD8Y1AQYjJBmEibRvqdkoc93Qig== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=fVnDPLjk; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A804D606A332 for ; Thu, 3 Dec 2026 10:47:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=fVnDPLjk Received: by smtp.kernel.org (Postfix) with ESMTPSA id 65D971F00898; Thu, 3 Dec 2026 10:47:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796294859; bh=FeJS0RXTbpxKbZ34VEmUw/rU4opmTpJ5cq0sH9py76s=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=fVnDPLjkY4vrKU/9kwfXxUiZrStSv+pjpNElspcAR0Ik7wD5ym6QPrAAeaQYDRJUR HTLgg6rZSDJ/1cNpu56TxM8wzU0wUOFEqowxOVOsA177v9t/vb8LvgAmVM1JiY8X0X A+MfUDUUuupUDjQjWpgmrzuQXpoDCO1esGlAhV6Dwx/+k/ps3mx2+6ut/SJzoHTTux m3ult5fFoF70oa39n67fXclRUQCYzVuUyOJQDb0f5pt/TrVd5enTzt5T8emdExwcnT mClmtyKE5GnRQFKxr28FPE77dkl4jNOrlnPmgeaQJkdcuE4IjRzRZFT2nexTfgvGCG gwqeN8vq/pwIg== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH 4/6] PCI: rzg3s-host: Initialize the IRQ domains after the IRQs are masked Reply-To: sashiko-reviews@lists.linux.dev To: "Claudiu Beznea" Cc: linux-pci@vger.kernel.org, wsa+renesas@sang-engineering.com In-Reply-To: <20261203093224.247349-5-claudiu.beznea@kernel.org> References: <20261203093224.247349-1-claudiu.beznea@kernel.org> <20261203093224.247349-5-claudiu.beznea@kernel.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Thu, 03 Dec 2026 10:47:39 +0000 X-Mailing-List: linux-pci@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Medium] PCI: rzg3s-host: rzg3s_pcie_irq_init() fails to mask INTx and MSI sources -- commit 235fc1f6b07ca2eb04e5a0e74470c01037910a31 Author: Claudiu Beznea PCI: rzg3s-host: Initialize the IRQ domains after the IRQs are masked This commit moves init_irqdomain() from rzg3s_pcie_host_setup() into rzg3s_pcie_host_init() after rzg3s_pcie_irq_init(), and updates the error-handling teardown order accordingly. > diff --git a/drivers/pci/controller/pcie-rzg3s-host.c b/drivers/pci/contr= oller/pcie-rzg3s-host.c > index 201888f1f5250..cbe25615eb967 100644 > --- a/drivers/pci/controller/pcie-rzg3s-host.c > +++ b/drivers/pci/controller/pcie-rzg3s-host.c [ ... ] > @@ -1441,10 +1444,14 @@ static int rzg3s_pcie_host_init(struct rzg3s_pcie= _host *host) > /* Initialize the interrupts */ > rzg3s_pcie_irq_init(host); > =20 > + ret =3D init_irqdomain(host); > + if (ret) > + goto config_deinit_and_refclk; [Severity: Medium] Does rzg3s_pcie_irq_init() actually mask the INTx and MSI sources whose handlers init_irqdomain() installs? rzg3s_pcie_irq_init() only clears and disables the PCIe event and error registers (PEIE0/1, PEIS0/1, AMEIS, ASEIS1, MSGRCVIS). It leaves the INTx and MSI registers (RZG3S_PCI_PINTRCVIE, RZG3S_PCI_PINTRCVIS, RZG3S_PCI_MSGRCVIE, MSIRE/MSIRM/MSIRS, RZG3S_PCI_MSIRCVWADRL) untouched. Since power_resets are shared and only deasserted on probe without being asserted first, bootloader or prior controller state in those registers persists across rzg3s_pcie_irq_init(). If a level-triggered INTx is latched when irq_set_chained_handler_and_data() runs before any child virq is mapped, generic_handle_domain_irq() returns -EINVAL without acking or masking the line, causing an infinite chained-IRQ storm. Similarly, rzg3s_pcie_init_msi() calls request_irq() before rzg3s_pcie_msi_setup(), so a left-enabled MSI can still fire on half-initialized state. Masking and clearing the INTx and MSI registers in rzg3s_pcie_irq_init() (with a readback barrier after the writel_relaxed() writes) before init_irqdomain() would ensure the handlers are installed safely. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261203093224.2473= 49-1-claudiu.beznea@kernel.org?part=3D4