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=1796324856; b=yOIB05Qg6ZmTpY6AK9zDSKjHOI+JtijZGrm/rtFryrl/x5DHsxm8hI+IzZhE+gJKYEqK UNEchfHcSKYN1SH2WFMHOXZHeMCenAHR7bdhPmtcelbt8K+8eH76Q2+LUUESZSwZ/7mgz O5S1hAYCmKMDL0ZrCYn7++bhvJoaBIYDHDQFX1gyWgNh6clXS+lc35Bg5ovEEAELykpbI csBMIMkk+sjJM+aqJY44DpvSOP3RgGNA09IpEXaVKcYOGMscuxKjT7MVdct2utK4pWYpF 5sj5FFWgD5qnPd+iOe8dS5GE0KAKNZbUddcnGXNCJj91NEX9ED7ebd6+36A0ZvYZfvQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796324856; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=YCzwufXfXXHXFbGNE9nxFM9nW+KTxgkDiB0M9SqCV/U=; b=EzcwX58EUl//a2j/zM29JYBgrF6z8VMlfHQ6UK6+8Hz7QSYBEHRYJTVvZNx3DAynDujx UvN/pr0FqsENOfOZhM+cxRFWdjs6zMJZcIFxQpr+Xrob7cWBODsha9mOOmFZWKytNBlRf zP0mlQsU9xCKMwNc4Bl4xZ/UyEpcAdPanbuc2lVHEdWgzSWExVZKGRurSRrTTciSwjbDg i9UqY86f0xs5Wt+Dlmv8OyXJCC1/AxarkKCfH6ACmD7cNDwWoYm8vnBFuDHGZrUBR1NdW XcXzdgitBbWd9qjFI4ix7gbMse9adGki2KSBIXstMu55nDftErM0/wWaRrC6l8iCixA== 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=KNoU4a7i; 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 0B493606A330 for ; Thu, 3 Dec 2026 19:07:35 +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=KNoU4a7i Received: by smtp.kernel.org (Postfix) with ESMTPSA id 61A861F000C2; Thu, 3 Dec 2026 19:07:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796324855; bh=YCzwufXfXXHXFbGNE9nxFM9nW+KTxgkDiB0M9SqCV/U=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=KNoU4a7imwTYb5kYFUfMkBpOSIcHmPi+CaA1fPW7mKeEn85OaHb/1vl80DDkXtSHP 4Kfab9DBWgrH0i/y5zTiI9pKZOhQybIR9ehq0HzCH6HRq5kdaRrvJ3DiE2E9dvyBOW 9egLb+0VyAwCS6jVHaAsTSSxZVO85wArKkgvAdyEq3nIhXdb7NeCbrtGE6lK5HYF9S kLLVTDY/Kr6240tnmfYT6lqA6LQg5/wOX/75qdnvTLY/UvquvOY7G4uzT8AgQy5kOj sEq7My05yilnB7VW6NGdVTI5QZ5QNM9+eYHVvVuvv+SAj9Mcr1UWBafUsehOUfcczh /xgRUfW/l7xog== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v2 2/2] irqchip: Add Microchip PIC64-HPSC/HX NVM interrupt controller Reply-To: sashiko-reviews@lists.linux.dev To: "Charles Perry" Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org In-Reply-To: <20261203-linux-7-4-rc4-pic64hpsc-nvm-intc-v2-2-a2621f8147bd@microchip.com> References: <20261203-linux-7-4-rc4-pic64hpsc-nvm-intc-v2-0-a2621f8147bd@microchip.com> <20261203-linux-7-4-rc4-pic64hpsc-nvm-intc-v2-2-a2621f8147bd@microchip.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Thu, 03 Dec 2026 19:07:34 +0000 X-Mailing-List: devicetree@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: - [High] irqchip: pic64hpsc-nvm-intc: W1C STATUS cleared in irq_ack() before handler -- commit 2768ce3c4af3d3ef913407768bf27bb848e0d049 Author: Romain Caritey irqchip: Add Microchip PIC64-HPSC/HX NVM interrupt controller This commit adds an irqchip driver for the Microchip PIC64-HPSC/HX NVM interrupt controller, which aggregates NAND, xSPI, and eMMC/SD interrupts onto a single parent APLIC line. > diff --git a/drivers/irqchip/irq-mchp-pic64hpsc-nvm-intc.c b/drivers/irqc= hip/irq-mchp-pic64hpsc-nvm-intc.c > new file mode 100644 > index 0000000000000..2dd6577aa6046 > --- /dev/null > +++ b/drivers/irqchip/irq-mchp-pic64hpsc-nvm-intc.c > @@ -0,0 +1,199 @@ [ ... ] > +static void p64h_nvm_intc_irq_ack(struct irq_data *d) > +{ > + struct p64h_nvm_intc *intc =3D irq_data_get_irq_chip_data(d); > + > + writel(BIT(d->hwirq), intc->base + P64H_NVM_INTC_STATUS); > +} [ ... ] > +static const struct irq_chip p64h_nvm_intc_irq_chip =3D { > + .irq_print_chip =3D p64h_nvm_intc_irq_print_chip, > + .irq_ack =3D p64h_nvm_intc_irq_ack, > + .irq_mask =3D p64h_nvm_intc_irq_mask, > + .irq_unmask =3D p64h_nvm_intc_irq_unmask, > + .irq_set_type =3D p64h_nvm_intc_irq_set_type, > +}; > + > +static int p64h_nvm_intc_domain_map(struct irq_domain *domain, unsigned = int virq, > + irq_hw_number_t hwirq) > +{ > + if (!p64h_nvm_intc_hwirq_is_valid(hwirq)) > + return -EINVAL; > + > + irq_set_chip_data(virq, domain->host_data); > + irq_set_chip_and_handler(virq, &p64h_nvm_intc_irq_chip, handle_level_ir= q); > + irq_set_noprobe(virq); > + > + return 0; > +} [ ... ] > +static irqreturn_t p64h_nvm_intc_handler(int irq, void *data) > +{ > + struct p64h_nvm_intc *intc =3D data; > + unsigned long pending; > + unsigned int hwirq; > + > + pending =3D readl(intc->base + P64H_NVM_INTC_STATUS) & READ_ONCE(intc->= enable); > + if (!pending) > + return IRQ_NONE; [Severity: High] As reported by Thomas Gleixner on v1 [1], can clearing the write-1-to-clear P64H_NVM_INTC_STATUS register inside p64h_nvm_intc_irq_ack() break level-hi= gh interrupts and leave stale masked bits unhandled? handle_level_irq() calls mask_ack_irq() before handle_irq_event() services the child peripheral, and only calls p64h_nvm_intc_irq_unmask() afterward. If P64H_NVM_INTC_STATUS is level-latched, the bit remains set and triggers a spurious interrupt on unmask (such as after a threaded IRQF_ONESHOT handler= ). While a line is masked in P64H_NVM_INTC_ENABLE, p64h_nvm_intc_handler() also returns IRQ_NONE without clearing or documenting whether a stale status bit re-invokes the parent handler. If P64H_NVM_INTC_STATUS is instead edge-latched, clearing it in irq_ack() before the handler runs (or unconditionally in p64h_nvm_intc_probe()) drops the latch while a level-high source remains asserted, losing the interrupt because level IRQs are not software-resent. Using handle_fasteoi_irq() with an irq_eoi callback and IRQCHIP_EOI_THREADED would clear P64H_NVM_INTC_STATUS after the child handler deasserts the line, and masked bits in P64H_NVM_INTC_STATUS should either be handled or documented. [1] https://lore.kernel.org/r/874icwpzlk.ffs@fw13 --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261203-linux-7-4-= rc4-pic64hpsc-nvm-intc-v2-0-a2621f8147bd@microchip.com?part=3D2