linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc: 52xx: nop out unsupported critical IRQs
@ 2012-10-10 20:56 Wolfram Sang
  2012-10-11  9:19 ` [PATCH v2] " Wolfram Sang
  0 siblings, 1 reply; 6+ messages in thread
From: Wolfram Sang @ 2012-10-10 20:56 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: John Bonesio, Anatolij Gustschin, Wolfram Sang

Currently, when booting MPC52xx based platforms, we get:

        mpc52xx_irqhost_map: invalid irq: virq=16, l1=0, l2=3
        irq: irq-16==>hwirq-0x3 mapping failed: -22
        [WARNing skipped]

The warning is wrong since the mapping itself is valid. However, there is no
support for that type of IRQ currently. Print a proper warning and bind the irq
to a no_irq chip.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Cc: John Bonesio <bones@secretlab.ca>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Grant Likely <grant.likely@secretlab.ca>
---
 arch/powerpc/platforms/52xx/mpc52xx_pic.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/powerpc/platforms/52xx/mpc52xx_pic.c b/arch/powerpc/platforms/52xx/mpc52xx_pic.c
index 8520b58..703ad42 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_pic.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_pic.c
@@ -372,6 +372,11 @@ static int mpc52xx_irqhost_map(struct irq_domain *h, unsigned int virq,
 	case MPC52xx_IRQ_L1_MAIN: irqchip = &mpc52xx_main_irqchip; break;
 	case MPC52xx_IRQ_L1_PERP: irqchip = &mpc52xx_periph_irqchip; break;
 	case MPC52xx_IRQ_L1_SDMA: irqchip = &mpc52xx_sdma_irqchip; break;
+	case MPC52xx_IRQ_L1_CRIT:
+		pr_warn("%s: Critical IRQ #%d is unsupported! Nopping it.\n",
+			__func__, l2irq);
+		irq_set_chip(virq, &no_irq_chip);
+		return 0;
 	default:
 		pr_err("%s: invalid irq: virq=%i, l1=%i, l2=%i\n",
 		       __func__, virq, l1irq, l2irq);
-- 
1.7.10.4

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

* [PATCH v2] powerpc: 52xx: nop out unsupported critical IRQs
  2012-10-10 20:56 [PATCH] powerpc: 52xx: nop out unsupported critical IRQs Wolfram Sang
@ 2012-10-11  9:19 ` Wolfram Sang
  2012-10-20  6:54   ` Wolfram Sang
  2012-10-20 11:59   ` Anatolij Gustschin
  0 siblings, 2 replies; 6+ messages in thread
From: Wolfram Sang @ 2012-10-11  9:19 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: John Bonesio, Anatolij Gustschin, Wolfram Sang

Currently, when booting MPC52xx based platforms, we get:

        mpc52xx_irqhost_map: invalid irq: virq=16, l1=0, l2=3
        irq: irq-16==>hwirq-0x3 mapping failed: -22
        [WARNing skipped]

The warning is wrong since the mapping itself is valid. However, there is no
support for that type of IRQ currently. Print a proper warning and bind the irq
to a no_irq chip.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Cc: John Bonesio <bones@secretlab.ca>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Grant Likely <grant.likely@secretlab.ca>
---

Change since V1: drop the default state since all possibilities for l1 are now
		 covered in the switch-statement.

 arch/powerpc/platforms/52xx/mpc52xx_pic.c |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/arch/powerpc/platforms/52xx/mpc52xx_pic.c b/arch/powerpc/platforms/52xx/mpc52xx_pic.c
