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

* [PATCH] platform: goldfish: pipe: Use platform_get_irq() to get the interrupt
  2021-12-24 16:13 [PATCH] perf/arm-ccn: Use platform_get_irq() to get the interrupt Lad Prabhakar
@ 2021-12-24 16:13 ` Lad Prabhakar
  2022-03-09 12:09   ` Lad, Prabhakar
  2021-12-24 16:13 ` [PATCH] slimbus: qcom-ngd-ctrl: " Lad Prabhakar
  2021-12-24 16:13 ` [PATCH] staging: axis-fifo: " Lad Prabhakar
  2 siblings, 1 reply; 15+ messages in thread
From: Lad Prabhakar @ 2021-12-24 16:13 UTC (permalink / raw)
  To: linux-kernel; +Cc: Rob Herring, Prabhakar, Lad Prabhakar

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/platform/goldfish/goldfish_pipe.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/platform/goldfish/goldfish_pipe.c b/drivers/platform/goldfish/goldfish_pipe.c
index b67539f9848c..7737d56191d7 100644
--- a/drivers/platform/goldfish/goldfish_pipe.c
+++ b/drivers/platform/goldfish/goldfish_pipe.c
@@ -896,11 +896,9 @@ static int goldfish_pipe_probe(struct platform_device *pdev)
 		return -EINVAL;
 	}
 
-	r = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
-	if (!r)
-		return -EINVAL;
-
-	dev->irq = r->start;
+	dev->irq = platform_get_irq(pdev, 0);
+	if (dev->irq < 0)
+		return dev->irq;
 
 	/*
 	 * Exchange the versions with the host device
-- 
2.17.1


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

* [PATCH] slimbus: qcom-ngd-ctrl: Use platform_get_irq() to get the interrupt
  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
@ 2021-12-24 16:13 ` Lad Prabhakar
  2021-12-24 18:08   ` Bjorn Andersson
                     ` (3 more replies)
  2021-12-24 16:13 ` [PATCH] staging: axis-fifo: " Lad Prabhakar
  2 siblings, 4 replies; 15+ messages in thread
From: Lad Prabhakar @ 2021-12-24 16:13 UTC (permalink / raw)
  To: linux-kernel, Andy Gross, Bjorn Andersson, Srinivas Kandagatla
  Cc: Rob Herring, Prabhakar, Lad Prabhakar, linux-arm-msm, alsa-devel

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/slimbus/qcom-ngd-ctrl.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/slimbus/qcom-ngd-ctrl.c b/drivers/slimbus/qcom-ngd-ctrl.c
index 7040293c2ee8..0f29a08b4c09 100644
--- a/drivers/slimbus/qcom-ngd-ctrl.c
+++ b/drivers/slimbus/qcom-ngd-ctrl.c
@@ -1526,13 +1526,11 @@ static int qcom_slim_ngd_ctrl_probe(struct platform_device *pdev)
 	if (IS_ERR(ctrl->base))
 		return PTR_ERR(ctrl->base);
 
-	res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
-	if (!res) {
-		dev_err(&pdev->dev, "no slimbus IRQ resource\n");
-		return -ENODEV;
-	}
+	ret = platform_get_irq(pdev, 0);
+	if (ret < 0)
+		return ret;
 
-	ret = devm_request_irq(dev, res->start, qcom_slim_ngd_interrupt,
+	ret = devm_request_irq(dev, ret, qcom_slim_ngd_interrupt,
 			       IRQF_TRIGGER_HIGH, "slim-ngd", ctrl);
 	if (ret) {
 		dev_err(&pdev->dev, "request IRQ failed\n");
-- 
2.17.1


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

* [PATCH] staging: axis-fifo: Use platform_get_irq() to get the interrupt
  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
  2021-12-24 16:13 ` [PATCH] slimbus: qcom-ngd-ctrl: " Lad Prabhakar
@ 2021-12-24 16:13 ` Lad Prabhakar
  2 siblings, 0 replies; 15+ messages in thread
From: Lad Prabhakar @ 2021-12-24 16:13 UTC (permalink / raw)
  To: linux-kernel, Greg Kroah-Hartman
  Cc: Rob Herring, Prabhakar, Lad Prabhakar, linux-staging

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/staging/axis-fifo/axis-fifo.c | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/axis-fifo/axis-fifo.c b/drivers/staging/axis-fifo/axis-fifo.c
index 632f140dddbc..dfd2b357f484 100644
--- a/drivers/staging/axis-fifo/axis-fifo.c
+++ b/drivers/staging/axis-fifo/axis-fifo.c
@@ -809,7 +809,6 @@ static int axis_fifo_parse_dt(struct axis_fifo *fifo)
 
 static int axis_fifo_probe(struct platform_device *pdev)
 {
-	struct resource *r_irq; /* interrupt resources */
 	struct resource *r_mem; /* IO mem resources */
 	struct device *dev = &pdev->dev; /* OS device (from device tree) */
 	struct axis_fifo *fifo = NULL;
