linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] irqchip: omap-intc: fix legacy DMA regression
       [not found] <20150106123830.GD30544@fuloong-minipc.musicnaut.iki.fi>
@ 2015-01-06 16:51 ` Felipe Balbi
  2015-01-06 17:48   ` Aaro Koskinen
                     ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Felipe Balbi @ 2015-01-06 16:51 UTC (permalink / raw)
  To: linux-arm-kernel

commit 55601c9f2467 (arm: omap: intc: switch over
to linear irq domain) introduced a regression with
SDMA legacy driver because that driver strictly depends
on INTC's IRQs starting at NR_IRQs. Aparently
irq_domain_add_linear() won't guarantee that, since we see
a 7 IRQs difference when booting with and without the
commit cited above.

Until arch/arm/plat-omap/dma.c is properly fixed, we
must maintain OMAP2/3 using irq_domain_add_legacy().

A FIXME note was added so people know to delete that
code once that legacy DMA driver is fixed up.

Fixes: 55601c9f2467 (arm: omap: intc: switch over to linear irq domain)
Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 drivers/irqchip/irq-omap-intc.c | 26 +++++++++++++++++++++-----
 1 file changed, 21 insertions(+), 5 deletions(-)

diff --git a/drivers/irqchip/irq-omap-intc.c b/drivers/irqchip/irq-omap-intc.c
index 3c970259c0eb..6ef88f56cf8d 100644
--- a/drivers/irqchip/irq-omap-intc.c
+++ b/drivers/irqchip/irq-omap-intc.c
@@ -263,7 +263,7 @@ static int __init omap_init_irq_of(struct device_node *node)
 	return ret;
 }
 
-static int __init omap_init_irq_legacy(u32 base)
+static int __init omap_init_irq_legacy(u32 base, struct device_node *node)
 {
 	int j, irq_base;
 
@@ -277,7 +277,7 @@ static int __init omap_init_irq_legacy(u32 base)
 		irq_base = 0;
 	}
 