index 8520b58..b89ef65 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_pic.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_pic.c
@@ -372,10 +372,11 @@ static int mpc52xx_irqhost_map(struct irq_domain *h, unsigned int virq,
 	case MPC52xx_IRQ_L1_MAIN: irqchip = &mpc52xx_main_irqchip; break;
 	case MPC52xx_IRQ_L1_PERP: irqchip = &mpc52xx_periph_irqchip; break;
 	case MPC52xx_IRQ_L1_SDMA: irqchip = &mpc52xx_sdma_irqchip; break;
-	default:
-		pr_err("%s: invalid irq: virq=%i, l1=%i, l2=%i\n",
-		       __func__, virq, l1irq, l2irq);
-		return -EINVAL;
+	case MPC52xx_IRQ_L1_CRIT:
+		pr_warn("%s: Critical IRQ #%d is unsupported! Nopping it.\n",
+			__func__, l2irq);
+		irq_set_chip(virq, &no_irq_chip);
+		return 0;
 	}
 
 	irq_set_chip_and_handler(virq, irqchip, handle_level_irq);
-- 
1.7.10.4

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

* Re: [PATCH v2] powerpc: 52xx: nop out unsupported critical IRQs
  2012-10-11  9:19 ` [PATCH v2] " Wolfram Sang
@ 2012-10-20  6:54   ` Wolfram Sang
  2012-10-20 11:59   ` Anatolij Gustschin
  1 sibling, 0 replies; 6+ messages in thread
From: Wolfram Sang @ 2012-10-20  6:54 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: John Bonesio, Anatolij Gustschin

[-- Attachment #1: Type: text/plain, Size: 2180 bytes --]

On Thu, Oct 11, 2012 at 11:19:15AM +0200, Wolfram Sang wrote:
> Currently, when booting MPC52xx based platforms, we get:
> 
>         mpc52xx_irqhost_map: invalid irq: virq=16, l1=0, l2=3
>         irq: irq-16==>hwirq-0x3 mapping failed: -22
>         [WARNing skipped]
> 
> The warning is wrong since the mapping itself is valid. However, there is no
> support for that type of IRQ currently. Print a proper warning and bind the irq
> to a no_irq chip.
> 
> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
> Cc: John Bonesio <bones@secretlab.ca>
> Cc: Anatolij Gustschin <agust@denx.de>
> Cc: Grant Likely <grant.likely@secretlab.ca>

Ping. I'd really like to get rid of the WARNing for all MPC52xx boards.
It looks pretty scary to people who don't know the issues behind it.

> ---
> 
> Change since V1: drop the default state since all possibilities for l1 are now
> 		 covered in the switch-statement.
> 
>  arch/powerpc/platforms/52xx/mpc52xx_pic.c |    9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/powerpc/platforms/52xx/mpc52xx_pic.c b/arch/powerpc/platforms/52xx/mpc52xx_pic.c
> index 8520b58..b89ef65 100644
> --- a/arch/powerpc/platforms/52xx/mpc52xx_pic.c
> +++ b/arch/powerpc/platforms/52xx/mpc52xx_pic.c
> @@ -372,10 +372,11 @@ static int mpc52xx_irqhost_map(struct irq_domain *h, unsigned int virq,
>  	case MPC52xx_IRQ_L1_MAIN: irqchip = &mpc52xx_main_irqchip; break;
>  	case MPC52xx_IRQ_L1_PERP: irqchip = &mpc52xx_periph_irqchip; break;
>  	case MPC52xx_IRQ_L1_SDMA: irqchip = &mpc52xx_sdma_irqchip; break;
> -	default:
> -		pr_err("%s: invalid irq: virq=%i, l1=%i, l2=%i\n",
> -		       __func__, virq, l1irq, l2irq);
> -		return -EINVAL;
> +	case MPC52xx_IRQ_L1_CRIT:
> +		pr_warn("%s: Critical IRQ #%d is unsupported! Nopping it.\n",
> +			__func__, l2irq);
> +		irq_set_chip(virq, &no_irq_chip);
> +		return 0;
>  	}
>  
>  	irq_set_chip_and_handler(virq, irqchip, handle_level_irq);
> -- 
> 1.7.10.4
> 

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

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

* Re: [PATCH v2] powerpc: 52xx: nop out unsupported critical IRQs
  2012-10-11  9:19 ` [PATCH v2] " Wolfram Sang
  2012-10-20  6:54   ` Wolfram Sang
@ 2012-10-20 11:59   ` Anatolij Gustschin
  2012-11-03 14:26     ` Wolfram Sang
  1 sibling, 1 reply; 6+ messages in thread
From: Anatolij Gustschin @ 2012-10-20 11:59 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: John Bonesio, linuxppc-dev

Hi,

On Thu, 11 Oct 2012 11:19:15 +0200
Wolfram Sang <w.sang@pengutronix.de> wrote:

> Currently, when booting MPC52xx based platforms, we get:
> 
>         mpc52xx_irqhost_map: invalid irq: virq=16, l1=0, l2=3
>         irq: irq-16==>hwirq-0x3 mapping failed: -22
>         [WARNing skipped]
> 
> The warning is wrong since the mapping itself is valid. However, there is no
> support for that type of IRQ currently. Print a proper warning and bind the irq
> to a no_irq chip.
> 
> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
> Cc: John Bonesio <bones@secretlab.ca>
> Cc: Anatolij Gustschin <agust@denx.de>
> Cc: Grant Likely <grant.likely@secretlab.ca>
> ---
> 
> Change since V1: drop the default state since all possibilities for l1 are now
> 		 covered in the switch-statement.
> 
>  arch/powerpc/platforms/52xx/mpc52xx_pic.c |    9 +++++----

applied, thanks!

Anatolij

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

* Re: [PATCH v2] powerpc: 52xx: nop out unsupported critical IRQs
  2012-10-20 11:59   ` Anatolij Gustschin