@@ -882,16 +881,12 @@ static int axis_fifo_probe(struct platform_device *pdev)
 	 */
 
 	/* get IRQ resource */
-	r_irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
-	if (!r_irq) {
-		dev_err(fifo->dt_device, "no IRQ found for 0x%pa\n",
-			&r_mem->start);
-		rc = -EIO;
+	rc = platform_get_irq(pdev, 0);
+	if (rc < 0)
 		goto err_initial;
-	}
 
 	/* request IRQ */
-	fifo->irq = r_irq->start;
+	fifo->irq = rc;
 	rc = devm_request_irq(fifo->dt_device, fifo->irq, &axis_fifo_irq, 0,
 			      DRIVER_NAME, fifo);
 	if (rc) {
-- 
2.17.1


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

* Re: [PATCH] slimbus: qcom-ngd-ctrl: Use platform_get_irq() to get the interrupt
  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
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 15+ messages in thread
From: Bjorn Andersson @ 2021-12-24 18:08 UTC (permalink / raw)
  To: Lad Prabhakar
  Cc: linux-kernel, Andy Gross, Srinivas Kandagatla, Rob Herring,
	Prabhakar, linux-arm-msm, alsa-devel

On Fri 24 Dec 08:13 PST 2021, Lad Prabhakar wrote:

> 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().
> 

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>

Regards,
Bjorn

> 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/slimbus/qcom-ngd-ctrl.c | 10 ++++------
>  1 file changed, 4 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/slimbus/qcom-ngd-ctrl.c b/drivers/slimbus/qcom-ngd-ctrl.c
> index 7040293c2ee8..0f29a08b4c09 100644
> --- a/drivers/slimbus/qcom-ngd-ctrl.c
> +++ b/drivers/slimbus/qcom-ngd-ctrl.c
> @@ -1526,13 +1526,11 @@ static int qcom_slim_ngd_ctrl_probe(struct platform_device *pdev)
>  	if (IS_ERR(ctrl->base))
>  		return PTR_ERR(ctrl->base);
>  
> -	res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
> -	if (!res) {
> -		dev_err(&pdev->dev, "no slimbus IRQ resource\n");
> -		return -ENODEV;
> -	}
> +	ret = platform_get_irq(pdev, 0);
> +	if (ret < 0)
> +		return ret;
>  
> -	ret = devm_request_irq(dev, res->start, qcom_slim_ngd_interrupt,
> +	ret = devm_request_irq(dev, ret, qcom_slim_ngd_interrupt,
>  			       IRQF_TRIGGER_HIGH, "slim-ngd", ctrl);
>  	if (ret) {
>  		dev_err(&pdev->dev, "request IRQ failed\n");
> -- 
> 2.17.1
> 

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

* Re: [PATCH] slimbus: qcom-ngd-ctrl: Use platform_get_irq() to get the interrupt
  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
  3 siblings, 0 replies; 15+ messages in thread
From: Steev Klimaszewski @ 2021-12-25 17:40 UTC (permalink / raw)
  To: Lad Prabhakar, linux-kernel, Andy Gross, Bjorn Andersson,
	Srinivas Kandagatla
  Cc: Rob Herring, Prabhakar, linux-arm-msm, alsa-devel


On 12/24/21 10:13 AM, Lad Prabhakar wrote:
> 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/slimbus/qcom-ngd-ctrl.c | 10 ++++------
>   1 file changed, 4 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/slimbus/qcom-ngd-ctrl.c b/drivers/slimbus/qcom-ngd-ctrl.c
> index 7040293c2ee8..0f29a08b4c09 100644
> --- a/drivers/slimbus/qcom-ngd-ctrl.c
> +++ b/drivers/slimbus/qcom-ngd-ctrl.c
> @@ -1526,13 +1526,11 @@ static int qcom_slim_ngd_ctrl_probe(struct platform_device *pdev)
>   	if (IS_ERR(ctrl->base))
>   		return PTR_ERR(ctrl->base);
>   
> -	res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
> -	if (!res) {
> -		dev_err(&pdev->dev, "no slimbus IRQ resource\n");
> -		return -ENODEV;
> -	}
> +	ret = platform_get_irq(pdev, 0);
> +	if (ret < 0)
> +		return ret;
>   
> -	ret = devm_request_irq(dev, res->start, qcom_slim_ngd_interrupt,
> +	ret = devm_request_irq(dev, ret, qcom_slim_ngd_interrupt,
>   			       IRQF_TRIGGER_HIGH, "slim-ngd", ctrl);
>   	if (ret) {
>   		dev_err(&pdev->dev, "request IRQ failed\n");

Tested on Lenovo Yoga C630

Tested-By: Steev Klimaszewski <steev@kali.org>


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

* Re: [PATCH] platform: goldfish: pipe: Use platform_get_irq() to get the interrupt
  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
  0 siblings, 1 reply; 15+ messages in thread
From: Lad, Prabhakar @ 2022-03-09 12:09 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: Lad Prabhakar, LKML, Rob Herring

Hi Greg,

I'm not sure how I missed you to add in the to list.

On Fri, Dec 24, 2021 at 4:13 PM Lad Prabhakar
<prabhakar.mahadev-lad.rj@bp.renesas.com> wrote:
>
> 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/platform/goldfish/goldfish_pipe.c | 8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)
>
Do you want me to resend this patch?

Cheers,
Prabhakar

> diff --git a/drivers/platform/goldfish/goldfish_pipe.c b/drivers/platform/goldfish/goldfish_pipe.c
> index b67539f9848c..7737d56191d7 100644
> --- a/drivers/platform/goldfish/goldfish_pipe.c
> +++ b/drivers/platform/goldfish/goldfish_pipe.c
> @@ -896,11 +896,9 @@ static int goldfish_pipe_probe(struct platform_device *pdev)
>                 return -EINVAL;
>         }
>
> -       r = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
> -       if (!r)
> -               return -EINVAL;
> -
> -       dev->irq = r->start;
> +       dev->irq = platform_get_irq(pdev, 0);
> +       if (dev->irq < 0)
> +               return dev->irq;
>
>         /*
>          * Exchange the versions with the host device
> --
> 2.17.1
>

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

* Re: [PATCH] platform: goldfish: pipe: Use platform_get_irq() to get the interrupt
  2022-03-09 12:09   ` Lad, Prabhakar
@ 2022-03-09 12:23     ` Greg Kroah-Hartman
  0 siblings, 0 replies; 15+ messages in thread
From: Greg Kroah-Hartman @ 2022-03-09 12:23 UTC (permalink / raw)
  To: Lad, Prabhakar; +Cc: Lad Prabhakar, LKML, Rob Herring

On Wed, Mar 09, 2022 at 12:09:45PM +0000, Lad, Prabhakar wrote:
> Hi Greg,
> 
> I'm not sure how I missed you to add in the to list.
> 
> On Fri, Dec 24, 2021 at 4:13 PM Lad Prabhakar
> <prabhakar.mahadev-lad.rj@bp.renesas.com> wrote:
> >
> > 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/platform/goldfish/goldfish_pipe.c | 8 +++-----
> >  1 file changed, 3 insertions(+), 5 deletions(-)
> >
> Do you want me to resend this patch?

If you want me to apply it, yes.

thanks,

greg k-h

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

* Re: [PATCH] slimbus: qcom-ngd-ctrl: Use platform_get_irq() to get the interrupt
  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
  3 siblings, 0 replies; 15+ messages in thread
From: Lad, Prabhakar @ 2022-03-10  1:48 UTC (permalink / raw)
  To: Srinivas Kandagatla
  Cc: Lad Prabhakar, LKML, Andy Gross, Bjorn Andersson, Rob Herring,
	linux-arm-msm, alsa-devel

Hi Srinivas,

On Fri, Dec 24, 2021 at 4:13 PM Lad Prabhakar
<prabhakar.mahadev-lad.rj@bp.renesas.com> wrote:
>
> 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/slimbus/qcom-ngd-ctrl.c | 10 ++++------
>  1 file changed, 4 insertions(+), 6 deletions(-)
>
This patch is not in -next yet. When do you plan to merge this patch?

Cheers,
Prabhakar

> diff --git a/drivers/slimbus/qcom-ngd-ctrl.c b/drivers/slimbus/qcom-ngd-ctrl.c
> index 7040293c2ee8..0f29a08b4c09 100644
> --- a/drivers/slimbus/qcom-ngd-ctrl.c
> +++ b/drivers/slimbus/qcom-ngd-ctrl.c
> @@ -1526,13 +1526,11 @@ static int qcom_slim_ngd_ctrl_probe(struct platform_device *pdev)
>         if (IS_ERR(ctrl->base))
>                 return PTR_ERR(ctrl->base);
>
> -       res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
> -       if (!res) {
> -               dev_err(&pdev->dev, "no slimbus IRQ resource\n");
> -               return -ENODEV;
> -       }
> +       ret = platform_get_irq(pdev, 0);
> +       if (ret < 0)
> +               return ret;
>
> -       ret = devm_request_irq(dev, res->start, qcom_slim_ngd_interrupt,
> +       ret = devm_request_irq(dev, ret, qcom_slim_ngd_interrupt,
>                                IRQF_TRIGGER_HIGH, "slim-ngd", ctrl);
>         if (ret) {
>                 dev_err(&pdev->dev, "request IRQ failed\n");
> --
> 2.17.1
>

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

* Re: [PATCH] slimbus: qcom-ngd-ctrl: Use platform_get_irq() to get the interrupt
  2021-12-24 16:13 ` [PATCH] slimbus: qcom-ngd-ctrl: " Lad Prabhakar
                     ` (2 preceding siblings ...)
  2022-03-10  1:48   ` Lad, Prabhakar
@ 2022-03-10 10:16   ` Srinivas Kandagatla
  2022-03-10 10:23     ` Lad, Prabhakar
  3 siblings, 1 reply; 15+ messages in thread
From: Srinivas Kandagatla @ 2022-03-10 10:16 UTC (permalink / raw)
  To: Lad Prabhakar, linux-kernel, Andy Gross, Bjorn Andersson
  Cc: Rob Herring, Prabhakar, linux-arm-msm, alsa-devel



On 24/12/2021 16:13, Lad Prabhakar wrote:
> platform_get_resource(pdev, IORESOURCE_IRQ, ..) relies on static
> allocation of IRQ resources in DT core code, this causes an issue

Are you saying that we should not be using platform_get_resource(pdev, 
IORESOURCE_IRQ, ...) on drivers that support DT?

> when using hierarchical interrupt domains using "interrupts" property
> in the node as this bypasses the hierarchical setup and messes up the
> irq chaining.

Should this not be fixed in the DT core itself?

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

I would prefer this patch to be part of the series that removes IRQ 
resource handling from DT core.


--srini

> 
> 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/slimbus/qcom-ngd-ctrl.c | 10 ++++------
>   1 file changed, 4 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/slimbus/qcom-ngd-ctrl.c b/drivers/slimbus/qcom-ngd-ctrl.c
> index 7040293c2ee8..0f29a08b4c09 100644
> --- a/drivers/slimbus/qcom-ngd-ctrl.c
> +++ b/drivers/slimbus/qcom-ngd-ctrl.c
> @@ -1526,13 +1526,11 @@ static int qcom_slim_ngd_ctrl_probe(struct platform_device *pdev)
>   	if (IS_ERR(ctrl->base))
>   		return PTR_ERR(ctrl->base);
>   
> -	res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
> -	if (!res) {
> -		dev_err(&pdev->dev, "no slimbus IRQ resource\n");
> -		return -ENODEV;
> -	}
> +	ret = platform_get_irq(pdev, 0);
> +	if (ret < 0)
> +		return ret;
>   
> -	ret = devm_request_irq(dev, res->start, qcom_slim_ngd_interrupt,
> +	ret = devm_request_irq(dev, ret, qcom_slim_ngd_interrupt,
>   			       IRQF_TRIGGER_HIGH, "slim-ngd", ctrl);
>   	if (ret) {
>   		dev_err(&pdev->dev, "request IRQ failed\n");

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

* Re: [PATCH] slimbus: qcom-ngd-ctrl: Use platform_get_irq() to get the interrupt
  2022-03-10 10:16   ` Srinivas Kandagatla
@ 2022-03-10 10:23     ` Lad, Prabhakar
  2022-03-10 10:42       ` Srinivas Kandagatla
  0 siblings, 1 reply; 15+ messages in thread
From: Lad, Prabhakar @ 2022-03-10 10:23 UTC (permalink / raw)
  To: Srinivas Kandagatla
  Cc: Lad Prabhakar, LKML, Andy Gross, Bjorn Andersson, Rob Herring,
	linux-arm-msm, alsa-devel

On Thu, Mar 10, 2022 at 10:16 AM Srinivas Kandagatla
<srinivas.kandagatla@linaro.org> wrote:
>
>
>
> On 24/12/2021 16:13, Lad Prabhakar wrote:
> > platform_get_resource(pdev, IORESOURCE_IRQ, ..) relies on static
> > allocation of IRQ resources in DT core code, this causes an issue
>
> Are you saying that we should not be using platform_get_resource(pdev,
> IORESOURCE_IRQ, ...) on drivers that support DT?
>
> > when using hierarchical interrupt domains using "interrupts" property
> > in the node as this bypasses the hierarchical setup and messes up the
> > irq chaining.
>
> Should this not be fixed in the DT core itself?
>
Yes the plan is to fix in the DT core itself (refer [0]).

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

> >
> > In preparation for removal of static setup of IRQ resource from DT core
> > code use platform_get_irq().
>
> I would prefer this patch to be part of the series that removes IRQ
> resource handling from DT core.
>
Since there are too many users (which are in different subsystems)
getting this all in single series would be a pain. As a result it is
split up into individual subsystems.

Cheers,
Prabhakar

>
> --srini
>
> >
> > 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/slimbus/qcom-ngd-ctrl.c | 10 ++++------
> >   1 file changed, 4 insertions(+), 6 deletions(-)
> >
> > diff --git a/drivers/slimbus/qcom-ngd-ctrl.c b/drivers/slimbus/qcom-ngd-ctrl.c
> > index 7040293c2ee8..0f29a08b4c09 100644
> > --- a/drivers/slimbus/qcom-ngd-ctrl.c
> > +++ b/drivers/slimbus/qcom-ngd-ctrl.c
> > @@ -1526,13 +1526,11 @@ static int qcom_slim_ngd_ctrl_probe(struct platform_device *pdev)
> >       if (IS_ERR(ctrl->base))
> >               return PTR_ERR(ctrl->base);
> >
> > -     res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
> > -     if (!res) {
> > -             dev_err(&pdev->dev, "no slimbus IRQ resource\n");
> > -             return -ENODEV;
> > -     }
> > +     ret = platform_get_irq(pdev, 0);
> > +     if (ret < 0)
> > +             return ret;
> >
> > -     ret = devm_request_irq(dev, res->start, qcom_slim_ngd_interrupt,
> > +     ret = devm_request_irq(dev, ret, qcom_slim_ngd_interrupt,
> >                              IRQF_TRIGGER_HIGH, "slim-ngd", ctrl);
> >       if (ret) {
> >               dev_err(&pdev->dev, "request IRQ failed\n");

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

* Re: [PATCH] slimbus: qcom-ngd-ctrl: Use platform_get_irq() to get the interrupt
  2022-03-10 10:23     ` Lad, Prabhakar
@ 2022-03-10 10:42       ` Srinivas Kandagatla
  2022-03-10 14:14         ` Rob Herring
  0 siblings, 1 reply; 15+ messages in thread
From: Srinivas Kandagatla @ 2022-03-10 10:42 UTC (permalink / raw)
  To: Lad, Prabhakar
  Cc: Lad Prabhakar, LKML, Andy Gross, Bjorn Andersson, Rob Herring,
	linux-arm-msm, alsa-devel



On 10/03/2022 10:23, Lad, Prabhakar wrote:
> On Thu, Mar 10, 2022 at 10:16 AM Srinivas Kandagatla
> <srinivas.kandagatla@linaro.org> wrote:
>>
>>
>>
>> On 24/12/2021 16:13, Lad Prabhakar wrote:
>>> platform_get_resource(pdev, IORESOURCE_IRQ, ..) relies on static
>>> allocation of IRQ resources in DT core code, this causes an issue
>>
>> Are you saying that we should not be using platform_get_resource(pdev,
>> IORESOURCE_IRQ, ...) on drivers that support DT?
>>
>>> when using hierarchical interrupt domains using "interrupts" property
>>> in the node as this bypasses the hierarchical setup and messes up the
>>> irq chaining.
>>
>> Should this not be fixed in the DT core itself?
>>
> Yes the plan is to fix in the DT core itself (refer [0]).
> 
> [0] https://patchwork.kernel.org/project/linux-renesas-soc/patch/20211209001056.29774-1-prabhakar.mahadev-lad.rj@bp.renesas.com/
> 
>>>
>>> In preparation for removal of static setup of IRQ resource from DT core
>>> code use platform_get_irq().
>>
>> I would prefer this patch to be part of the series that removes IRQ
>> resource handling from DT core.
>>
> Since there are too many users (which are in different subsystems)
> getting this all in single series would be a pain. As a result it is
> split up into individual subsystems.
Am happy for this to be included in that series,
TBH, this patch make more sense along with that series than by itself.

This would also give better insight of what exactly is changing in 
platform_get_resource() w.r.t handling IRQ resources.


--srini

> 
> Cheers,
> Prabhakar
> 
>>
>> --srini
>>
>>>
>>> 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/slimbus/qcom-ngd-ctrl.c | 10 ++++------
>>>    1 file changed, 4 insertions(+), 6 deletions(-)
>>>
>>> diff --git a/drivers/slimbus/qcom-ngd-ctrl.c b/drivers/slimbus/qcom-ngd-ctrl.c
>>> index 7040293c2ee8..0f29a08b4c09 100644
>>> --- a/drivers/slimbus/qcom-ngd-ctrl.c
>>> +++ b/drivers/slimbus/qcom-ngd-ctrl.c
>>> @@ -1526,13 +1526,11 @@ static int qcom_slim_ngd_ctrl_probe(struct platform_device *pdev)
>>>        if (IS_ERR(ctrl->base))
>>>                return PTR_ERR(ctrl->base);
>>>
>>> -     res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
>>> -     if (!res) {
>>> -             dev_err(&pdev->dev, "no slimbus IRQ resource\n");
>>> -             return -ENODEV;
>>> -     }
>>> +     ret = platform_get_irq(pdev, 0);
>>> +     if (ret < 0)
>>> +             return ret;
>>>
>>> -     ret = devm_request_irq(dev, res->start, qcom_slim_ngd_interrupt,
>>> +     ret = devm_request_irq(dev, ret, qcom_slim_ngd_interrupt,
>>>                               IRQF_TRIGGER_HIGH, "slim-ngd", ctrl);
>>>        if (ret) {
>>>                dev_err(&pdev->dev, "request IRQ failed\n");

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

* Re: [PATCH] slimbus: qcom-ngd-ctrl: Use platform_get_irq() to get the interrupt
  2022-03-10 10:42       ` Srinivas Kandagatla
@ 2022-03-10 14:14         ` Rob Herring
  2022-03-10 14:59           ` Srinivas Kandagatla
  0 siblings, 1 reply; 15+ messages in thread
From: Rob Herring @ 2022-03-10 14:14 UTC (permalink / raw)
  To: Srinivas Kandagatla
  Cc: Lad, Prabhakar, Lad Prabhakar, LKML, Andy Gross, Bjorn Andersson,
	linux-arm-msm, alsa-devel

On Thu, Mar 10, 2022 at 4:42 AM Srinivas Kandagatla
<srinivas.kandagatla@linaro.org> wrote:
>
>
>
> On 10/03/2022 10:23, Lad, Prabhakar wrote:
> > On Thu, Mar 10, 2022 at 10:16 AM Srinivas Kandagatla
> > <srinivas.kandagatla@linaro.org> wrote:
> >>
> >>
> >>
> >> On 24/12/2021 16:13, Lad Prabhakar wrote:
> >>> platform_get_resource(pdev, IORESOURCE_IRQ, ..) relies on static
> >>> allocation of IRQ resources in DT core code, this causes an issue
> >>
> >> Are you saying that we should not be using platform_get_resource(pdev,
> >> IORESOURCE_IRQ, ...) on drivers that support DT?

We should be using platform_get_irq(). (period, on all platform drivers)

> >>> when using hierarchical interrupt domains using "interrupts" property
> >>> in the node as this bypasses the hierarchical setup and messes up the
> >>> irq chaining.
> >>
> >> Should this not be fixed in the DT core itself?
> >>
> > Yes the plan is to fix in the DT core itself (refer [0]).
> >
> > [0] https://patchwork.kernel.org/project/linux-renesas-soc/patch/20211209001056.29774-1-prabhakar.mahadev-lad.rj@bp.renesas.com/
> >
> >>>
> >>> In preparation for removal of static setup of IRQ resource from DT core
> >>> code use platform_get_irq().
> >>
> >> I would prefer this patch to be part of the series that removes IRQ
> >> resource handling from DT core.
> >>
> > Since there are too many users (which are in different subsystems)
> > getting this all in single series would be a pain. As a result it is
> > split up into individual subsystems.
> Am happy for this to be included in that series,
> TBH, this patch make more sense along with that series than by itself.

No it doesn't. This is no different than converting to devm_* variants
or other cleanups to match current preferred styles.

Treewide cross subsystem clean-ups are a huge pain to merge. Why would
you ask for that when it is clearly not necessary?

Rob

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

* Re: [PATCH] slimbus: qcom-ngd-ctrl: Use platform_get_irq() to get the interrupt
  2022-03-10 14:14         ` Rob Herring
@ 2022-03-10 14:59           ` Srinivas Kandagatla
  2022-03-11 19:38             ` Lad, Prabhakar
  0 siblings, 1 reply; 15+ messages in thread
From: Srinivas Kandagatla @ 2022-03-10 14:59 UTC (permalink / raw)
  To: Rob Herring
  Cc: Lad, Prabhakar, Lad Prabhakar, LKML, Andy Gross, Bjorn Andersson,
	linux-arm-msm, alsa-devel



On 10/03/2022 14:14, Rob Herring wrote:
> On Thu, Mar 10, 2022 at 4:42 AM Srinivas Kandagatla
> <srinivas.kandagatla@linaro.org> wrote:
>>
>>
>>
>> On 10/03/2022 10:23, Lad, Prabhakar wrote:
>>> On Thu, Mar 10, 2022 at 10:16 AM Srinivas Kandagatla
>>> <srinivas.kandagatla@linaro.org> wrote:
>>>>
>>>>
>>>>
>>>> On 24/12/2021 16:13, Lad Prabhakar wrote:
>>>>> platform_get_resource(pdev, IORESOURCE_IRQ, ..) relies on static
>>>>> allocation of IRQ resources in DT core code, this causes an issue
>>>>
>>>> Are you saying that we should not be using platform_get_resource(pdev,
>>>> IORESOURCE_IRQ, ...) on drivers that support DT?
> 
> We should be using platform_get_irq(). (period, on all platform drivers)
> 

Thanks, I see why is it preferred.

Code as of now will not prevent drivers from calling 
platform_get_resource(..IORESOURCE_IRQ).

Are we planning to enforce this in any way?

>>>>> when using hierarchical interrupt domains using "interrupts" property
>>>>> in the node as this bypasses the hierarchical setup and messes up the
>>>>> irq chaining.
>>>>
>>>> Should this not be fixed in the DT core itself?
>>>>
>>> Yes the plan is to fix in the DT core itself (refer [0]).
>>>
>>> [0] https://patchwork.kernel.org/project/linux-renesas-soc/patch/20211209001056.29774-1-prabhakar.mahadev-lad.rj@bp.renesas.com/
>>>
>>>>>
>>>>> In preparation for removal of static setup of IRQ resource from DT core
>>>>> code use platform_get_irq().
>>>>
>>>> I would prefer this patch to be part of the series that removes IRQ
>>>> resource handling from DT core.
>>>>
>>> Since there are too many users (which are in different subsystems)
>>> getting this all in single series would be a pain. As a result it is
>>> split up into individual subsystems.
>> Am happy for this to be included in that series,
>> TBH, this patch make more sense along with that series than by itself.
> 
> No it doesn't. This is no different than converting to devm_* variants
> or other cleanups to match current preferred styles.
> 
> Treewide cross subsystem clean-ups are a huge pain to merge. Why would
> you ask for that when it is clearly not necessary?

Only reason for this ask was to understand how platform_get_resource() 
will change moving forward, if this is something that you are planning 
to include in your fix patches.

I can go ahead and apply the patch, if that helps.

--srini
> 
> Rob

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

* Re: [PATCH] slimbus: qcom-ngd-ctrl: Use platform_get_irq() to get the interrupt
  2022-03-10 14:59           ` Srinivas Kandagatla
@ 2022-03-11 19:38             ` Lad, Prabhakar
  0 siblings, 0 replies; 15+ messages in thread
From: Lad, Prabhakar @ 2022-03-11 19:38 UTC (permalink / raw)
  To: Srinivas Kandagatla
  Cc: Rob Herring, Lad Prabhakar, LKML, Andy Gross, Bjorn Andersson,
	linux-arm-msm, alsa-devel

On Thu, Mar 10, 2022 at 2:59 PM Srinivas Kandagatla
<srinivas.kandagatla@linaro.org> wrote:
>
>
>
> On 10/03/2022 14:14, Rob Herring wrote:
> > On Thu, Mar 10, 2022 at 4:42 AM Srinivas Kandagatla
> > <srinivas.kandagatla@linaro.org> wrote:
> >>
> >>
> >>
> >> On 10/03/2022 10:23, Lad, Prabhakar wrote:
> >>> On Thu, Mar 10, 2022 at 10:16 AM Srinivas Kandagatla
> >>> <srinivas.kandagatla@linaro.org> wrote:
> >>>>
> >>>>
> >>>>
> >>>> On 24/12/2021 16:13, Lad Prabhakar wrote:
> >>>>> platform_get_resource(pdev, IORESOURCE_IRQ, ..) relies on static
> >>>>> allocation of IRQ resources in DT core code, this causes an issue
> >>>>
> >>>> Are you saying that we should not be using platform_get_resource(pdev,
> >>>> IORESOURCE_IRQ, ...) on drivers that support DT?
> >
> > We should be using platform_get_irq(). (period, on all platform drivers)
> >
>
> Thanks, I see why is it preferred.
>
> Code as of now will not prevent drivers from calling
> platform_get_resource(..IORESOURCE_IRQ).
>
> Are we planning to enforce this in any way?
>
> >>>>> when using hierarchical interrupt domains using "interrupts" property
> >>>>> in the node as this bypasses the hierarchical setup and messes up the
> >>>>> irq chaining.
> >>>>
> >>>> Should this not be fixed in the DT core itself?
> >>>>
> >>> Yes the plan is to fix in the DT core itself (refer [0]).
> >>>
> >>> [0] https://patchwork.kernel.org/project/linux-renesas-soc/patch/20211209001056.29774-1-prabhakar.mahadev-lad.rj@bp.renesas.com/
> >>>
> >>>>>
> >>>>> In preparation for removal of static setup of IRQ resource from DT core
> >>>>> code use platform_get_irq().
> >>>>
> >>>> I would prefer this patch to be part of the series that removes IRQ
> >>>> resource handling from DT core.
> >>>>
> >>> Since there are too many users (which are in different subsystems)
> >>> getting this all in single series would be a pain. As a result it is
> >>> split up into individual subsystems.
> >> Am happy for this to be included in that series,
> >> TBH, this patch make more sense along with that series than by itself.
> >
> > No it doesn't. This is no different than converting to devm_* variants
> > or other cleanups to match current preferred styles.
> >
> > Treewide cross subsystem clean-ups are a huge pain to merge. Why would
> > you ask for that when it is clearly not necessary?
>
> Only reason for this ask was to understand how platform_get_resource()
> will change moving forward, if this is something that you are planning
> to include in your fix patches.
>
> I can go ahead and apply the patch, if that helps.
>
Yes please, that would be helpful.

Cheers,
Prabhakar

^ permalink raw reply	[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).