linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] perf/arm-ccn: Use platform_get_irq() to get the interrupt
@ 2021-12-24 16:13 Lad Prabhakar
  2021-12-24 16:13 ` [PATCH] platform: goldfish: pipe: " Lad Prabhakar
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Lad Prabhakar @ 2021-12-24 16:13 UTC (permalink / raw)
  To: linux-kernel, Will Deacon, Mark Rutland
  Cc: Rob Herring, Prabhakar, Lad Prabhakar, linux-arm-kernel

platform_get_resource(pdev, IORESOURCE_IRQ, ..) relies on static
allocation of IRQ resources in DT core code, this causes an issue
when using hierarchical interrupt domains using "interrupts" property
in the node as this bypasses the hierarchical setup and messes up the
irq chaining.

In preparation for removal of static setup of IRQ resource from DT core
code use platform_get_irq().

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
Hi,

Dropping usage of platform_get_resource() was agreed based on
the discussion [0].

[0] https://patchwork.kernel.org/project/linux-renesas-soc/
patch/20211209001056.29774-1-prabhakar.mahadev-lad.rj@bp.renesas.com/

Cheers,
Prabhakar
---
 drivers/perf/arm-ccn.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/perf/arm-ccn.c b/drivers/perf/arm-ccn.c
index a96c31604545..40b352e8aa7f 100644
--- a/drivers/perf/arm-ccn.c
+++ b/drivers/perf/arm-ccn.c
@@ -1460,8 +1460,7 @@ static irqreturn_t arm_ccn_irq_handler(int irq, void *dev_id)
 static int arm_ccn_probe(struct platform_device *pdev)
 {
 	struct arm_ccn *ccn;
-	struct resource *res;
-	unsigned int irq;
+	int irq;
 	int err;
 
 	ccn = devm_kzalloc(&pdev->dev, sizeof(*ccn), GFP_KERNEL);
@@ -1474,10 +1473,9 @@ static int arm_ccn_probe(struct platform_device *pdev)
 	if (IS_ERR(ccn->base))
 		return PTR_ERR(ccn->base);
 
-	res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
-	if (!res)
-		return -EINVAL;
-	irq = res->start;
+	irq = platform_get_irq(pdev, 0);
+	if (irq < 0)
+		return irq;
 
 	/* Check if we can use the interrupt */
 	writel(CCN_MN_ERRINT_STATUS__PMU_EVENTS__DISABLE,
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2022-03-11 19:39 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-24 16:13 [PATCH] perf/arm-ccn: Use platform_get_irq() to get the interrupt Lad Prabhakar
2021-12-24 16:13 ` [PATCH] platform: goldfish: pipe: " Lad Prabhakar
2022-03-09 12:09   ` Lad, Prabhakar
2022-03-09 12:23     ` Greg Kroah-Hartman
2021-12-24 16:13 ` [PATCH] slimbus: qcom-ngd-ctrl: " Lad Prabhakar
2021-12-24 18:08   ` Bjorn Andersson
2021-12-25 17:40   ` Steev Klimaszewski
2022-03-10  1:48   ` Lad, Prabhakar
2022-03-10 10:16   ` Srinivas Kandagatla
2022-03-10 10:23     ` Lad, Prabhakar
2022-03-10 10:42       ` Srinivas Kandagatla
2022-03-10 14:14         ` Rob Herring
2022-03-10 14:59           ` Srinivas Kandagatla
2022-03-11 19:38             ` Lad, Prabhakar
2021-12-24 16:13 ` [PATCH] staging: axis-fifo: " Lad Prabhakar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).