-	domain = irq_domain_add_legacy(NULL, omap_nr_irqs, irq_base, 0,
+	domain = irq_domain_add_legacy(node, omap_nr_irqs, irq_base, 0,
 			&irq_domain_simple_ops, NULL);
 
 	omap_irq_soft_reset();
@@ -301,10 +301,26 @@ static int __init omap_init_irq(u32 base, struct device_node *node)
 {
 	int ret;
 
-	if (node)
+	/*
+	 * FIXME legacy OMAP DMA driver sitting under arch/arm/plat-omap/dma.c
+	 * depends is still not ready for linear IRQ domains; because of that
+	 * we need to temporarily "blacklist" OMAP2 and OMAP3 devices from using
+	 * linear IRQ Domain until that driver is finally fixed.
+	 */
+	if (of_device_is_compatible(node, "ti,omap2-intc") ||
+			of_device_is_compatible(node, "ti,omap3-intc")) {
+		struct resource res;
+
+		if (of_address_to_resource(node, 0, &res))
+			return -ENOMEM;
+
+		base = res.start;
+		ret = omap_init_irq_legacy(base, node);
+	} else if (node) {
 		ret = omap_init_irq_of(node);
-	else
-		ret = omap_init_irq_legacy(base);
+	} else {
+		ret = omap_init_irq_legacy(base, NULL);
+	}
 
 	if (ret == 0)
 		omap_irq_enable_protection();
-- 
2.2.0

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

* [PATCH] irqchip: omap-intc: fix legacy DMA regression
  2015-01-06 16:51 ` [PATCH] irqchip: omap-intc: fix legacy DMA regression Felipe Balbi
@ 2015-01-06 17:48   ` Aaro Koskinen
  2015-01-06 17:52     ` Tony Lindgren
  2015-01-06 18:05   ` Russell King - ARM Linux
                     ` (2 subsequent siblings)
  3 siblings, 1 reply; 10+ messages in thread
From: Aaro Koskinen @ 2015-01-06 17:48 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jan 06, 2015 at 10:51:33AM -0600, Felipe Balbi wrote:
> commit 55601c9f2467 (arm: omap: intc: switch over
> to linear irq domain) introduced a regression with
> SDMA legacy driver because that driver strictly depends
> on INTC's IRQs starting at NR_IRQs. Aparently
> irq_domain_add_linear() won't guarantee that, since we see
> a 7 IRQs difference when booting with and without the
> commit cited above.
> 
> Until arch/arm/plat-omap/dma.c is properly fixed, we
> must maintain OMAP2/3 using irq_domain_add_legacy().
> 
> A FIXME note was added so people know to delete that
> code once that legacy DMA driver is fixed up.
> 
> Fixes: 55601c9f2467 (arm: omap: intc: switch over to linear irq domain)
> Signed-off-by: Felipe Balbi <balbi@ti.com>

I tested this on N950 with 3.19-rc3, and /proc/interrupts looks sane
and also the "In-band Error" is gone.

Tested-by: Aaro Koskinen <aaro.koskinen@iki.fi>

BTW, I guess people still using 3.18.x will get the wrong IRQ for DMA,
so maybe you should consider adding also Cc: stable...

A.

> ---
>  drivers/irqchip/irq-omap-intc.c | 26 +++++++++++++++++++++-----
>  1 file changed, 21 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/irqchip/irq-omap-intc.c b/drivers/irqchip/irq-omap-intc.c
> index 3c970259c0eb..6ef88f56cf8d 100644
> --- a/drivers/irqchip/irq-omap-intc.c
> +++ b/drivers/irqchip/irq-omap-intc.c
> @@ -263,7 +263,7 @@ static int __init omap_init_irq_of(struct device_node *node)
>  	return ret;
>  }
>  
> -static int __init omap_init_irq_legacy(u32 base)
> +static int __init omap_init_irq_legacy(u32 base, struct device_node *node)
>  {
>  	int j, irq_base;
>  
> @@ -277,7 +277,7 @@ static int __init omap_init_irq_legacy(u32 base)
>  		irq_base = 0;
>  	}
>  
> -	domain = irq_domain_add_legacy(NULL, omap_nr_irqs, irq_base, 0,
> +	domain = irq_domain_add_legacy(node, omap_nr_irqs, irq_base, 0,
>  			&irq_domain_simple_ops, NULL);
>  
>  	omap_irq_soft_reset();
> @@ -301,10 +301,26 @@ static int __init omap_init_irq(u32 base, struct device_node *node)
>  {
>  	int ret;
>  
> -	if (node)
> +	/*
> +	 * FIXME legacy OMAP DMA driver sitting under arch/arm/plat-omap/dma.c
> +	 * depends is still not ready for linear IRQ domains; because of that
> +	 * we need to temporarily "blacklist" OMAP2 and OMAP3 devices from using
> +	 * linear IRQ Domain until that driver is finally fixed.
> +	 */
> +	if (of_device_is_compatible(node, "ti,omap2-intc") ||
> +			of_device_is_compatible(node, "ti,omap3-intc")) {
> +		struct resource res;
> +
> +		if (of_address_to_resource(node, 0, &res))
> +			return -ENOMEM;
> +
> +		base = res.start;
> +		ret = omap_init_irq_legacy(base, node);
> +	} else if (node) {
>  		ret = omap_init_irq_of(node);
> -	else
> -		ret = omap_init_irq_legacy(base);
> +	} else {
> +		ret = omap_init_irq_legacy(base, NULL);
> +	}
>  
>  	if (ret == 0)
>  		omap_irq_enable_protection();
> -- 
> 2.2.0
> 

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

* [PATCH] irqchip: omap-intc: fix legacy DMA regression
  2015-01-06 17:48   ` Aaro Koskinen
@ 2015-01-06 17:52     ` Tony Lindgren
  0 siblings, 0 replies; 10+ messages in thread
From: Tony Lindgren @ 2015-01-06 17:52 UTC (permalink / raw)
  To: linux-arm-kernel

* Aaro Koskinen <aaro.koskinen@iki.fi> [150106 09:51]:
> On Tue, Jan 06, 2015 at 10:51:33AM -0600, Felipe Balbi wrote:
> > commit 55601c9f2467 (arm: omap: intc: switch over
> > to linear irq domain) introduced a regression with
> > SDMA legacy driver because that driver strictly depends
> > on INTC's IRQs starting at NR_IRQs. Aparently
> > irq_domain_add_linear() won't guarantee that, since we see
> > a 7 IRQs difference when booting with and without the
> > commit cited above.
> > 
> > Until arch/arm/plat-omap/dma.c is properly fixed, we
> > must maintain OMAP2/3 using irq_domain_add_legacy().
> > 
> > A FIXME note was added so people know to delete that
> > code once that legacy DMA driver is fixed up.
> > 
> > Fixes: 55601c9f2467 (arm: omap: intc: switch over to linear irq domain)
> > Signed-off-by: Felipe Balbi <balbi@ti.com>
> 
> I tested this on N950 with 3.19-rc3, and /proc/interrupts looks sane
> and also the "In-band Error" is gone.
> 
> Tested-by: Aaro Koskinen <aaro.koskinen@iki.fi>
> 
> BTW, I guess people still using 3.18.x will get the wrong IRQ for DMA,
> so maybe you should consider adding also Cc: stable...

Yeah this one should be cc stable. Fixes the error for me too:

Tested-by: Tony Lindgren <tony@atomide.com>

> > ---
> >  drivers/irqchip/irq-omap-intc.c | 26 +++++++++++++++++++++-----
> >  1 file changed, 21 insertions(+), 5 deletions(-)
> > 
> > diff --git a/drivers/irqchip/irq-omap-intc.c b/drivers/irqchip/irq-omap-intc.c
> > index 3c970259c0eb..6ef88f56cf8d 100644
> > --- a/drivers/irqchip/irq-omap-intc.c
> > +++ b/drivers/irqchip/irq-omap-intc.c
> > @@ -263,7 +263,7 @@ static int __init omap_init_irq_of(struct device_node *node)
> >  	return ret;
> >  }
> >  
> > -static int __init omap_init_irq_legacy(u32 base)
> > +static int __init omap_init_irq_legacy(u32 base, struct device_node *node)
> >  {
> >  	int j, irq_base;
> >  
> > @@ -277,7 +277,7 @@ static int __init omap_init_irq_legacy(u32 base)
> >  		irq_base = 0;
> >  	}
> >  
> > -	domain = irq_domain_add_legacy(NULL, omap_nr_irqs, irq_base, 0,
> > +	domain = irq_domain_add_legacy(node, omap_nr_irqs, irq_base, 0,
> >  			&irq_domain_simple_ops, NULL);
> >  
> >  	omap_irq_soft_reset();
> > @@ -301,10 +301,26 @@ static int __init omap_init_irq(u32 base, struct device_node *node)
> >  {
> >  	int ret;
> >  
> > -	if (node)
> > +	/*
> > +	 * FIXME legacy OMAP DMA driver sitting under arch/arm/plat-omap/dma.c
> > +	 * depends is still not ready for linear IRQ domains; because of that
> > +	 * we need to temporarily "blacklist" OMAP2 and OMAP3 devices from using
> > +	 * linear IRQ Domain until that driver is finally fixed.
> > +	 */
> > +	if (of_device_is_compatible(node, "ti,omap2-intc") ||
> > +			of_device_is_compatible(node, "ti,omap3-intc")) {
> > +		struct resource res;
> > +
> > +		if (of_address_to_resource(node, 0, &res))
> > +			return -ENOMEM;
> > +
> > +		base = res.start;
> > +		ret = omap_init_irq_legacy(base, node);
> > +	} else if (node) {
> >  		ret = omap_init_irq_of(node);
> > -	else
> > -		ret = omap_init_irq_legacy(base);
> > +	} else {
> > +		ret = omap_init_irq_legacy(base, NULL);
> > +	}
> >  
> >  	if (ret == 0)
> >  		omap_irq_enable_protection();
> > -- 
> > 2.2.0
> > 

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

* [PATCH] irqchip: omap-intc: fix legacy DMA regression
  2015-01-06 16:51 ` [PATCH] irqchip: omap-intc: fix legacy DMA regression Felipe Balbi
  2015-01-06 17:48   ` Aaro Koskinen
@ 2015-01-06 18:05   ` Russell King - ARM Linux
  2015-01-06 18:24     ` Aaro Koskinen
  2015-01-06 18:30     ` Tony Lindgren
  2015-01-06 20:38   ` [PATCH v2] " Felipe Balbi
  2015-01-07 11:12   ` [PATCH] " Peter Kümmel
  3 siblings, 2 replies; 10+ messages in thread
From: Russell King - ARM Linux @ 2015-01-06 18:05 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jan 06, 2015 at 10:51:33AM -0600, Felipe Balbi wrote:
> +	/*
> +	 * FIXME legacy OMAP DMA driver sitting under arch/arm/plat-omap/dma.c
> +	 * depends is still not ready for linear IRQ domains; because of that
> +	 * we need to temporarily "blacklist" OMAP2 and OMAP3 devices from using
> +	 * linear IRQ Domain until that driver is finally fixed.

"finally fixed" or finally killed off like it really needs to be, once
all users of it are killed.

We've been trying to do this for, what, three years now... I finally
pushed a WARN_ON() into that code to make it obvious to anyone who
uses omap_request_dma() that they really need to update their code.

Here's the list of references to that symbol which *still* need to be
fixed so that we can kill the legacy DMA driver:

drivers/media/platform/omap/omap_vout_vrfb.c:   ret = omap_request_dma(vout->vrfb_dma_tx.dev_id, "VRFB DMA TX",
drivers/media/platform/omap3isp/isphist.c:              ret = omap_request_dma(OMAP24XX_DMA_NO_DEVICE, "DMA_ISP_HIST",
drivers/media/platform/soc_camera/omap1_camera.c:       err = omap_request_dma(OMAP_DMA_CAMERA_IF_RX, DRIVER_NAME,
drivers/mtd/onenand/omap2.c:            r = omap_request_dma(0, pdev->dev.driver->name,
drivers/usb/gadget/udc/omap_udc.c:              status = omap_request_dma(dma_channel,
drivers/usb/gadget/udc/omap_udc.c:              status = omap_request_dma(dma_channel,
drivers/usb/musb/tusb6010_omap.c:               ret = omap_request_dma(chdat->sync_dev, dev_name,
drivers/usb/musb/tusb6010_omap.c:               ret = omap_request_dma(tusb_dma->sync_dev, "TUSB shared",

-- 
FTTC broadband for 0.8mile line: currently at 9.5Mbps down 400kbps up
according to speedtest.net.

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

* [PATCH] irqchip: omap-intc: fix legacy DMA regression
  2015-01-06 18:05   ` Russell King - ARM Linux
@ 2015-01-06 18:24     ` Aaro Koskinen
  2015-01-06 18:30     ` Tony Lindgren
  1 sibling, 0 replies; 10+ messages in thread
From: Aaro Koskinen @ 2015-01-06 18:24 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

On Tue, Jan 06, 2015 at 06:05:32PM +0000, Russell King - ARM Linux wrote:
> On Tue, Jan 06, 2015 at 10:51:33AM -0600, Felipe Balbi wrote:
> > +	 * FIXME legacy OMAP DMA driver sitting under arch/arm/plat-omap/dma.c
> > +	 * depends is still not ready for linear IRQ domains; because of that
> > +	 * we need to temporarily "blacklist" OMAP2 and OMAP3 devices from using
> > +	 * linear IRQ Domain until that driver is finally fixed.
> 
> "finally fixed" or finally killed off like it really needs to be, once
> all users of it are killed.
> 
> We've been trying to do this for, what, three years now... I finally
> pushed a WARN_ON() into that code to make it obvious to anyone who
> uses omap_request_dma() that they really need to update their code.

> Here's the list of references to that symbol which *still* need to be
> fixed so that we can kill the legacy DMA driver:
> 
> drivers/usb/gadget/udc/omap_udc.c:              status = omap_request_dma(dma_channel,
> drivers/usb/gadget/udc/omap_udc.c:              status = omap_request_dma(dma_channel,

I only learned about this after the WARN_ON() appeared in 3.17
(just couple months ago), and it's on my TODO list...

A.

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

* [PATCH] irqchip: omap-intc: fix legacy DMA regression
  2015-01-06 18:05   ` Russell King - ARM Linux
  2015-01-06 18:24     ` Aaro Koskinen
@ 2015-01-06 18:30     ` Tony Lindgren
  1 sibling, 0 replies; 10+ messages in thread
From: Tony Lindgren @ 2015-01-06 18:30 UTC (permalink / raw)
  To: linux-arm-kernel

* Russell King - ARM Linux <linux@arm.linux.org.uk> [150106 10:08]:
> On Tue, Jan 06, 2015 at 10:51:33AM -0600, Felipe Balbi wrote:
> > +	/*
> > +	 * FIXME legacy OMAP DMA driver sitting under arch/arm/plat-omap/dma.c
> > +	 * depends is still not ready for linear IRQ domains; because of that
> > +	 * we need to temporarily "blacklist" OMAP2 and OMAP3 devices from using
> > +	 * linear IRQ Domain until that driver is finally fixed.
> 
> "finally fixed" or finally killed off like it really needs to be, once
> all users of it are killed.
> 
> We've been trying to do this for, what, three years now... I finally
> pushed a WARN_ON() into that code to make it obvious to anyone who
> uses omap_request_dma() that they really need to update their code.
> 
> Here's the list of references to that symbol which *still* need to be
> fixed so that we can kill the legacy DMA driver:
> 
> drivers/media/platform/omap/omap_vout_vrfb.c:   ret = omap_request_dma(vout->vrfb_dma_tx.dev_id, "VRFB DMA TX",
> drivers/media/platform/omap3isp/isphist.c:              ret = omap_request_dma(OMAP24XX_DMA_NO_DEVICE, "DMA_ISP_HIST",
> drivers/media/platform/soc_camera/omap1_camera.c:       err = omap_request_dma(OMAP_DMA_CAMERA_IF_RX, DRIVER_NAME,
> drivers/mtd/onenand/omap2.c:            r = omap_request_dma(0, pdev->dev.driver->name,

AFAIK we should just remove DMA support from the drivers above.
Nobody seems to be interested in doing anything about them.

> drivers/usb/gadget/udc/omap_udc.c:              status = omap_request_dma(dma_channel,
> drivers/usb/gadget/udc/omap_udc.c:              status = omap_request_dma(dma_channel,

OK so Aaro picked this one.

> drivers/usb/musb/tusb6010_omap.c:               ret = omap_request_dma(chdat->sync_dev, dev_name,
> drivers/usb/musb/tusb6010_omap.c:               ret = omap_request_dma(tusb_dma->sync_dev, "TUSB shared",

I'll update this one. FYI, I already have some work-in-progress
MUSB DMA patches that allow building in all the MUSB DMA glue
layers. I just need to finish that series for v3.20:

https://git.kernel.org/cgit/linux/kernel/git/tmlind/linux-omap.git/log/?h=musb-dma-2014-11-25-v2

So converting tusb6010 over to the dmaengine API would be the
next logical step after that series. Probably not going to
happen before v3.21 though..

Regards,

Tony

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

* [PATCH v2] irqchip: omap-intc: fix legacy DMA regression
  2015-01-06 16:51 ` [PATCH] irqchip: omap-intc: fix legacy DMA regression Felipe Balbi
  2015-01-06 17:48   ` Aaro Koskinen
  2015-01-06 18:05   ` Russell King - ARM Linux
@ 2015-01-06 20:38   ` Felipe Balbi
  2015-01-07  3:00     ` Jason Cooper
  2015-01-07 11:12   ` [PATCH] " Peter Kümmel
  3 siblings, 1 reply; 10+ messages in thread
From: Felipe Balbi @ 2015-01-06 20:38 UTC (permalink / raw)
  To: linux-arm-kernel

commit 55601c9f2467 (arm: omap: intc: switch over
to linear irq domain) introduced a regression with
SDMA legacy driver because that driver strictly depends
on INTC's IRQs starting at NR_IRQs. Aparently
irq_domain_add_linear() won't guarantee that, since we see
a 7 IRQs difference when booting with and without the
commit cited above.

Until arch/arm/plat-omap/dma.c is properly fixed, we
must maintain OMAP2/3 using irq_domain_add_legacy().

A FIXME note was added so people know to delete that
code once that legacy DMA driver is fixed up.

Fixes: 55601c9f2467 (arm: omap: intc: switch over to linear irq domain)
Cc: <stable@vger.kernel.org> # v3.18
Tested-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Tested-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 drivers/irqchip/irq-omap-intc.c | 26 +++++++++++++++++++++-----
 1 file changed, 21 insertions(+), 5 deletions(-)

diff --git a/drivers/irqchip/irq-omap-intc.c b/drivers/irqchip/irq-omap-intc.c
index 3c970259c0eb..6ef88f56cf8d 100644
--- a/drivers/irqchip/irq-omap-intc.c
+++ b/drivers/irqchip/irq-omap-intc.c
@@ -263,7 +263,7 @@ static int __init omap_init_irq_of(struct device_node *node)
 	return ret;
 }
 
-static int __init omap_init_irq_legacy(u32 base)
+static int __init omap_init_irq_legacy(u32 base, struct device_node *node)
 {
 	int j, irq_base;
 
@@ -277,7 +277,7 @@ static int __init omap_init_irq_legacy(u32 base)
 		irq_base = 0;
 	}
 
-	domain = irq_domain_add_legacy(NULL, omap_nr_irqs, irq_base, 0,
+	domain = irq_domain_add_legacy(node, omap_nr_irqs, irq_base, 0,
 			&irq_domain_simple_ops, NULL);
 
 	omap_irq_soft_reset();
@@ -301,10 +301,26 @@ static int __init omap_init_irq(u32 base, struct device_node *node)
 {
 	int ret;
 
-	if (node)
+	/*
+	 * FIXME legacy OMAP DMA driver sitting under arch/arm/plat-omap/dma.c
+	 * depends is still not ready for linear IRQ domains; because of that
+	 * we need to temporarily "blacklist" OMAP2 and OMAP3 devices from using
+	 * linear IRQ Domain until that driver is finally fixed.
+	 */
+	if (of_device_is_compatible(node, "ti,omap2-intc") ||
+			of_device_is_compatible(node, "ti,omap3-intc")) {
+		struct resource res;
+
+		if (of_address_to_resource(node, 0, &res))
+			return -ENOMEM;
+
+		base = res.start;
+		ret = omap_init_irq_legacy(base, node);
+	} else if (node) {
 		ret = omap_init_irq_of(node);
-	else
-		ret = omap_init_irq_legacy(base);
+	} else {
+		ret = omap_init_irq_legacy(base, NULL);
+	}
 
 	if (ret == 0)
 		omap_irq_enable_protection();
-- 
2.2.0

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

* [PATCH v2] irqchip: omap-intc: fix legacy DMA regression
  2015-01-06 20:38   ` [PATCH v2] " Felipe Balbi
@ 2015-01-07  3:00     ` Jason Cooper
  2015-01-19 18:34       ` Tony Lindgren
  0 siblings, 1 reply; 10+ messages in thread
From: Jason Cooper @ 2015-01-07  3:00 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jan 06, 2015 at 02:38:08PM -0600, Felipe Balbi wrote:
> commit 55601c9f2467 (arm: omap: intc: switch over
> to linear irq domain) introduced a regression with
> SDMA legacy driver because that driver strictly depends
> on INTC's IRQs starting at NR_IRQs. Aparently
> irq_domain_add_linear() won't guarantee that, since we see
> a 7 IRQs difference when booting with and without the
> commit cited above.
> 
> Until arch/arm/plat-omap/dma.c is properly fixed, we
> must maintain OMAP2/3 using irq_domain_add_legacy().
> 
> A FIXME note was added so people know to delete that
> code once that legacy DMA driver is fixed up.
> 
> Fixes: 55601c9f2467 (arm: omap: intc: switch over to linear irq domain)
> Cc: <stable@vger.kernel.org> # v3.18
> Tested-by: Aaro Koskinen <aaro.koskinen@iki.fi>
> Tested-by: Tony Lindgren <tony@atomide.com>
> Signed-off-by: Felipe Balbi <balbi@ti.com>
> ---
>  drivers/irqchip/irq-omap-intc.c | 26 +++++++++++++++++++++-----
>  1 file changed, 21 insertions(+), 5 deletions(-)

Applied to irqchip/urgent.  Thanks for taking care of the Fixes and
stable tags!

thx,

Jason.

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

* [PATCH] irqchip: omap-intc: fix legacy DMA regression
  2015-01-06 16:51 ` [PATCH] irqchip: omap-intc: fix legacy DMA regression Felipe Balbi
                     ` (2 preceding siblings ...)
  2015-01-06 20:38   ` [PATCH v2] " Felipe Balbi
@ 2015-01-07 11:12   ` Peter Kümmel
  3 siblings, 0 replies; 10+ messages in thread
From: Peter Kümmel @ 2015-01-07 11:12 UTC (permalink / raw)
  To: linux-arm-kernel



Am 06.01.2015 um 17:51 schrieb Felipe Balbi:
> commit 55601c9f2467 (arm: omap: intc: switch over
> to linear irq domain) introduced a regression with
> SDMA legacy driver because that driver strictly depends
> on INTC's IRQs starting at NR_IRQs. Aparently
> irq_domain_add_linear() won't guarantee that, since we see
> a 7 IRQs difference when booting with and without the
> commit cited above.
>
> Until arch/arm/plat-omap/dma.c is properly fixed, we
> must maintain OMAP2/3 using irq_domain_add_legacy().
>
> A FIXME note was added so people know to delete that
> code once that legacy DMA driver is fixed up.
>
> Fixes: 55601c9f2467 (arm: omap: intc: switch over to linear irq domain)
> Signed-off-by: Felipe Balbi <balbi@ti.com>
> ---
>   drivers/irqchip/irq-omap-intc.c | 26 +++++++++++++++++++++-----
>   1 file changed, 21 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/irqchip/irq-omap-intc.c b/drivers/irqchip/irq-omap-intc.c
> index 3c970259c0eb..6ef88f56cf8d 100644
> --- a/drivers/irqchip/irq-omap-intc.c
> +++ b/drivers/irqchip/irq-omap-intc.c
> @@ -263,7 +263,7 @@ static int __init omap_init_irq_of(struct device_node *node)
>   	return ret;
>   }
>
> -static int __init omap_init_irq_legacy(u32 base)
> +static int __init omap_init_irq_legacy(u32 base, struct device_node *node)
>   {
>   	int j, irq_base;
>
> @@ -277,7 +277,7 @@ static int __init omap_init_irq_legacy(u32 base)
>   		irq_base = 0;
>   	}
>
> -	domain = irq_domain_add_legacy(NULL, omap_nr_irqs, irq_base, 0,
> +	domain = irq_domain_add_legacy(node, omap_nr_irqs, irq_base, 0,
>   			&irq_domain_simple_ops, NULL);
>
>   	omap_irq_soft_reset();
> @@ -301,10 +301,26 @@ static int __init omap_init_irq(u32 base, struct device_node *node)
>   {
>   	int ret;
>
> -	if (node)
> +	/*
> +	 * FIXME legacy OMAP DMA driver sitting under arch/arm/plat-omap/dma.c
> +	 * depends is still not ready for linear IRQ domains; because of that
> +	 * we need to temporarily "blacklist" OMAP2 and OMAP3 devices from using
> +	 * linear IRQ Domain until that driver is finally fixed.
> +	 */
> +	if (of_device_is_compatible(node, "ti,omap2-intc") ||
> +			of_device_is_compatible(node, "ti,omap3-intc")) {
> +		struct resource res;
> +
> +		if (of_address_to_resource(node, 0, &res))
> +			return -ENOMEM;
> +
> +		base = res.start;
> +		ret = omap_init_irq_legacy(base, node);
> +	} else if (node) {
>   		ret = omap_init_irq_of(node);
> -	else
> -		ret = omap_init_irq_legacy(base);
> +	} else {
> +		ret = omap_init_irq_legacy(base, NULL);
> +	}
>
>   	if (ret == 0)
>   		omap_irq_enable_protection();
>

Thanks, works on DM3730.

Peter

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

* [PATCH v2] irqchip: omap-intc: fix legacy DMA regression
  2015-01-07  3:00     ` Jason Cooper
@ 2015-01-19 18:34       ` Tony Lindgren
  0 siblings, 0 replies; 10+ messages in thread
From: Tony Lindgren @ 2015-01-19 18:34 UTC (permalink / raw)
  To: linux-arm-kernel

* Jason Cooper <jason@lakedaemon.net> [150106 19:03]:
> On Tue, Jan 06, 2015 at 02:38:08PM -0600, Felipe Balbi wrote:
> > commit 55601c9f2467 (arm: omap: intc: switch over
> > to linear irq domain) introduced a regression with
> > SDMA legacy driver because that driver strictly depends
> > on INTC's IRQs starting at NR_IRQs. Aparently
> > irq_domain_add_linear() won't guarantee that, since we see
> > a 7 IRQs difference when booting with and without the
> > commit cited above.
> > 
> > Until arch/arm/plat-omap/dma.c is properly fixed, we
> > must maintain OMAP2/3 using irq_domain_add_legacy().
> > 
> > A FIXME note was added so people know to delete that
> > code once that legacy DMA driver is fixed up.
> > 
> > Fixes: 55601c9f2467 (arm: omap: intc: switch over to linear irq domain)
> > Cc: <stable@vger.kernel.org> # v3.18
> > Tested-by: Aaro Koskinen <aaro.koskinen@iki.fi>
> > Tested-by: Tony Lindgren <tony@atomide.com>
> > Signed-off-by: Felipe Balbi <balbi@ti.com>
> > ---
> >  drivers/irqchip/irq-omap-intc.c | 26 +++++++++++++++++++++-----
> >  1 file changed, 21 insertions(+), 5 deletions(-)
> 
> Applied to irqchip/urgent.  Thanks for taking care of the Fixes and
> stable tags!

Jason, I'm not seeing this merged into v3.19-rc5, seems to be
in Linux next though.

Regards,

Tony

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

end of thread, other threads:[~2015-01-19 18:34 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20150106123830.GD30544@fuloong-minipc.musicnaut.iki.fi>
2015-01-06 16:51 ` [PATCH] irqchip: omap-intc: fix legacy DMA regression Felipe Balbi
2015-01-06 17:48   ` Aaro Koskinen
2015-01-06 17:52     ` Tony Lindgren
2015-01-06 18:05   ` Russell King - ARM Linux
2015-01-06 18:24     ` Aaro Koskinen
2015-01-06 18:30     ` Tony Lindgren
2015-01-06 20:38   ` [PATCH v2] " Felipe Balbi
2015-01-07  3:00     ` Jason Cooper
2015-01-19 18:34       ` Tony Lindgren
2015-01-07 11:12   ` [PATCH] " Peter Kümmel

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