LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] powerpc: Print information about mapping hw irqs to virtual irqs
@ 2009-04-06  2:05 Michael Ellerman
  2009-04-06 12:30 ` Wolfram Sang
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Michael Ellerman @ 2009-04-06  2:05 UTC (permalink / raw)
  To: linuxppc-dev

The irq remapping layer seems to cause some confusion when people
see a different irq number in /proc/interrupts vs the one they
request in their driver or DTS.

So have the irq remapping layer print out a message when we map an
irq. The message is only printed the first time the irq is mapped,
and it's KERN_DEBUG so most people won't see it.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
---
 arch/powerpc/kernel/irq.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
index 5576147..8c1a496 100644
--- a/arch/powerpc/kernel/irq.c
+++ b/arch/powerpc/kernel/irq.c
@@ -672,11 +672,13 @@ unsigned int irq_create_mapping(struct irq_host *host,
 			return NO_IRQ;
 		}
 	}
-	pr_debug("irq: -> obtained virq %d\n", virq);
 
 	if (irq_setup_virq(host, virq, hwirq))
 		return NO_IRQ;
 
+	printk(KERN_DEBUG "irq: irq %lu on host %s mapped to virtual irq %u\n",
+		hwirq, host->of_node ? host->of_node->full_name : "null", virq);
+
 	return virq;
 }
 EXPORT_SYMBOL_GPL(irq_create_mapping);
-- 
1.6.1.2

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

* Re: [PATCH] powerpc: Print information about mapping hw irqs to virtual irqs
  2009-04-06  2:05 [PATCH] powerpc: Print information about mapping hw irqs to virtual irqs Michael Ellerman
@ 2009-04-06 12:30 ` Wolfram Sang
  2009-04-06 12:57   ` Michael Ellerman
  2009-04-06 13:27 ` Grant Likely
  2009-04-06 13:58 ` Wolfram Sang
  2 siblings, 1 reply; 5+ messages in thread
From: Wolfram Sang @ 2009-04-06 12:30 UTC (permalink / raw)
  To: Michael Ellerman; +Cc: linuxppc-dev

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

On Mon, Apr 06, 2009 at 12:05:02PM +1000, Michael Ellerman wrote:
> The irq remapping layer seems to cause some confusion when people
> see a different irq number in /proc/interrupts vs the one they
> request in their driver or DTS.
> 
> So have the irq remapping layer print out a message when we map an
> irq. The message is only printed the first time the irq is mapped,
> and it's KERN_DEBUG so most people won't see it.
> 
> Signed-off-by: Michael Ellerman <michael@ellerman.id.au>

I like the patch in general...

> ---
>  arch/powerpc/kernel/irq.c |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
> index 5576147..8c1a496 100644
> --- a/arch/powerpc/kernel/irq.c
> +++ b/arch/powerpc/kernel/irq.c
> @@ -672,11 +672,13 @@ unsigned int irq_create_mapping(struct irq_host *host,
>  			return NO_IRQ;
>  		}
>  	}
> -	pr_debug("irq: -> obtained virq %d\n", virq);
>  
>  	if (irq_setup_virq(host, virq, hwirq))
>  		return NO_IRQ;
>  
> +	printk(KERN_DEBUG "irq: irq %lu on host %s mapped to virtual irq %u\n",
> +		hwirq, host->of_node ? host->of_node->full_name : "null", virq);
> +

Are you replacing the pr_debug because you want to drop the
DEBUG-dependency?

>  	return virq;
>  }
>  EXPORT_SYMBOL_GPL(irq_create_mapping);
> -- 
> 1.6.1.2
> 
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev

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

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

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

* Re: [PATCH] powerpc: Print information about mapping hw irqs to virtual irqs
  2009-04-06 12:30 ` Wolfram Sang
@ 2009-04-06 12:57   ` Michael Ellerman
  0 siblings, 0 replies; 5+ messages in thread
From: Michael Ellerman @ 2009-04-06 12:57 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: linuxppc-dev

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

On Mon, 2009-04-06 at 14:30 +0200, Wolfram Sang wrote:
> On Mon, Apr 06, 2009 at 12:05:02PM +1000, Michael Ellerman wrote:
> > diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
> > index 5576147..8c1a496 100644
> > --- a/arch/powerpc/kernel/irq.c
> > +++ b/arch/powerpc/kernel/irq.c
> > @@ -672,11 +672,13 @@ unsigned int irq_create_mapping(struct irq_host *host,
> >  			return NO_IRQ;
> >  		}
> >  	}
> > -	pr_debug("irq: -> obtained virq %d\n", virq);
> >  
> >  	if (irq_setup_virq(host, virq, hwirq))
> >  		return NO_IRQ;
> >  
> > +	printk(KERN_DEBUG "irq: irq %lu on host %s mapped to virtual irq %u\n",
> > +		hwirq, host->of_node ? host->of_node->full_name : "null", virq);
> > +
> 
> Are you replacing the pr_debug because you want to drop the
> DEBUG-dependency?

Yes. Several people have been confused by the value in /proc/interrupts
not matching what they expected - so I want there to be something in
dmesg by default that will hopefully make it clear to people what's
going on.

cheers

-- 
Michael Ellerman
OzLabs, IBM Australia Development Lab

wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)

We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

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

* Re: [PATCH] powerpc: Print information about mapping hw irqs to virtual irqs
  2009-04-06  2:05 [PATCH] powerpc: Print information about mapping hw irqs to virtual irqs Michael Ellerman
  2009-04-06 12:30 ` Wolfram Sang