@ 2012-11-03 14:26     ` Wolfram Sang
  2012-11-03 15:29       ` Anatolij Gustschin
  0 siblings, 1 reply; 6+ messages in thread
From: Wolfram Sang @ 2012-11-03 14:26 UTC (permalink / raw)
  To: Anatolij Gustschin; +Cc: John Bonesio, linuxppc-dev

[-- Attachment #1: Type: text/plain, Size: 734 bytes --]


> > Currently, when booting MPC52xx based platforms, we get:
> > 
> >         mpc52xx_irqhost_map: invalid irq: virq=16, l1=0, l2=3
> >         irq: irq-16==>hwirq-0x3 mapping failed: -22
> >         [WARNing skipped]
> > 
> > The warning is wrong since the mapping itself is valid. However, there is no
> > support for that type of IRQ currently. Print a proper warning and bind the irq
> > to a no_irq chip.
> > 
> > Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
> applied, thanks!

Thanks, can we have that in 3.7. already?

Regards,

   Wolfram

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

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

* Re: [PATCH v2] powerpc: 52xx: nop out unsupported critical IRQs
  2012-11-03 14:26     ` Wolfram Sang
@ 2012-11-03 15:29       ` Anatolij Gustschin
  0 siblings, 0 replies; 6+ messages in thread
From: Anatolij Gustschin @ 2012-11-03 15:29 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: John Bonesio, linuxppc-dev

On Sat, 3 Nov 2012 15:26:15 +0100
Wolfram Sang <w.sang@pengutronix.de> wrote:

> 
> > > Currently, when booting MPC52xx based platforms, we get:
> > > 
> > >         mpc52xx_irqhost_map: invalid irq: virq=16, l1=0, l2=3
> > >         irq: irq-16==>hwirq-0x3 mapping failed: -22
> > >         [WARNing skipped]
> > > 
> > > The warning is wrong since the mapping itself is valid. However, there is no
> > > support for that type of IRQ currently. Print a proper warning and bind the irq
> > > to a no_irq chip.
> > > 
> > > Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
> > applied, thanks!
> 
> Thanks, can we have that in 3.7. already?

I hope so, a pull request including this patch is pending.

Thanks,
Anatolij

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

end of thread, other threads:[~2012-11-03 15:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-10 20:56 [PATCH] powerpc: 52xx: nop out unsupported critical IRQs Wolfram Sang
2012-10-11  9:19 ` [PATCH v2] " Wolfram Sang
2012-10-20  6:54   ` Wolfram Sang
2012-10-20 11:59   ` Anatolij Gustschin
2012-11-03 14:26     ` Wolfram Sang
2012-11-03 15:29       ` Anatolij Gustschin

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