From nobody Sat Feb 7 23:23:34 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4B96B239E63 for ; Mon, 13 Oct 2025 09:48:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760348926; cv=none; b=aERg0GTg4vPaytwdxdMte0VOuHrxdZf5tbKJ7TRgofpR5ElfP+wMhe64a8fY1oXfH61qmLoAekVR8YiugMP7K5Z0lD3OIllfUpODfkXA8dWXZpCw/tXOAlls2UtE/bcRicKSPq9wTC5HSFpsnQoIrWYYbx6qtUhCO7tcqW8aGPI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760348926; c=relaxed/simple; bh=mGSdfzT6rwLb4k5txv2A5zvmgU2jOD3PufNbVv80KuY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=NnHzKiCCVp243JuXXNewipmB/IKNR/BhEdizES1orY9xFEQDYqx5PZVVhj/Ds2hZ2VR0HfyJV9oxW2u/tOkZZ50fo/W/JFP6A+q2bpXcj0NFGLe9JWXbZv+sUFF6wTfy7G4RNn7vM76xwdyVOL/faZ91Pl5lHOmnQMeaHmQzEDw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=HqeO8vsm; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="HqeO8vsm" Received: by smtp.kernel.org (Postfix) with ESMTPSA id F0253C4CEF8; Mon, 13 Oct 2025 09:48:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1760348926; bh=mGSdfzT6rwLb4k5txv2A5zvmgU2jOD3PufNbVv80KuY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HqeO8vsmLlnVbBJ9G3pwRbIk+7XR1j8Z/EY9sWZPSa6MECcgeIoyX3AERyKQgCXHS pEsDn+fZPsl254gpjolf0VUbP2SWgW8y8B8HrA3JuthcpQvLo+8a+dYRWi+9T9/VMm Dd918+vK4tdpeXfTivxKGyfMGDi5JxL69pnSGAjw07QtgrtnpCSX0ufQqQka0GxEqq DmeGQ2qm4pYHnpnT5ARp9UbhgWpqQIVZgj5IyshiyQnYKub3EtHE3irRZjp4wmI543 Gtv74QEfplznlWtHvHWh9DWi2jaJ2pD95QDe5TfH0ddKSDLPIJGRO/+X0EInBxLvdX ELwWKNfVBQjCw== Received: from johan by xi.lan with local (Exim 4.98.2) (envelope-from ) id 1v8FAZ-0000000036K-2NMy; Mon, 13 Oct 2025 11:48:43 +0200 From: Johan Hovold To: Thomas Gleixner Cc: Florian Fainelli , Shawn Guo , Sascha Hauer , Fabio Estevam , Claudiu Beznea , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Changhuang Liang , Geert Uytterhoeven , Magnus Damm , linux-kernel@vger.kernel.org, Johan Hovold , Stanimir Varbanov Subject: [PATCH 01/11] irqchip/bcm2712-mip: Fix OF node reference imbalance Date: Mon, 13 Oct 2025 11:46:01 +0200 Message-ID: <20251013094611.11745-2-johan@kernel.org> X-Mailer: git-send-email 2.49.1 In-Reply-To: <20251013094611.11745-1-johan@kernel.org> References: <20251013094611.11745-1-johan@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The init callback must not decrement the reference count of the provided irqchip OF node. This should not cause any trouble currently, but if the driver ever starts probe deferring it could lead to warnings about reference underflow and saturation. Fixes: 32c6c054661a ("irqchip: Add Broadcom BCM2712 MSI-X interrupt control= ler") Cc: Stanimir Varbanov Signed-off-by: Johan Hovold Reviewed-by: Florian Fainelli --- drivers/irqchip/irq-bcm2712-mip.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/irqchip/irq-bcm2712-mip.c b/drivers/irqchip/irq-bcm271= 2-mip.c index 9bd7bc0bf6d5..256c2d59f717 100644 --- a/drivers/irqchip/irq-bcm2712-mip.c +++ b/drivers/irqchip/irq-bcm2712-mip.c @@ -239,7 +239,6 @@ static int __init mip_of_msi_init(struct device_node *n= ode, struct device_node * int ret; =20 pdev =3D of_find_device_by_node(node); - of_node_put(node); if (!pdev) return -EPROBE_DEFER; =20 --=20 2.49.1 From nobody Sat Feb 7 23:23:34 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7E7A02F5A37 for ; Mon, 13 Oct 2025 09:48:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760348926; cv=none; b=qz/si2qNfrQRiNa130Qp5eJLLo3ipcxwNdBRmIYabhOCpxG8JN/dQzcbyB7fkYArP80qbHF0Z5WurufIf6LiR54YCxCNOtK0fUFjN8EYg0AGOMiPPSROwDHz/qDxUuxK3eZHHaGUnnzPmxGbDSyZeLtlzuQfxVb7IBfts6lRvN8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760348926; c=relaxed/simple; bh=WjGMo4ebNiuDIVIcaRsO8MiAUno93QhyR1S9i2wJ3e0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=i6qxVjSWWUkj7i/SZPEomhhrwxuEYS10+i015UfiWqN3ctkX2iFr1uq1/O3PsZfBZCB+JWNAf/I2dzYmaOTzzSoNj8F5fgQrkeHgQy4OclmeRw3JbgCPQelOlMsDXEvRNhTOSCildAD98EEXFPkgWc7ragzJWUTVyB1vW5afgbo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=oVj8hXqK; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="oVj8hXqK" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2A034C4CEFE; Mon, 13 Oct 2025 09:48:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1760348926; bh=WjGMo4ebNiuDIVIcaRsO8MiAUno93QhyR1S9i2wJ3e0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oVj8hXqKKbxZ6CU8Ydj7biKlWOSBYBjMpagEasi1IEQnXpO1y/byV+kJXsSX4kUzS 1cJ0Pj1khrNJ6MGTZhZksF3xkU0FHfbV50nX8Y0YSu/umX/w1N9ycagFmpCECsfAwg f+0epLSRcH8bAEPqcchJ3qaXd/ZDXV6oEYy5DKDByHvjbUP4l6G+04BKWYoCR/t+gS UvlvV7UNx8AAYYza6oH5X+cjsktPTbjKXXHYxWflY3/C4DS+ZAWiiKtKLd6wXHJRzZ fmVD5KjR5ipEVA9/audg7+Pj05jXqaLSKDT2ByqIFONxeaLoJcsxXAQA3bmBS1jPkM IMovyNBa1E5Mw== Received: from johan by xi.lan with local (Exim 4.98.2) (envelope-from ) id 1v8FAZ-0000000036M-2nUA; Mon, 13 Oct 2025 11:48:43 +0200 From: Johan Hovold To: Thomas Gleixner Cc: Florian Fainelli , Shawn Guo , Sascha Hauer , Fabio Estevam , Claudiu Beznea , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Changhuang Liang , Geert Uytterhoeven , Magnus Damm , linux-kernel@vger.kernel.org, Johan Hovold , Stanimir Varbanov Subject: [PATCH 02/11] irqchip/bcm2712-mip: Fix section mismatch Date: Mon, 13 Oct 2025 11:46:02 +0200 Message-ID: <20251013094611.11745-3-johan@kernel.org> X-Mailer: git-send-email 2.49.1 In-Reply-To: <20251013094611.11745-1-johan@kernel.org> References: <20251013094611.11745-1-johan@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Platform drivers can be probed after their init sections have been discarded so the irqchip init callback must not live in init. Fixes: 32c6c054661a ("irqchip: Add Broadcom BCM2712 MSI-X interrupt control= ler") Cc: Stanimir Varbanov Signed-off-by: Johan Hovold Reviewed-by: Florian Fainelli --- drivers/irqchip/irq-bcm2712-mip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/irqchip/irq-bcm2712-mip.c b/drivers/irqchip/irq-bcm271= 2-mip.c index 256c2d59f717..8466646e5a2d 100644 --- a/drivers/irqchip/irq-bcm2712-mip.c +++ b/drivers/irqchip/irq-bcm2712-mip.c @@ -232,7 +232,7 @@ static int mip_parse_dt(struct mip_priv *mip, struct de= vice_node *np) return ret; } =20 -static int __init mip_of_msi_init(struct device_node *node, struct device_= node *parent) +static int mip_of_msi_init(struct device_node *node, struct device_node *p= arent) { struct platform_device *pdev; struct mip_priv *mip; --=20 2.49.1 From nobody Sat Feb 7 23:23:34 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 91E082FB632 for ; Mon, 13 Oct 2025 09:48:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760348926; cv=none; b=mpsrTpA9Y498VmcE8LWGn4F1RajRMnIk7//lbMzfWJpzqgw970rUs7yccZTgaGY5H8uEu8YlvlAXAuEiZrlUQpHRpOUK2lMUeAkTvFD9j4TBKlIiMY/MfOEghPCnu7xJrIux1Ub7tHJk8kqIfXopE3SU5wnO2aI0GAXkz4L7JYQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760348926; c=relaxed/simple; bh=g6X8oJ5DSXDBk0NgBv7aeqsGUGeoDtV/vwL93P6tfMk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=qdP2XCpM2SjZTICn3GCXAAw6bYCXhcy2oUxRzqVmzgKRunckv/332r4yuPbSo76Wx5neHUFxe6yNboL914dqkD4zoZdMMsvA5YrWSVDUn5Jjx2SDtQZ7cJ6s0bGNwusUdgQ8kBOL4tS717YhsI3C6fBWb6vD3B8kztmgl5pw9dE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=D5X7CS6l; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="D5X7CS6l" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 50D99C19421; Mon, 13 Oct 2025 09:48:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1760348926; bh=g6X8oJ5DSXDBk0NgBv7aeqsGUGeoDtV/vwL93P6tfMk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=D5X7CS6la6bszhJ8EwUy3oZAODH/jy8fiSGO5O+v/14dWyadLYaP9bVRHsXrJ21ra ujdgis5J6HviDgCDu/YP0HYGYKtJuG7fdxfylh6TD7M4wnIL0fjUEXTy8QUV/LOn0x 9bCWAQrO2KDNwHc4s2d/dTjKPsFP0cbaILZf0uHBvS2DofAc2eUODBLxep8Wr5zu2G sb/HT0XYQGlZKpA3liQLSODd1nG3WDZveXNUUs1UYKLud0OAQvyjPePEOZOBUd3duR RnGaTlx2I1t6iTD78uN6pr9pqubDc7aEW2SqbVOpi24H4kUcBo69vqV3HEL8/iEB4M 9Zj/O/TNFCpaQ== Received: from johan by xi.lan with local (Exim 4.98.2) (envelope-from ) id 1v8FAZ-0000000036O-3DcQ; Mon, 13 Oct 2025 11:48:43 +0200 From: Johan Hovold To: Thomas Gleixner Cc: Florian Fainelli , Shawn Guo , Sascha Hauer , Fabio Estevam , Claudiu Beznea , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Changhuang Liang , Geert Uytterhoeven , Magnus Damm , linux-kernel@vger.kernel.org, Johan Hovold , Florian Fainelli Subject: [PATCH 03/11] irqchip/irq-bcm7038-l1: Fix section mismatch Date: Mon, 13 Oct 2025 11:46:03 +0200 Message-ID: <20251013094611.11745-4-johan@kernel.org> X-Mailer: git-send-email 2.49.1 In-Reply-To: <20251013094611.11745-1-johan@kernel.org> References: <20251013094611.11745-1-johan@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Platform drivers can be probed after their init sections have been discarded so the irqchip init callback must not live in init. Fixes: c057c799e379 ("irqchip/irq-bcm7038-l1: Switch to IRQCHIP_PLATFORM_DR= IVER") Cc: Florian Fainelli Signed-off-by: Johan Hovold Reviewed-by: Florian Fainelli --- drivers/irqchip/irq-bcm7038-l1.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/irqchip/irq-bcm7038-l1.c b/drivers/irqchip/irq-bcm7038= -l1.c index 04fac0cc857f..e28be83872cb 100644 --- a/drivers/irqchip/irq-bcm7038-l1.c +++ b/drivers/irqchip/irq-bcm7038-l1.c @@ -219,9 +219,9 @@ static int bcm7038_l1_set_affinity(struct irq_data *d, } #endif =20 -static int __init bcm7038_l1_init_one(struct device_node *dn, - unsigned int idx, - struct bcm7038_l1_chip *intc) +static int bcm7038_l1_init_one(struct device_node *dn, + unsigned int idx, + struct bcm7038_l1_chip *intc) { struct resource res; resource_size_t sz; @@ -395,8 +395,7 @@ static const struct irq_domain_ops bcm7038_l1_domain_op= s =3D { .map =3D bcm7038_l1_map, }; =20 -static int __init bcm7038_l1_of_init(struct device_node *dn, - struct device_node *parent) +static int bcm7038_l1_of_init(struct device_node *dn, struct device_node *= parent) { struct bcm7038_l1_chip *intc; int idx, ret; --=20 2.49.1 From nobody Sat Feb 7 23:23:34 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 935892FBDF7 for ; Mon, 13 Oct 2025 09:48:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760348926; cv=none; b=AINoEahCKrk3+8J1iuuSKytBPmLBcEJnkLewLqc19gJP5fgp+18yE6O/n4PBOFYLiGEMthsKyBseTrrbpkmdTNpy5lSQqKDQVeztva0fUleEY/FkXKEMSb21ddu9Z6LyIN0uvWzgZeb9mflqtT9k2bIAArQIZiPnSGKHVtFr8Ig= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760348926; c=relaxed/simple; bh=xMvnxHJzPj+IB35wtsxst4yJqf9dtCebsKDIjlWmLEA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=iUJJUeSDd4yaazxZsNYY4aQu+sZ+R3Ma/XVnh+t651378sbKRpb8m8yaKaNg/VGSaHvaRc99abB2cDM1VzVHU3yEyG6rq2z2eWNiGLUcg3mry3DQxxYwPt3mmTHv884+qtBA95L/Bug1BiffPcdl75LDEFrUCM1D8S8oVhV9Z9o= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=EQhPBtrJ; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="EQhPBtrJ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 50EDDC19422; Mon, 13 Oct 2025 09:48:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1760348926; bh=xMvnxHJzPj+IB35wtsxst4yJqf9dtCebsKDIjlWmLEA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EQhPBtrJDFN+CyiaIZPTFvmn7xzrAvx9I8cG8TAwZdUGCczRYuHIVGavv833dfZRL U3+1uHGMNZ1yVNSIJx0XCrH0t8M5Jttw16Rg2Lj2Qm1kFCDunjSZrdZzAYq+jYt6Gn UBGil/DS9BI/6/jz2yrkXMh5moIlLYWhUqsuOvk3T5NOLmHPh5/uIqeczhB1endmGd COL1VPtUNLKda/rmZ0JjyGmCJAGhqLiDXD4aTF+kTsl5r2yWqBqMWv9eU/D/Or6rGR HY0AHtrf6mlPh3nlus4q7BvqM6ztC+tSlN5GvERTMGvqYPWR2R2GHrYUtNUm4bxctd kH6ZZJRVIglew== Received: from johan by xi.lan with local (Exim 4.98.2) (envelope-from ) id 1v8FAZ-0000000036Q-3dt5; Mon, 13 Oct 2025 11:48:43 +0200 From: Johan Hovold To: Thomas Gleixner Cc: Florian Fainelli , Shawn Guo , Sascha Hauer , Fabio Estevam , Claudiu Beznea , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Changhuang Liang , Geert Uytterhoeven , Magnus Damm , linux-kernel@vger.kernel.org, Johan Hovold , Florian Fainelli Subject: [PATCH 04/11] irqchip/irq-bcm7120-l2: Fix section mismatch Date: Mon, 13 Oct 2025 11:46:04 +0200 Message-ID: <20251013094611.11745-5-johan@kernel.org> X-Mailer: git-send-email 2.49.1 In-Reply-To: <20251013094611.11745-1-johan@kernel.org> References: <20251013094611.11745-1-johan@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Platform drivers can be probed after their init sections have been discarded so the irqchip init callbacks must not live in init. Fixes: 3ac268d5ed22 ("irqchip/irq-bcm7120-l2: Switch to IRQCHIP_PLATFORM_DR= IVER") Cc: Florian Fainelli Signed-off-by: Johan Hovold Reviewed-by: Florian Fainelli --- drivers/irqchip/irq-bcm7120-l2.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/drivers/irqchip/irq-bcm7120-l2.c b/drivers/irqchip/irq-bcm7120= -l2.c index ff22c3104401..63ff68d33787 100644 --- a/drivers/irqchip/irq-bcm7120-l2.c +++ b/drivers/irqchip/irq-bcm7120-l2.c @@ -143,8 +143,7 @@ static int bcm7120_l2_intc_init_one(struct device_node = *dn, return 0; } =20 -static int __init bcm7120_l2_intc_iomap_7120(struct device_node *dn, - struct bcm7120_l2_intc_data *data) +static int bcm7120_l2_intc_iomap_7120(struct device_node *dn, struct bcm71= 20_l2_intc_data *data) { int ret; =20 @@ -177,8 +176,7 @@ static int __init bcm7120_l2_intc_iomap_7120(struct dev= ice_node *dn, return 0; } =20 -static int __init bcm7120_l2_intc_iomap_3380(struct device_node *dn, - struct bcm7120_l2_intc_data *data) +static int bcm7120_l2_intc_iomap_3380(struct device_node *dn, struct bcm71= 20_l2_intc_data *data) { unsigned int gc_idx; =20 @@ -208,7 +206,7 @@ static int __init bcm7120_l2_intc_iomap_3380(struct dev= ice_node *dn, return 0; } =20 -static int __init bcm7120_l2_intc_probe(struct device_node *dn, +static int bcm7120_l2_intc_probe(struct device_node *dn, struct device_node *parent, int (*iomap_regs_fn)(struct device_node *, struct bcm7120_l2_intc_data *), @@ -339,15 +337,13 @@ static int __init bcm7120_l2_intc_probe(struct device= _node *dn, return ret; } =20 -static int __init bcm7120_l2_intc_probe_7120(struct device_node *dn, - struct device_node *parent) +static int bcm7120_l2_intc_probe_7120(struct device_node *dn, struct devic= e_node *parent) { return bcm7120_l2_intc_probe(dn, parent, bcm7120_l2_intc_iomap_7120, "BCM7120 L2"); } =20 -static int __init bcm7120_l2_intc_probe_3380(struct device_node *dn, - struct device_node *parent) +static int bcm7120_l2_intc_probe_3380(struct device_node *dn, struct devic= e_node *parent) { return bcm7120_l2_intc_probe(dn, parent, bcm7120_l2_intc_iomap_3380, "BCM3380 L2"); --=20 2.49.1 From nobody Sat Feb 7 23:23:34 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C027F2FE041 for ; Mon, 13 Oct 2025 09:48:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760348926; cv=none; b=b+st2MpeJRSi1v3P5IByiN+v31mWmOWAppRfkzRdXgNiDiqt7pdD8bkBuyR2VjaZ2oMX4ePRznUFJ+kVYXMB+h6jA/mFgXNm9QJ/JYujmKhc+122yd1Lhi+2PhFh+qmpWPKV82YYmoOsalBrqfC/COuA29qcKG5XSFcbTOYj5QU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760348926; c=relaxed/simple; bh=qIgoBlkWclsRYWytwAMF5I10sjbvmsyYhn4jiOSJGHU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Jfdpj0zfGvwbwZkD5uu7DUfPyFvJRm8eYOaOnQIehx4MmoIQ4bg+3lxplXmtVDXy+7u8QJYpcKfsEkPhOoTzN+5Y2gU6cwQZeP5wyD2jLJF4NZyOrPBa+rFPXZ8ZDHoutmgPOqdEOYEesqxZJ3I5ISmvZBmRLXSvdru6p5dLShk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Hg9JNZND; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Hg9JNZND" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 69601C16AAE; Mon, 13 Oct 2025 09:48:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1760348926; bh=qIgoBlkWclsRYWytwAMF5I10sjbvmsyYhn4jiOSJGHU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Hg9JNZNDTILCmwTrkKOpfV9uZdfVpi1vH9IJNjFu7NlWIJliTSHR1H3UTTeKz+K6P VBqo00/BEQOVtMpAK6QVFTUj6c1xD4gPe/irtDrn3y0Vch9iuNXfzjKq6ehThPEBxs 9EiLVu4/NpYV3Fbkp5xymAc1r6IbnbPk6LUaJGJ5PrftirvHCN71rh0/CJAkqkGosB mRb8KmdktNhJsBf+PMo2a6t4WA1tSm1s+TEMuZIeDGkHHtgYT1noouWBBEaTBcnJUl cph0Qa7X1p6NmASwjJZDWlYeb2hRebQWH2Kjq/Cr+DRfthrc4rymjExGtut2ApIqj1 glFPTzAt4p6rA== Received: from johan by xi.lan with local (Exim 4.98.2) (envelope-from ) id 1v8FAZ-0000000036T-3y9l; Mon, 13 Oct 2025 11:48:43 +0200 From: Johan Hovold To: Thomas Gleixner Cc: Florian Fainelli , Shawn Guo , Sascha Hauer , Fabio Estevam , Claudiu Beznea , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Changhuang Liang , Geert Uytterhoeven , Magnus Damm , linux-kernel@vger.kernel.org, Johan Hovold , Florian Fainelli Subject: [PATCH 05/11] irqchip/irq-brcmstb-l2: Fix section mismatch Date: Mon, 13 Oct 2025 11:46:05 +0200 Message-ID: <20251013094611.11745-6-johan@kernel.org> X-Mailer: git-send-email 2.49.1 In-Reply-To: <20251013094611.11745-1-johan@kernel.org> References: <20251013094611.11745-1-johan@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Platform drivers can be probed after their init sections have been discarded so the irqchip init callbacks must not live in init. Fixes: 51d9db5c8fbb ("irqchip/irq-brcmstb-l2: Switch to IRQCHIP_PLATFORM_DR= IVER") Cc: Florian Fainelli Signed-off-by: Johan Hovold Reviewed-by: Florian Fainelli --- drivers/irqchip/irq-brcmstb-l2.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/irqchip/irq-brcmstb-l2.c b/drivers/irqchip/irq-brcmstb= -l2.c index 1bec5b2cd3f0..53e67c6c01f7 100644 --- a/drivers/irqchip/irq-brcmstb-l2.c +++ b/drivers/irqchip/irq-brcmstb-l2.c @@ -138,10 +138,8 @@ static void brcmstb_l2_intc_resume(struct irq_data *d) irq_reg_writel(gc, ~b->saved_mask, ct->regs.enable); } =20 -static int __init brcmstb_l2_intc_of_init(struct device_node *np, - struct device_node *parent, - const struct brcmstb_intc_init_params - *init_params) +static int brcmstb_l2_intc_of_init(struct device_node *np, struct device_n= ode *parent, + const struct brcmstb_intc_init_params *init_params) { unsigned int clr =3D IRQ_NOREQUEST | IRQ_NOPROBE | IRQ_NOAUTOEN; unsigned int set =3D 0; @@ -257,14 +255,12 @@ static int __init brcmstb_l2_intc_of_init(struct devi= ce_node *np, return ret; } =20 -static int __init brcmstb_l2_edge_intc_of_init(struct device_node *np, - struct device_node *parent) +static int brcmstb_l2_edge_intc_of_init(struct device_node *np, struct dev= ice_node *parent) { return brcmstb_l2_intc_of_init(np, parent, &l2_edge_intc_init); } =20 -static int __init brcmstb_l2_lvl_intc_of_init(struct device_node *np, - struct device_node *parent) +static int brcmstb_l2_lvl_intc_of_init(struct device_node *np, struct devi= ce_node *parent) { return brcmstb_l2_intc_of_init(np, parent, &l2_lvl_intc_init); } --=20 2.49.1 From nobody Sat Feb 7 23:23:34 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C1FD42FE042 for ; Mon, 13 Oct 2025 09:48:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760348926; cv=none; b=Zz1Uotmlkt30VwGOI1aZRHLawVIBxoxe6Cj13f4D6Q8hzuE8+FFkva+a/bby8sv4VWREtgrU52Hp61RktVUXa/ottKrRpDaMq3zyd8PaZlP/gLZkzpxdIQqqZ5nhHfewu8DYPzBYttLpnNmHl/F6Y+aM242tTwPBlZhMJFpW+ks= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760348926; c=relaxed/simple; bh=bujgAeJlkvKHgkFj6APtLRWJcjmwyzxriH/ZjpspDGA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=q3BjO8GFyIb8DynPoNOQuaMJwFRHo+n20hEPku+ysL1emExw3TXPmtvK0pjLSRvEh6Fl/KZb7cbLNUuyIABFHnO3DLMD2+8qF/tYj5Tu3MCP1UYLQIO4J/63jZ2IvGwC0APlcO2xI7ZV06ianh8dbF9EN68LUvUyL0M1RBsoUy8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Izjq/vYh; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Izjq/vYh" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7FFDCC4CEE7; Mon, 13 Oct 2025 09:48:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1760348926; bh=bujgAeJlkvKHgkFj6APtLRWJcjmwyzxriH/ZjpspDGA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Izjq/vYhBoXNa//IFaQEdcaurp5uNovFkhmLUnwiAfqpeCq1pPNJ7DqbyWhdg7J8G D63aVHgBBdj9aWobzIIAwP/Uxnd0rKsch4lwqqzdvDYSjWem2W/ZW9ODr86G0nVS9k lcPtB1voAZ+GmcJZOPpU/la7GRhybsOJAiNZfYuAH2yU+G4RDPVlof4nS6QFzac/9+ ENi0PcRuEGdAHPjvRonSLoc/mABczq49/M/e9lm0U7i+TY8+xD3UZecnMH9RgeftDP PEGSA/eWY5zB4oyd7+OxAEk/RskIEcPaOfNfNsq2DpklEgF+hsXA7EvVc2l9f2nbIT 26sIZ538vIf2w== Received: from johan by xi.lan with local (Exim 4.98.2) (envelope-from ) id 1v8FAa-0000000036W-0AsF; Mon, 13 Oct 2025 11:48:44 +0200 From: Johan Hovold To: Thomas Gleixner Cc: Florian Fainelli , Shawn Guo , Sascha Hauer , Fabio Estevam , Claudiu Beznea , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Changhuang Liang , Geert Uytterhoeven , Magnus Damm , linux-kernel@vger.kernel.org, Johan Hovold , Frank Li Subject: [PATCH 06/11] irqchip/imx-mu-msi: Fix section mismatch Date: Mon, 13 Oct 2025 11:46:06 +0200 Message-ID: <20251013094611.11745-7-johan@kernel.org> X-Mailer: git-send-email 2.49.1 In-Reply-To: <20251013094611.11745-1-johan@kernel.org> References: <20251013094611.11745-1-johan@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Platform drivers can be probed after their init sections have been discarded so the irqchip init callbacks must not live in init. Fixes: 70afdab904d2 ("irqchip: Add IMX MU MSI controller driver") Cc: Frank Li Signed-off-by: Johan Hovold --- drivers/irqchip/irq-imx-mu-msi.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/drivers/irqchip/irq-imx-mu-msi.c b/drivers/irqchip/irq-imx-mu-= msi.c index d2a4e8a61a42..d247f77e5477 100644 --- a/drivers/irqchip/irq-imx-mu-msi.c +++ b/drivers/irqchip/irq-imx-mu-msi.c @@ -296,9 +296,9 @@ static const struct imx_mu_dcfg imx_mu_cfg_imx8ulp =3D { }, }; =20 -static int __init imx_mu_of_init(struct device_node *dn, - struct device_node *parent, - const struct imx_mu_dcfg *cfg) +static int imx_mu_of_init(struct device_node *dn, + struct device_node *parent, + const struct imx_mu_dcfg *cfg) { struct platform_device *pdev =3D of_find_device_by_node(dn); struct device_link *pd_link_a; @@ -416,20 +416,17 @@ static const struct dev_pm_ops imx_mu_pm_ops =3D { imx_mu_runtime_resume, NULL) }; =20 -static int __init imx_mu_imx7ulp_of_init(struct device_node *dn, - struct device_node *parent) +static int imx_mu_imx7ulp_of_init(struct device_node *dn, struct device_no= de *parent) { return imx_mu_of_init(dn, parent, &imx_mu_cfg_imx7ulp); } =20 -static int __init imx_mu_imx6sx_of_init(struct device_node *dn, - struct device_node *parent) +static int imx_mu_imx6sx_of_init(struct device_node *dn, struct device_nod= e *parent) { return imx_mu_of_init(dn, parent, &imx_mu_cfg_imx6sx); } =20 -static int __init imx_mu_imx8ulp_of_init(struct device_node *dn, - struct device_node *parent) +static int imx_mu_imx8ulp_of_init(struct device_node *dn, struct device_no= de *parent) { return imx_mu_of_init(dn, parent, &imx_mu_cfg_imx8ulp); } --=20 2.49.1 From nobody Sat Feb 7 23:23:34 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BE98D2FDC5C for ; Mon, 13 Oct 2025 09:48:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760348926; cv=none; b=T5TfsORcSJDm9z79btpFIyYx7/cnD5tqWXvOwYMCybGCnS7Ek2B26VbEVyQVwrMUdNsc8KBE08i9xzN5Rz4QRMMkmj46JYFhdN0IM7X6CINauaBaMqswE3nzi6QbMpMgga++9nOLeLLs7t+lpkPVCHtXRa9gBtjtrECnvC0eq1U= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760348926; c=relaxed/simple; bh=L+ESs2AhjUO1SdY6MDpUNf+HARKrx9Wepwkudze6XHo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=NwmbD7GY7ury69KhebOfSM9oKrgmw1qXCYLTKjeMWA6Phw2jA5j/ZpT2FazNVjAzSh57wVjFzfSDJY0LIcien1TFBe0o++pYrkYI3Ofcmdchl55/qFmIMDchyuz4sFGydE0FxVcAsR4qvn77eJrKeRzkVNpJy+4pd7tKRKCGzWY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=FysI/AQg; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="FysI/AQg" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 91C43C116C6; Mon, 13 Oct 2025 09:48:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1760348926; bh=L+ESs2AhjUO1SdY6MDpUNf+HARKrx9Wepwkudze6XHo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FysI/AQgVWehubwyuMu7rbX7SQF6rhXYqRtRmINAOMTKsjxtAK+7u71a7Qy72Fqug /mAdSANJXVePAke5IkgktjCDJfwhBQKnAo/vjA70fPUH2IAf3LfZRK2iorm0SE3W1B LiycuQGvYBdMDnwTzn6S7GBRWEwTyvq2r8oGHx5j7QUmuNsHXblLpi7MoVa5AlGihU wly6HJEyW0JIg+rR4xj57j/Q9dJeRZt0G9XJ54DS/kyBfUXNgg3sY+URD7+EURg3OO i+L6SecQDQW8hIzqW2YM6s/rsZR98AJROUv/eSySW+q+dCLZlaLL+ye8sjjYdzyIVi Y5pTNgyvZXDvg== Received: from johan by xi.lan with local (Exim 4.98.2) (envelope-from ) id 1v8FAa-0000000036Z-0YUW; Mon, 13 Oct 2025 11:48:44 +0200 From: Johan Hovold To: Thomas Gleixner Cc: Florian Fainelli , Shawn Guo , Sascha Hauer , Fabio Estevam , Claudiu Beznea , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Changhuang Liang , Geert Uytterhoeven , Magnus Damm , linux-kernel@vger.kernel.org, Johan Hovold , Lad Prabhakar Subject: [PATCH 07/11] irqchip/renesas-rzg2l: Fix section mismatch Date: Mon, 13 Oct 2025 11:46:07 +0200 Message-ID: <20251013094611.11745-8-johan@kernel.org> X-Mailer: git-send-email 2.49.1 In-Reply-To: <20251013094611.11745-1-johan@kernel.org> References: <20251013094611.11745-1-johan@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Platform drivers can be probed after their init sections have been discarded so the irqchip init callbacks must not live in init. Fixes: 3fed09559cd8 ("irqchip: Add RZ/G2L IA55 Interrupt Controller driver"= )' Cc: Lad Prabhakar Signed-off-by: Johan Hovold Reviewed-by: Geert Uytterhoeven --- drivers/irqchip/irq-renesas-rzg2l.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/irqchip/irq-renesas-rzg2l.c b/drivers/irqchip/irq-rene= sas-rzg2l.c index 2a54adeb4cc7..12b6eb150301 100644 --- a/drivers/irqchip/irq-renesas-rzg2l.c +++ b/drivers/irqchip/irq-renesas-rzg2l.c @@ -597,14 +597,12 @@ static int rzg2l_irqc_common_init(struct device_node = *node, struct device_node * return 0; } =20 -static int __init rzg2l_irqc_init(struct device_node *node, - struct device_node *parent) +static int rzg2l_irqc_init(struct device_node *node, struct device_node *p= arent) { return rzg2l_irqc_common_init(node, parent, &rzg2l_irqc_chip); } =20 -static int __init rzfive_irqc_init(struct device_node *node, - struct device_node *parent) +static int rzfive_irqc_init(struct device_node *node, struct device_node *= parent) { return rzg2l_irqc_common_init(node, parent, &rzfive_irqc_chip); } --=20 2.49.1 From nobody Sat Feb 7 23:23:34 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 223482FE580 for ; Mon, 13 Oct 2025 09:48:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760348928; cv=none; b=bjg6a0TVJdkc7usYS13JLLRUkavunDkYs8XSUflBIWFsY/+qhtY10xhDrhzAYpYGAuGERf/NtE5kv4jQUK2tOrTBNxuEcHYAhrmZz4MQhmPooEirndabbcXlQ/8B5vdwkQtm4kMs/HHw3A7UDxmxEUs3Pr9NpoNwZ44FiGEZrCM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760348928; c=relaxed/simple; bh=EnQdu+PNxiBN5eUbwu3uRjsQYTdhGawau0XfupVj0pU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=KxhdKKOyiAcehMQXysGd8WaHOKCUc8J0tnMdUrAPC0gr2mmg3urG4R05lJz/dpfk85W2NQiJchU/Q0Pw2S4a2yoAGHfZWDC5qhVzCuhOptyKjOgKamj7ACx8JqYxPc5aGOhuz7R9qu69r2w7GBpOcmgXDaxl9cIEDZKYXPp7qFU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=CA8ZmSqG; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="CA8ZmSqG" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A5763C4AF0B; Mon, 13 Oct 2025 09:48:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1760348926; bh=EnQdu+PNxiBN5eUbwu3uRjsQYTdhGawau0XfupVj0pU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CA8ZmSqGXnEh7RPOGFLfSW3SUIRSM5Q3Sz31jFXegNqZxUKt0IODLOCABl9CAUx8Y m8THDgowcotK9gh3HjKCdF/PLSFofgkE8zttIt3o2F5KNTyhDx6cemWubWBVKRBpbR hYIr6tL3e24eQBpSUJec2tCzHiI+WKHx+zq34PH5kaGNk99jTSfIa2e1Ydt+KtUT0M 8TzVW3xKyl1jXFGS+48Kh54abm8cjxACxfb7xAAZUW0m/t4VCV4Jslz5TeaJNaViC/ EhTSnI56Nfa41uhsWemR2iyP/+kcSUB9xVMOdtawN+gMbYNA8RUJbCWhfEKzdneofE 6JKR/AdiPyFwg== Received: from johan by xi.lan with local (Exim 4.98.2) (envelope-from ) id 1v8FAa-0000000036c-0sug; Mon, 13 Oct 2025 11:48:44 +0200 From: Johan Hovold To: Thomas Gleixner Cc: Florian Fainelli , Shawn Guo , Sascha Hauer , Fabio Estevam , Claudiu Beznea , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Changhuang Liang , Geert Uytterhoeven , Magnus Damm , linux-kernel@vger.kernel.org, Johan Hovold Subject: [PATCH 08/11] irqchip/starfive-jh8100: Fix section mismatch Date: Mon, 13 Oct 2025 11:46:08 +0200 Message-ID: <20251013094611.11745-9-johan@kernel.org> X-Mailer: git-send-email 2.49.1 In-Reply-To: <20251013094611.11745-1-johan@kernel.org> References: <20251013094611.11745-1-johan@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Platform drivers can be probed after their init sections have been discarded so the irqchip init callback must not live in init. Fixes: e4e535036173 ("irqchip: Add StarFive external interrupt controller") Cc: Changhuang Liang Signed-off-by: Johan Hovold --- drivers/irqchip/irq-starfive-jh8100-intc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/irqchip/irq-starfive-jh8100-intc.c b/drivers/irqchip/i= rq-starfive-jh8100-intc.c index 2460798ec158..117f2c651ebd 100644 --- a/drivers/irqchip/irq-starfive-jh8100-intc.c +++ b/drivers/irqchip/irq-starfive-jh8100-intc.c @@ -114,8 +114,7 @@ static void starfive_intc_irq_handler(struct irq_desc *= desc) chained_irq_exit(chip, desc); } =20 -static int __init starfive_intc_init(struct device_node *intc, - struct device_node *parent) +static int starfive_intc_init(struct device_node *intc, struct device_node= *parent) { struct starfive_irq_chip *irqc; struct reset_control *rst; --=20 2.49.1 From nobody Sat Feb 7 23:23:34 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E5A0A2FE058 for ; Mon, 13 Oct 2025 09:48:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760348927; cv=none; b=f+/GUAK95zA99NzynoTZr8gJIftIHIFzw8UTICMdbiMW6VRKXjMz7g7frnT6n1WhnDRir5vk2SOl3NyS1wMlgADWyymiciQ0NKXfrin5ruQmOW1+lpC2BK8Q+LksG3UwpcQjVFrGBbIySxSyskI629cMSgtjKzvQQLtCD+hg1/k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760348927; c=relaxed/simple; bh=76QsU15dX0J7lKUp2UMl55B5U4WcErZ/uNwd28wkIns=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Wz1P6JddWbwmIBEW9ZdbZiEvrJ4mkWfZ6Ux+iVJFTYnHpKNKyquq8fxPNwx2HS4fSPzJi84vN9JGxeSZ8+MlFv4QLxMskyf0ZYbJw5L1fn9xnG0kHWLvMx4qZW6r1hLogfiHw9X4rnSADi4rFYAbkhQnhL8yXTaFUItXihkSOOk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=PRCtgLUa; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="PRCtgLUa" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A29A5C19425; Mon, 13 Oct 2025 09:48:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1760348926; bh=76QsU15dX0J7lKUp2UMl55B5U4WcErZ/uNwd28wkIns=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PRCtgLUaxBgSteC6+oZ0gsCr5lx4dpIZun3RfwLX72B2cXZuMbvrbm329uI93HBzc H5yY1jnTN1WXPsY0zvPIs8JuXqI6bcmU5tYpftPay0JZodDnmmZPDicE4Kz4ek14lL ZgGbKwvpK/jThqCOjJSQdH3Q7caP6Bpq6Do4Wm00sE6jKedX97hE7WWAK5qlD2BFCs ENrzp3Pr85M1BkzL3VjrPGNarBfvjfROwtSddfAAsoO7YCdAoMEqUHMD7yr3qA7/gB V26MoB/cCGBXmEaG6PY3MjnDjrt/rUDdmLHTwE6Ic63g+PYqKlMSmvJDD7AlkxOt7c bmiojrUGOugbQ== Received: from johan by xi.lan with local (Exim 4.98.2) (envelope-from ) id 1v8FAa-0000000036f-1HZx; Mon, 13 Oct 2025 11:48:44 +0200 From: Johan Hovold To: Thomas Gleixner Cc: Florian Fainelli , Shawn Guo , Sascha Hauer , Fabio Estevam , Claudiu Beznea , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Changhuang Liang , Geert Uytterhoeven , Magnus Damm , linux-kernel@vger.kernel.org, Johan Hovold Subject: [PATCH 09/11] irqchip/qcom-irq-combiner: Fix section mismatch Date: Mon, 13 Oct 2025 11:46:09 +0200 Message-ID: <20251013094611.11745-10-johan@kernel.org> X-Mailer: git-send-email 2.49.1 In-Reply-To: <20251013094611.11745-1-johan@kernel.org> References: <20251013094611.11745-1-johan@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Platform drivers can be probed after their init sections have been discarded so the probe callback must not live in init. Fixes: f20cc9b00c7b ("irqchip/qcom: Add IRQ combiner driver") Signed-off-by: Johan Hovold --- drivers/irqchip/qcom-irq-combiner.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/irqchip/qcom-irq-combiner.c b/drivers/irqchip/qcom-irq= -combiner.c index 18e696dc7f4d..9308088773be 100644 --- a/drivers/irqchip/qcom-irq-combiner.c +++ b/drivers/irqchip/qcom-irq-combiner.c @@ -222,7 +222,7 @@ static int get_registers(struct platform_device *pdev, = struct combiner *comb) return 0; } =20 -static int __init combiner_probe(struct platform_device *pdev) +static int combiner_probe(struct platform_device *pdev) { struct combiner *combiner; int nregs; --=20 2.49.1 From nobody Sat Feb 7 23:23:34 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C5C1C2FE047 for ; Mon, 13 Oct 2025 09:48:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760348926; cv=none; b=Z/uFc4+23f4g5Dyysn6NkxWJbem5YDokuGGBPEeO7LAWdvpjWx/LTrCVUhwHrJWzad13gbgQyrz2c/HOQL2wH3j61JAVeDu5aTaRfuW6YMC5/ahCHGemwT/19R9nQO1LtW44HOeDNzliOftoj7W8IPxkN9LhQAjqZ8/Yb4nHvI4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760348926; c=relaxed/simple; bh=LpL8z06eYxg/1F9BJOGNQcja3KLalHkuQrBZOERB5hU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=mUrXlYM2VGuN0JXP5m/SSD2Wt3ak63j8P8HAnwwmGXVYGa6o9oOY0UwahawdFabvq4gLfYn2bRNsQOuEZwK5u90dGf9jGylQWqr+LTjjSOoy6E0ijfXdnam4Q7K4TUtcJ8hajbN6F9V9Y4RhplbPQf0N95roXNLnZApIQ4Bfu80= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=djen3c3B; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="djen3c3B" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A02B2C19424; Mon, 13 Oct 2025 09:48:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1760348926; bh=LpL8z06eYxg/1F9BJOGNQcja3KLalHkuQrBZOERB5hU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=djen3c3BjBlLmYNeEE3vAVKp/5Xpp6tviFa9raVvA5bmJRCdfFF/aQ6PxTRGQWU74 EPsQUfwT60tKatvuq80lM421IQBl+D8D+yjNlXdHceebnLQSvLlc8euvt6fRnArwmy YHAJk2Nui3W0UMVRkfvx4lJimJod8g9CgxTm3yQ0DItZ3dalUrqxG9ILzazAap8noL Hbum54tfmUnYMPKKvbTid8OpokEFghCeM4TuYkq+OQGumPZEvqR3ED5tyOmZtGzGxU xuaKIYqg+/UlpaSqk2czNsbFhrZyVpaVHDfxGGj9wWGt7znDIozLDQU0yVTHANT2YN EKl3G6Jg21oBw== Received: from johan by xi.lan with local (Exim 4.98.2) (envelope-from ) id 1v8FAa-0000000036i-1hSA; Mon, 13 Oct 2025 11:48:44 +0200 From: Johan Hovold To: Thomas Gleixner Cc: Florian Fainelli , Shawn Guo , Sascha Hauer , Fabio Estevam , Claudiu Beznea , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Changhuang Liang , Geert Uytterhoeven , Magnus Damm , linux-kernel@vger.kernel.org, Johan Hovold Subject: [PATCH 10/11] irqchip: Drop leftover brackets Date: Mon, 13 Oct 2025 11:46:10 +0200 Message-ID: <20251013094611.11745-11-johan@kernel.org> X-Mailer: git-send-email 2.49.1 In-Reply-To: <20251013094611.11745-1-johan@kernel.org> References: <20251013094611.11745-1-johan@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Drop some unnecessary brackets in platform_irqchip_probe() mistakenly left by commit 9322d1915f9d ("irqchip: Plug a OF node reference leak in platform_irqchip_probe()"). Signed-off-by: Johan Hovold Reviewed-by: Geert Uytterhoeven --- drivers/irqchip/irqchip.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/irqchip/irqchip.c b/drivers/irqchip/irqchip.c index 0ee7b6b71f5f..652d20d2b07f 100644 --- a/drivers/irqchip/irqchip.c +++ b/drivers/irqchip/irqchip.c @@ -38,9 +38,8 @@ int platform_irqchip_probe(struct platform_device *pdev) struct device_node *par_np __free(device_node) =3D of_irq_find_parent(np); of_irq_init_cb_t irq_init_cb =3D of_device_get_match_data(&pdev->dev); =20 - if (!irq_init_cb) { + if (!irq_init_cb) return -EINVAL; - } =20 if (par_np =3D=3D np) par_np =3D NULL; @@ -53,9 +52,8 @@ int platform_irqchip_probe(struct platform_device *pdev) * interrupt controller. The actual initialization callback of this * interrupt controller can check for specific domains as necessary. */ - if (par_np && !irq_find_matching_host(par_np, DOMAIN_BUS_ANY)) { + if (par_np && !irq_find_matching_host(par_np, DOMAIN_BUS_ANY)) return -EPROBE_DEFER; - } =20 return irq_init_cb(np, par_np); } --=20 2.49.1 From nobody Sat Feb 7 23:23:34 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3C2B62FE06C for ; Mon, 13 Oct 2025 09:48:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760348927; cv=none; b=XsUl9MjAqILNcmnuELCkDtSbpa6w6JUQFJUVjI6wo1mr8DtSBQDDTHF5yNrW19QTat1cMclzD3cRhEWb+XLwoJswxdbSvn+bSj6MljQon+29+B3h+YPxRx/FL1IBeg15vJa3W2O7+wsMKG49VmpyfsHZ/yIpy/zaQ+DlpZgQOhI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760348927; c=relaxed/simple; bh=o1ZBRe04qCznx5vGi8J/gWWXoRKEi3IAlB8Qhb0gwzY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=njyLhnGe4wxbKtuvomGVbNGcmCPV6BvrRBgf0e+hucm7wYA4z9zzdWE5d4Yl0KOkT5e6PVGvGUFe0xssaKxYGZIO0EC9PygS4Lu8ahuDLSiao+140tbRPCz+E4gbxzMqe/zpYlkCDwxlJL3TLHloOVnHpS5BGa7ifLEl4Z+Riwo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=lZJbeI3k; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="lZJbeI3k" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BE631C4AF09; Mon, 13 Oct 2025 09:48:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1760348927; bh=o1ZBRe04qCznx5vGi8J/gWWXoRKEi3IAlB8Qhb0gwzY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lZJbeI3kQvnUFiLYKuqJNScfLu0/hijdXQHQmw/3WxI+mHdi8+uJGGbwvMueSBORD DUjV0+F4FJ7uXIsS/DFq1K69ZFjdAsf7pnnP3PaodbTq7nOesTXZDcla+RwVltHAlH hCN6y7IXohtjJXgB3JW0e7QQh5eXIRxL7TLRpgqzVHh7p3xvszERln2suU1z3wURPc iWwKt45DVtarX8pgMB3oV/oBeG+n8hacdUpIygGVJf5metQqnui8vnnCOuwu/RQ5Pd g0j6EbOn8ePwgTT/j/vbPgggmSHA0m0BLrQeOQbyq5LBxp5ew6wAY8XHqlNOi/eNwa BUmBZcyJYqn+g== Received: from johan by xi.lan with local (Exim 4.98.2) (envelope-from ) id 1v8FAa-0000000036l-22RX; Mon, 13 Oct 2025 11:48:44 +0200 From: Johan Hovold To: Thomas Gleixner Cc: Florian Fainelli , Shawn Guo , Sascha Hauer , Fabio Estevam , Claudiu Beznea , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Changhuang Liang , Geert Uytterhoeven , Magnus Damm , linux-kernel@vger.kernel.org, Johan Hovold Subject: [PATCH 11/11] irqchip: Pass platform device to platform drivers Date: Mon, 13 Oct 2025 11:46:11 +0200 Message-ID: <20251013094611.11745-12-johan@kernel.org> X-Mailer: git-send-email 2.49.1 In-Reply-To: <20251013094611.11745-1-johan@kernel.org> References: <20251013094611.11745-1-johan@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The IRQCHIP_PLATFORM_DRIVER macros can be used to convert OF irqchip drivers to platform drivers but currently reuse the OF init callback prototype that only takes OF nodes as arguments. This forces drivers to do reverse lookups of their struct devices during probe if they need them for things like dev_printk() and device managed resources. Half of the drivers doing reverse lookups also currently fail to release the additional reference taken during the lookup, while other drivers have had the reference leak plugged in various ways (e.g. using non-intuitive cleanup constructs which still confuse static checkers). Switch to using a probe callback that takes a platform device as its first argument to simplify drivers and plug the remaining (mostly benign) reference leaks. Fixes: 32c6c054661a ("irqchip: Add Broadcom BCM2712 MSI-X interrupt control= ler") Fixes: 70afdab904d2 ("irqchip: Add IMX MU MSI controller driver") Fixes: a6199bb514d8 ("irqchip: Add Qualcomm MPM controller driver") Signed-off-by: Johan Hovold Reviewed-by: Florian Fainelli --- drivers/irqchip/irq-bcm2712-mip.c | 10 ++----- drivers/irqchip/irq-bcm7038-l1.c | 5 ++-- drivers/irqchip/irq-bcm7120-l2.c | 20 ++++--------- drivers/irqchip/irq-brcmstb-l2.c | 21 ++++++------- drivers/irqchip/irq-imx-mu-msi.c | 25 +++++++--------- drivers/irqchip/irq-mchp-eic.c | 5 ++-- drivers/irqchip/irq-meson-gpio.c | 5 ++-- drivers/irqchip/irq-qcom-mpm.c | 6 ++-- drivers/irqchip/irq-renesas-rzg2l.c | 35 +++++++--------------- drivers/irqchip/irq-renesas-rzv2h.c | 32 ++++++-------------- drivers/irqchip/irq-starfive-jh8100-intc.c | 5 ++-- drivers/irqchip/irqchip.c | 6 ++-- drivers/irqchip/qcom-pdc.c | 5 ++-- include/linux/irqchip.h | 8 ++++- 14 files changed, 78 insertions(+), 110 deletions(-) diff --git a/drivers/irqchip/irq-bcm2712-mip.c b/drivers/irqchip/irq-bcm271= 2-mip.c index 8466646e5a2d..4761974ad650 100644 --- a/drivers/irqchip/irq-bcm2712-mip.c +++ b/drivers/irqchip/irq-bcm2712-mip.c @@ -232,16 +232,12 @@ static int mip_parse_dt(struct mip_priv *mip, struct = device_node *np) return ret; } =20 -static int mip_of_msi_init(struct device_node *node, struct device_node *p= arent) +static int mip_msi_probe(struct platform_device *pdev, struct device_node = *parent) { - struct platform_device *pdev; + struct device_node *node =3D pdev->dev.of_node; struct mip_priv *mip; int ret; =20 - pdev =3D of_find_device_by_node(node); - if (!pdev) - return -EPROBE_DEFER; - mip =3D kzalloc(sizeof(*mip), GFP_KERNEL); if (!mip) return -ENOMEM; @@ -284,7 +280,7 @@ static int mip_of_msi_init(struct device_node *node, st= ruct device_node *parent) } =20 IRQCHIP_PLATFORM_DRIVER_BEGIN(mip_msi) -IRQCHIP_MATCH("brcm,bcm2712-mip", mip_of_msi_init) +IRQCHIP_MATCH("brcm,bcm2712-mip", mip_msi_probe) IRQCHIP_PLATFORM_DRIVER_END(mip_msi) MODULE_DESCRIPTION("Broadcom BCM2712 MSI-X interrupt controller"); MODULE_AUTHOR("Phil Elwell "); diff --git a/drivers/irqchip/irq-bcm7038-l1.c b/drivers/irqchip/irq-bcm7038= -l1.c index e28be83872cb..f9f725499dc3 100644 --- a/drivers/irqchip/irq-bcm7038-l1.c +++ b/drivers/irqchip/irq-bcm7038-l1.c @@ -395,8 +395,9 @@ static const struct irq_domain_ops bcm7038_l1_domain_op= s =3D { .map =3D bcm7038_l1_map, }; =20 -static int bcm7038_l1_of_init(struct device_node *dn, struct device_node *= parent) +static int bcm7038_l1_probe(struct platform_device *pdev, struct device_no= de *parent) { + struct device_node *dn =3D pdev->dev.of_node; struct bcm7038_l1_chip *intc; int idx, ret; =20 @@ -454,7 +455,7 @@ static int bcm7038_l1_of_init(struct device_node *dn, s= truct device_node *parent } =20 IRQCHIP_PLATFORM_DRIVER_BEGIN(bcm7038_l1) -IRQCHIP_MATCH("brcm,bcm7038-l1-intc", bcm7038_l1_of_init) +IRQCHIP_MATCH("brcm,bcm7038-l1-intc", bcm7038_l1_probe) IRQCHIP_PLATFORM_DRIVER_END(bcm7038_l1) MODULE_DESCRIPTION("Broadcom STB 7038-style L1/L2 interrupt controller"); MODULE_LICENSE("GPL v2"); diff --git a/drivers/irqchip/irq-bcm7120-l2.c b/drivers/irqchip/irq-bcm7120= -l2.c index 63ff68d33787..5e87999de811 100644 --- a/drivers/irqchip/irq-bcm7120-l2.c +++ b/drivers/irqchip/irq-bcm7120-l2.c @@ -206,15 +206,15 @@ static int bcm7120_l2_intc_iomap_3380(struct device_n= ode *dn, struct bcm7120_l2_ return 0; } =20 -static int bcm7120_l2_intc_probe(struct device_node *dn, +static int bcm7120_l2_intc_probe(struct platform_device *pdev, struct device_node *parent, int (*iomap_regs_fn)(struct device_node *, struct bcm7120_l2_intc_data *), const char *intc_name) { unsigned int clr =3D IRQ_NOREQUEST | IRQ_NOPROBE | IRQ_NOAUTOEN; + struct device_node *dn =3D pdev->dev.of_node; struct bcm7120_l2_intc_data *data; - struct platform_device *pdev; struct irq_chip_generic *gc; struct irq_chip_type *ct; int ret =3D 0; @@ -225,14 +225,7 @@ static int bcm7120_l2_intc_probe(struct device_node *d= n, if (!data) return -ENOMEM; =20 - pdev =3D of_find_device_by_node(dn); - if (!pdev) { - ret =3D -ENODEV; - goto out_free_data; - } - data->num_parent_irqs =3D platform_irq_count(pdev); - put_device(&pdev->dev); if (data->num_parent_irqs <=3D 0) { pr_err("invalid number of parent interrupts\n"); ret =3D -ENOMEM; @@ -332,20 +325,19 @@ static int bcm7120_l2_intc_probe(struct device_node *= dn, if (data->map_base[idx]) iounmap(data->map_base[idx]); } -out_free_data: kfree(data); return ret; } =20 -static int bcm7120_l2_intc_probe_7120(struct device_node *dn, struct devic= e_node *parent) +static int bcm7120_l2_intc_probe_7120(struct platform_device *pdev, struct= device_node *parent) { - return bcm7120_l2_intc_probe(dn, parent, bcm7120_l2_intc_iomap_7120, + return bcm7120_l2_intc_probe(pdev, parent, bcm7120_l2_intc_iomap_7120, "BCM7120 L2"); } =20 -static int bcm7120_l2_intc_probe_3380(struct device_node *dn, struct devic= e_node *parent) +static int bcm7120_l2_intc_probe_3380(struct platform_device *pdev, struct= device_node *parent) { - return bcm7120_l2_intc_probe(dn, parent, bcm7120_l2_intc_iomap_3380, + return bcm7120_l2_intc_probe(pdev, parent, bcm7120_l2_intc_iomap_3380, "BCM3380 L2"); } =20 diff --git a/drivers/irqchip/irq-brcmstb-l2.c b/drivers/irqchip/irq-brcmstb= -l2.c index 53e67c6c01f7..bb7078d6524f 100644 --- a/drivers/irqchip/irq-brcmstb-l2.c +++ b/drivers/irqchip/irq-brcmstb-l2.c @@ -138,11 +138,12 @@ static void brcmstb_l2_intc_resume(struct irq_data *d) irq_reg_writel(gc, ~b->saved_mask, ct->regs.enable); } =20 -static int brcmstb_l2_intc_of_init(struct device_node *np, struct device_n= ode *parent, - const struct brcmstb_intc_init_params *init_params) +static int brcmstb_l2_intc_probe(struct platform_device *pdev, struct devi= ce_node *parent, + const struct brcmstb_intc_init_params *init_params) { unsigned int clr =3D IRQ_NOREQUEST | IRQ_NOPROBE | IRQ_NOAUTOEN; unsigned int set =3D 0; + struct device_node *np =3D pdev->dev.of_node; struct brcmstb_l2_intc_data *data; struct irq_chip_type *ct; int ret; @@ -255,21 +256,21 @@ static int brcmstb_l2_intc_of_init(struct device_node= *np, struct device_node *p return ret; } =20 -static int brcmstb_l2_edge_intc_of_init(struct device_node *np, struct dev= ice_node *parent) +static int brcmstb_l2_edge_intc_probe(struct platform_device *pdev, struct= device_node *parent) { - return brcmstb_l2_intc_of_init(np, parent, &l2_edge_intc_init); + return brcmstb_l2_intc_probe(pdev, parent, &l2_edge_intc_init); } =20 -static int brcmstb_l2_lvl_intc_of_init(struct device_node *np, struct devi= ce_node *parent) +static int brcmstb_l2_lvl_intc_probe(struct platform_device *pdev, struct = device_node *parent) { - return brcmstb_l2_intc_of_init(np, parent, &l2_lvl_intc_init); + return brcmstb_l2_intc_probe(pdev, parent, &l2_lvl_intc_init); } =20 IRQCHIP_PLATFORM_DRIVER_BEGIN(brcmstb_l2) -IRQCHIP_MATCH("brcm,l2-intc", brcmstb_l2_edge_intc_of_init) -IRQCHIP_MATCH("brcm,hif-spi-l2-intc", brcmstb_l2_edge_intc_of_init) -IRQCHIP_MATCH("brcm,upg-aux-aon-l2-intc", brcmstb_l2_edge_intc_of_init) -IRQCHIP_MATCH("brcm,bcm7271-l2-intc", brcmstb_l2_lvl_intc_of_init) +IRQCHIP_MATCH("brcm,l2-intc", brcmstb_l2_edge_intc_probe) +IRQCHIP_MATCH("brcm,hif-spi-l2-intc", brcmstb_l2_edge_intc_probe) +IRQCHIP_MATCH("brcm,upg-aux-aon-l2-intc", brcmstb_l2_edge_intc_probe) +IRQCHIP_MATCH("brcm,bcm7271-l2-intc", brcmstb_l2_lvl_intc_probe) IRQCHIP_PLATFORM_DRIVER_END(brcmstb_l2) MODULE_DESCRIPTION("Broadcom STB generic L2 interrupt controller"); MODULE_LICENSE("GPL v2"); diff --git a/drivers/irqchip/irq-imx-mu-msi.c b/drivers/irqchip/irq-imx-mu-= msi.c index d247f77e5477..c598f2f52fc6 100644 --- a/drivers/irqchip/irq-imx-mu-msi.c +++ b/drivers/irqchip/irq-imx-mu-msi.c @@ -296,11 +296,9 @@ static const struct imx_mu_dcfg imx_mu_cfg_imx8ulp =3D= { }, }; =20 -static int imx_mu_of_init(struct device_node *dn, - struct device_node *parent, - const struct imx_mu_dcfg *cfg) +static int imx_mu_probe(struct platform_device *pdev, struct device_node *= parent, + const struct imx_mu_dcfg *cfg) { - struct platform_device *pdev =3D of_find_device_by_node(dn); struct device_link *pd_link_a; struct device_link *pd_link_b; struct imx_mu_msi *msi_data; @@ -416,28 +414,27 @@ static const struct dev_pm_ops imx_mu_pm_ops =3D { imx_mu_runtime_resume, NULL) }; =20 -static int imx_mu_imx7ulp_of_init(struct device_node *dn, struct device_no= de *parent) +static int imx_mu_imx7ulp_probe(struct platform_device *pdev, struct devic= e_node *parent) { - return imx_mu_of_init(dn, parent, &imx_mu_cfg_imx7ulp); + return imx_mu_probe(pdev, parent, &imx_mu_cfg_imx7ulp); } =20 -static int imx_mu_imx6sx_of_init(struct device_node *dn, struct device_nod= e *parent) +static int imx_mu_imx6sx_probe(struct platform_device *pdev, struct device= _node *parent) { - return imx_mu_of_init(dn, parent, &imx_mu_cfg_imx6sx); + return imx_mu_probe(pdev, parent, &imx_mu_cfg_imx6sx); } =20 -static int imx_mu_imx8ulp_of_init(struct device_node *dn, struct device_no= de *parent) +static int imx_mu_imx8ulp_probe(struct platform_device *pdev, struct devic= e_node *parent) { - return imx_mu_of_init(dn, parent, &imx_mu_cfg_imx8ulp); + return imx_mu_probe(pdev, parent, &imx_mu_cfg_imx8ulp); } =20 IRQCHIP_PLATFORM_DRIVER_BEGIN(imx_mu_msi) -IRQCHIP_MATCH("fsl,imx7ulp-mu-msi", imx_mu_imx7ulp_of_init) -IRQCHIP_MATCH("fsl,imx6sx-mu-msi", imx_mu_imx6sx_of_init) -IRQCHIP_MATCH("fsl,imx8ulp-mu-msi", imx_mu_imx8ulp_of_init) +IRQCHIP_MATCH("fsl,imx7ulp-mu-msi", imx_mu_imx7ulp_probe) +IRQCHIP_MATCH("fsl,imx6sx-mu-msi", imx_mu_imx6sx_probe) +IRQCHIP_MATCH("fsl,imx8ulp-mu-msi", imx_mu_imx8ulp_probe) IRQCHIP_PLATFORM_DRIVER_END(imx_mu_msi, .pm =3D &imx_mu_pm_ops) =20 - MODULE_AUTHOR("Frank Li "); MODULE_DESCRIPTION("Freescale MU MSI controller driver"); MODULE_LICENSE("GPL"); diff --git a/drivers/irqchip/irq-mchp-eic.c b/drivers/irqchip/irq-mchp-eic.c index 516a3a0e359c..b513a899c085 100644 --- a/drivers/irqchip/irq-mchp-eic.c +++ b/drivers/irqchip/irq-mchp-eic.c @@ -199,8 +199,9 @@ static const struct irq_domain_ops mchp_eic_domain_ops = =3D { .free =3D irq_domain_free_irqs_common, }; =20 -static int mchp_eic_init(struct device_node *node, struct device_node *par= ent) +static int mchp_eic_probe(struct platform_device *pdev, struct device_node= *parent) { + struct device_node *node =3D pdev->dev.of_node; struct irq_domain *parent_domain =3D NULL; int ret, i; =20 @@ -273,7 +274,7 @@ static int mchp_eic_init(struct device_node *node, stru= ct device_node *parent) } =20 IRQCHIP_PLATFORM_DRIVER_BEGIN(mchp_eic) -IRQCHIP_MATCH("microchip,sama7g5-eic", mchp_eic_init) +IRQCHIP_MATCH("microchip,sama7g5-eic", mchp_eic_probe) IRQCHIP_PLATFORM_DRIVER_END(mchp_eic) =20 MODULE_DESCRIPTION("Microchip External Interrupt Controller"); diff --git a/drivers/irqchip/irq-meson-gpio.c b/drivers/irqchip/irq-meson-g= pio.c index 8e84724e8d28..6c5e2ff0d1cf 100644 --- a/drivers/irqchip/irq-meson-gpio.c +++ b/drivers/irqchip/irq-meson-gpio.c @@ -572,8 +572,9 @@ static int meson_gpio_irq_parse_dt(struct device_node *= node, struct meson_gpio_i return 0; } =20 -static int meson_gpio_irq_of_init(struct device_node *node, struct device_= node *parent) +static int meson_gpio_irq_probe(struct platform_device *pdev, struct devic= e_node *parent) { + struct device_node *node =3D pdev->dev.of_node; struct irq_domain *domain, *parent_domain; struct meson_gpio_irq_controller *ctl; int ret; @@ -630,7 +631,7 @@ static int meson_gpio_irq_of_init(struct device_node *n= ode, struct device_node * } =20 IRQCHIP_PLATFORM_DRIVER_BEGIN(meson_gpio_intc) -IRQCHIP_MATCH("amlogic,meson-gpio-intc", meson_gpio_irq_of_init) +IRQCHIP_MATCH("amlogic,meson-gpio-intc", meson_gpio_irq_probe) IRQCHIP_PLATFORM_DRIVER_END(meson_gpio_intc) =20 MODULE_AUTHOR("Jerome Brunet "); diff --git a/drivers/irqchip/irq-qcom-mpm.c b/drivers/irqchip/irq-qcom-mpm.c index 8d569f7c5a7a..83f31ea657b7 100644 --- a/drivers/irqchip/irq-qcom-mpm.c +++ b/drivers/irqchip/irq-qcom-mpm.c @@ -320,9 +320,9 @@ static bool gic_hwirq_is_mapped(struct mpm_gic_map *map= s, int cnt, u32 hwirq) return false; } =20 -static int qcom_mpm_init(struct device_node *np, struct device_node *paren= t) +static int qcom_mpm_probe(struct platform_device *pdev, struct device_node= *parent) { - struct platform_device *pdev =3D of_find_device_by_node(np); + struct device_node *np =3D pdev->dev.of_node; struct device *dev =3D &pdev->dev; struct irq_domain *parent_domain; struct generic_pm_domain *genpd; @@ -478,7 +478,7 @@ static int qcom_mpm_init(struct device_node *np, struct= device_node *parent) } =20 IRQCHIP_PLATFORM_DRIVER_BEGIN(qcom_mpm) -IRQCHIP_MATCH("qcom,mpm", qcom_mpm_init) +IRQCHIP_MATCH("qcom,mpm", qcom_mpm_probe) IRQCHIP_PLATFORM_DRIVER_END(qcom_mpm) MODULE_DESCRIPTION("Qualcomm Technologies, Inc. MSM Power Manager"); MODULE_LICENSE("GPL v2"); diff --git a/drivers/irqchip/irq-renesas-rzg2l.c b/drivers/irqchip/irq-rene= sas-rzg2l.c index 12b6eb150301..1bf19deb02c4 100644 --- a/drivers/irqchip/irq-renesas-rzg2l.c +++ b/drivers/irqchip/irq-renesas-rzg2l.c @@ -8,7 +8,6 @@ */ =20 #include -#include #include #include #include @@ -528,18 +527,15 @@ static int rzg2l_irqc_parse_interrupts(struct rzg2l_i= rqc_priv *priv, return 0; } =20 -static int rzg2l_irqc_common_init(struct device_node *node, struct device_= node *parent, - const struct irq_chip *irq_chip) +static int rzg2l_irqc_common_probe(struct platform_device *pdev, struct de= vice_node *parent, + const struct irq_chip *irq_chip) { - struct platform_device *pdev =3D of_find_device_by_node(node); - struct device *dev __free(put_device) =3D pdev ? &pdev->dev : NULL; struct irq_domain *irq_domain, *parent_domain; + struct device_node *node =3D pdev->dev.of_node; + struct device *dev =3D &pdev->dev; struct reset_control *resetn; int ret; =20 - if (!pdev) - return -ENODEV; - parent_domain =3D irq_find_host(parent); if (!parent_domain) return dev_err_probe(dev, -ENODEV, "cannot find parent domain\n"); @@ -583,33 +579,22 @@ static int rzg2l_irqc_common_init(struct device_node = *node, struct device_node * =20 register_syscore_ops(&rzg2l_irqc_syscore_ops); =20 - /* - * Prevent the cleanup function from invoking put_device by assigning - * NULL to dev. - * - * make coccicheck will complain about missing put_device calls, but - * those are false positives, as dev will be automatically "put" via - * __free_put_device on the failing path. - * On the successful path we don't actually want to "put" dev. - */ - dev =3D NULL; - return 0; } =20 -static int rzg2l_irqc_init(struct device_node *node, struct device_node *p= arent) +static int rzg2l_irqc_probe(struct platform_device *pdev, struct device_no= de *parent) { - return rzg2l_irqc_common_init(node, parent, &rzg2l_irqc_chip); + return rzg2l_irqc_common_probe(pdev, parent, &rzg2l_irqc_chip); } =20 -static int rzfive_irqc_init(struct device_node *node, struct device_node *= parent) +static int rzfive_irqc_probe(struct platform_device *pdev, struct device_n= ode *parent) { - return rzg2l_irqc_common_init(node, parent, &rzfive_irqc_chip); + return rzg2l_irqc_common_probe(pdev, parent, &rzfive_irqc_chip); } =20 IRQCHIP_PLATFORM_DRIVER_BEGIN(rzg2l_irqc) -IRQCHIP_MATCH("renesas,rzg2l-irqc", rzg2l_irqc_init) -IRQCHIP_MATCH("renesas,r9a07g043f-irqc", rzfive_irqc_init) +IRQCHIP_MATCH("renesas,rzg2l-irqc", rzg2l_irqc_probe) +IRQCHIP_MATCH("renesas,r9a07g043f-irqc", rzfive_irqc_probe) IRQCHIP_PLATFORM_DRIVER_END(rzg2l_irqc) MODULE_AUTHOR("Lad Prabhakar "); MODULE_DESCRIPTION("Renesas RZ/G2L IRQC Driver"); diff --git a/drivers/irqchip/irq-renesas-rzv2h.c b/drivers/irqchip/irq-rene= sas-rzv2h.c index 9018d9c3911e..899a423b5da8 100644 --- a/drivers/irqchip/irq-renesas-rzv2h.c +++ b/drivers/irqchip/irq-renesas-rzv2h.c @@ -490,29 +490,15 @@ static int rzv2h_icu_parse_interrupts(struct rzv2h_ic= u_priv *priv, struct device return 0; } =20 -static void rzv2h_icu_put_device(void *data) -{ - put_device(data); -} - -static int rzv2h_icu_init_common(struct device_node *node, struct device_n= ode *parent, - const struct rzv2h_hw_info *hw_info) +static int rzv2h_icu_probe_common(struct platform_device *pdev, struct dev= ice_node *parent, + const struct rzv2h_hw_info *hw_info) { struct irq_domain *irq_domain, *parent_domain; + struct device_node *node =3D pdev->dev.of_node; struct rzv2h_icu_priv *rzv2h_icu_data; - struct platform_device *pdev; struct reset_control *resetn; int ret; =20 - pdev =3D of_find_device_by_node(node); - if (!pdev) - return -ENODEV; - - ret =3D devm_add_action_or_reset(&pdev->dev, rzv2h_icu_put_device, - &pdev->dev); - if (ret < 0) - return ret; - parent_domain =3D irq_find_host(parent); if (!parent_domain) { dev_err(&pdev->dev, "cannot find parent domain\n"); @@ -618,19 +604,19 @@ static const struct rzv2h_hw_info rzv2h_hw_params =3D= { .field_width =3D 8, }; =20 -static int rzg3e_icu_init(struct device_node *node, struct device_node *pa= rent) +static int rzg3e_icu_probe(struct platform_device *pdev, struct device_nod= e *parent) { - return rzv2h_icu_init_common(node, parent, &rzg3e_hw_params); + return rzv2h_icu_probe_common(pdev, parent, &rzg3e_hw_params); } =20 -static int rzv2h_icu_init(struct device_node *node, struct device_node *pa= rent) +static int rzv2h_icu_probe(struct platform_device *pdev, struct device_nod= e *parent) { - return rzv2h_icu_init_common(node, parent, &rzv2h_hw_params); + return rzv2h_icu_probe_common(pdev, parent, &rzv2h_hw_params); } =20 IRQCHIP_PLATFORM_DRIVER_BEGIN(rzv2h_icu) -IRQCHIP_MATCH("renesas,r9a09g047-icu", rzg3e_icu_init) -IRQCHIP_MATCH("renesas,r9a09g057-icu", rzv2h_icu_init) +IRQCHIP_MATCH("renesas,r9a09g047-icu", rzg3e_icu_probe) +IRQCHIP_MATCH("renesas,r9a09g057-icu", rzv2h_icu_probe) IRQCHIP_PLATFORM_DRIVER_END(rzv2h_icu) MODULE_AUTHOR("Fabrizio Castro "); MODULE_DESCRIPTION("Renesas RZ/V2H(P) ICU Driver"); diff --git a/drivers/irqchip/irq-starfive-jh8100-intc.c b/drivers/irqchip/i= rq-starfive-jh8100-intc.c index 117f2c651ebd..705361b4ebe0 100644 --- a/drivers/irqchip/irq-starfive-jh8100-intc.c +++ b/drivers/irqchip/irq-starfive-jh8100-intc.c @@ -114,8 +114,9 @@ static void starfive_intc_irq_handler(struct irq_desc *= desc) chained_irq_exit(chip, desc); } =20 -static int starfive_intc_init(struct device_node *intc, struct device_node= *parent) +static int starfive_intc_probe(struct platform_device *pdev, struct device= _node *parent) { + struct device_node *intc =3D pdev->dev.of_node; struct starfive_irq_chip *irqc; struct reset_control *rst; struct clk *clk; @@ -198,7 +199,7 @@ static int starfive_intc_init(struct device_node *intc,= struct device_node *pare } =20 IRQCHIP_PLATFORM_DRIVER_BEGIN(starfive_intc) -IRQCHIP_MATCH("starfive,jh8100-intc", starfive_intc_init) +IRQCHIP_MATCH("starfive,jh8100-intc", starfive_intc_probe) IRQCHIP_PLATFORM_DRIVER_END(starfive_intc) =20 MODULE_DESCRIPTION("StarFive JH8100 External Interrupt Controller"); diff --git a/drivers/irqchip/irqchip.c b/drivers/irqchip/irqchip.c index 652d20d2b07f..689c8e448901 100644 --- a/drivers/irqchip/irqchip.c +++ b/drivers/irqchip/irqchip.c @@ -36,9 +36,9 @@ int platform_irqchip_probe(struct platform_device *pdev) { struct device_node *np =3D pdev->dev.of_node; struct device_node *par_np __free(device_node) =3D of_irq_find_parent(np); - of_irq_init_cb_t irq_init_cb =3D of_device_get_match_data(&pdev->dev); + platform_irq_probe_t irq_probe =3D of_device_get_match_data(&pdev->dev); =20 - if (!irq_init_cb) + if (!irq_probe) return -EINVAL; =20 if (par_np =3D=3D np) @@ -55,6 +55,6 @@ int platform_irqchip_probe(struct platform_device *pdev) if (par_np && !irq_find_matching_host(par_np, DOMAIN_BUS_ANY)) return -EPROBE_DEFER; =20 - return irq_init_cb(np, par_np); + return irq_probe(pdev, par_np); } EXPORT_SYMBOL_GPL(platform_irqchip_probe); diff --git a/drivers/irqchip/qcom-pdc.c b/drivers/irqchip/qcom-pdc.c index b0cdcdb7c505..d94beb786a67 100644 --- a/drivers/irqchip/qcom-pdc.c +++ b/drivers/irqchip/qcom-pdc.c @@ -469,10 +469,11 @@ static const struct of_device_id pdc_aux_gpio_matches= [] =3D { { } }; =20 -static int qcom_pdc_init(struct device_node *node, struct device_node *par= ent) +static int qcom_pdc_probe(struct platform_device *pdev, struct device_node= *parent) { unsigned int flags =3D IRQ_DOMAIN_FLAG_QCOM_PDC_WAKEUP; struct irq_domain *parent_domain, *pdc_domain; + struct device_node *node =3D pdev->dev.of_node; resource_size_t res_size; struct resource res; int ret; @@ -558,7 +559,7 @@ static int qcom_pdc_init(struct device_node *node, stru= ct device_node *parent) } =20 IRQCHIP_PLATFORM_DRIVER_BEGIN(qcom_pdc) -IRQCHIP_MATCH("qcom,pdc", qcom_pdc_init) +IRQCHIP_MATCH("qcom,pdc", qcom_pdc_probe) IRQCHIP_PLATFORM_DRIVER_END(qcom_pdc) MODULE_DESCRIPTION("Qualcomm Technologies, Inc. Power Domain Controller"); MODULE_LICENSE("GPL v2"); diff --git a/include/linux/irqchip.h b/include/linux/irqchip.h index d5e6024cb2a8..bc4ddacd6ddc 100644 --- a/include/linux/irqchip.h +++ b/include/linux/irqchip.h @@ -17,12 +17,18 @@ #include #include =20 +typedef int (*platform_irq_probe_t)(struct platform_device *, struct devic= e_node *); + /* Undefined on purpose */ extern of_irq_init_cb_t typecheck_irq_init_cb; +extern platform_irq_probe_t typecheck_irq_probe; =20 #define typecheck_irq_init_cb(fn) \ (__typecheck(typecheck_irq_init_cb, &fn) ? fn : fn) =20 +#define typecheck_irq_probe(fn) \ + (__typecheck(typecheck_irq_probe, &fn) ? fn : fn) + /* * This macro must be used by the different irqchip drivers to declare * the association between their DT compatible string and their @@ -42,7 +48,7 @@ extern int platform_irqchip_probe(struct platform_device = *pdev); static const struct of_device_id drv_name##_irqchip_match_table[] =3D { =20 #define IRQCHIP_MATCH(compat, fn) { .compatible =3D compat, \ - .data =3D typecheck_irq_init_cb(fn), }, + .data =3D typecheck_irq_probe(fn), }, =20 =20 #define IRQCHIP_PLATFORM_DRIVER_END(drv_name, ...) \ --=20 2.49.1