@ 2009-04-06 13:27 ` Grant Likely
  2009-04-06 13:58 ` Wolfram Sang
  2 siblings, 0 replies; 5+ messages in thread
From: Grant Likely @ 2009-04-06 13:27 UTC (permalink / raw)
  To: Michael Ellerman; +Cc: linuxppc-dev

On Sun, Apr 5, 2009 at 8:05 PM, Michael Ellerman <michael@ellerman.id.au> w=
rote:
> The irq remapping layer seems to cause some confusion when people
> see a different irq number in /proc/interrupts vs the one they
> request in their driver or DTS.
>
> So have the irq remapping layer print out a message when we map an
> irq. The message is only printed the first time the irq is mapped,
> and it's KERN_DEBUG so most people won't see it.
>
> Signed-off-by: Michael Ellerman <michael@ellerman.id.au>

Acked-by: Grant Likely <grant.likely@secretlab.ca>

> ---
> =A0arch/powerpc/kernel/irq.c | =A0 =A04 +++-
> =A01 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
> index 5576147..8c1a496 100644
> --- a/arch/powerpc/kernel/irq.c
> +++ b/arch/powerpc/kernel/irq.c
> @@ -672,11 +672,13 @@ unsigned int irq_create_mapping(struct irq_host *ho=
st,
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0return NO_IRQ;
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0}
> =A0 =A0 =A0 =A0}
> - =A0 =A0 =A0 pr_debug("irq: -> obtained virq %d\n", virq);
>
> =A0 =A0 =A0 =A0if (irq_setup_virq(host, virq, hwirq))
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0return NO_IRQ;
>
> + =A0 =A0 =A0 printk(KERN_DEBUG "irq: irq %lu on host %s mapped to virtua=
l irq %u\n",
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 hwirq, host->of_node ? host->of_node->full_=
name : "null", virq);
> +
> =A0 =A0 =A0 =A0return virq;
> =A0}
> =A0EXPORT_SYMBOL_GPL(irq_create_mapping);
> --
> 1.6.1.2
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
>



--=20
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.

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

* Re: [PATCH] powerpc: Print information about mapping hw irqs to virtual irqs
  2009-04-06  2:05 [PATCH] powerpc: Print information about mapping hw irqs to virtual irqs Michael Ellerman
  2009-04-06 12:30 ` Wolfram Sang
  2009-04-06 13:27 ` Grant Likely
@ 2009-04-06 13:58 ` Wolfram Sang
  2 siblings, 0 replies; 5+ messages in thread
From: Wolfram Sang @ 2009-04-06 13:58 UTC (permalink / raw)
  To: Michael Ellerman; +Cc: linuxppc-dev

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

On Mon, Apr 06, 2009 at 12:05:02PM +1000, Michael Ellerman wrote:
> The irq remapping layer seems to cause some confusion when people
> see a different irq number in /proc/interrupts vs the one they
> request in their driver or DTS.
> 
> So have the irq remapping layer print out a message when we map an
> irq. The message is only printed the first time the irq is mapped,
> and it's KERN_DEBUG so most people won't see it.
> 
> Signed-off-by: Michael Ellerman <michael@ellerman.id.au>

Acked-by: Wolfram Sang <w.sang@pengutronix.de>

> ---
>  arch/powerpc/kernel/irq.c |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
> index 5576147..8c1a496 100644
> --- a/arch/powerpc/kernel/irq.c
> +++ b/arch/powerpc/kernel/irq.c
> @@ -672,11 +672,13 @@ unsigned int irq_create_mapping(struct irq_host *host,
>  			return NO_IRQ;
>  		}
>  	}
> -	pr_debug("irq: -> obtained virq %d\n", virq);
>  
>  	if (irq_setup_virq(host, virq, hwirq))
>  		return NO_IRQ;
>  
> +	printk(KERN_DEBUG "irq: irq %lu on host %s mapped to virtual irq %u\n",
> +		hwirq, host->of_node ? host->of_node->full_name : "null", virq);
> +
>  	return virq;
>  }
>  EXPORT_SYMBOL_GPL(irq_create_mapping);
> -- 
> 1.6.1.2
> 
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev

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

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

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

end of thread, other threads:[~2009-04-06 13:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-06  2:05 [PATCH] powerpc: Print information about mapping hw irqs to virtual irqs Michael Ellerman
2009-04-06 12:30 ` Wolfram Sang
2009-04-06 12:57   ` Michael Ellerman
2009-04-06 13:27 ` Grant Likely
2009-04-06 13:58 ` Wolfram Sang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox