linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Add irq host and hwirq pair fields to output when showing interrupts.
@ 2007-03-13  3:19 Zhang Wei
  2007-03-13  7:14 ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 6+ messages in thread
From: Zhang Wei @ 2007-03-13  3:19 UTC (permalink / raw)
  To: paulus, galak; +Cc: linuxppc-dev, r54964

Signed-off-by: Zhang Wei <wei.zhang@freescale.com>
---
 arch/powerpc/kernel/irq.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
index 919fbf5..2a30ffd 100644
--- a/arch/powerpc/kernel/irq.c
+++ b/arch/powerpc/kernel/irq.c
@@ -194,7 +194,7 @@ #else
 		seq_printf(p, "%10u ", kstat_irqs(i));
 #endif /* CONFIG_SMP */
 		if (desc->chip)
-			seq_printf(p, " %s ", desc->chip->typename);
+			seq_printf(p, " (%3d) @%s ", (irq_map[i].host->revmap_type == IRQ_HOST_MAP_LEGACY) ? i : virq_to_hw(i), desc->chip->typename);
 		else
 			seq_puts(p, "  None      ");
 		seq_printf(p, "%s", (desc->status & IRQ_LEVEL) ? "Level " : "Edge  ");
-- 
1.4.0

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

* Re: [PATCH] Add irq host and hwirq pair fields to output when showing interrupts.
  2007-03-13  3:19 [PATCH] Add irq host and hwirq pair fields to output when showing interrupts Zhang Wei
@ 2007-03-13  7:14 ` Benjamin Herrenschmidt
  2007-03-13  9:32   ` [PATCH] Add irq host and hwirq pair fields to output whenshowing interrupts Zhang Wei-r63237
  0 siblings, 1 reply; 6+ messages in thread
From: Benjamin Herrenschmidt @ 2007-03-13  7:14 UTC (permalink / raw)
  To: Zhang Wei; +Cc: linuxppc-dev, paulus, r54964

On Tue, 2007-03-13 at 11:19 +0800, Zhang Wei wrote:
> Signed-off-by: Zhang Wei <wei.zhang@freescale.com>
> ---
>  arch/powerpc/kernel/irq.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
> index 919fbf5..2a30ffd 100644
> --- a/arch/powerpc/kernel/irq.c
> +++ b/arch/powerpc/kernel/irq.c
> @@ -194,7 +194,7 @@ #else
>  		seq_printf(p, "%10u ", kstat_irqs(i));
>  #endif /* CONFIG_SMP */
>  		if (desc->chip)
> -			seq_printf(p, " %s ", desc->chip->typename);
> +			seq_printf(p, " (%3d) @%s ", (irq_map[i].host->revmap_type == IRQ_HOST_MAP_LEGACY) ? i : virq_to_hw(i), desc->chip->typename);
>  		else
>  			seq_puts(p, "  None      ");
>  		seq_printf(p, "%s", (desc->status & IRQ_LEVEL) ? "Level " : "Edge  ");

Well, first, we shouldn't modify the output of /proc/interrupts as this
will likely break all sort of userland tools displaying it (well, I
think).

Now, regarding the patch itself, printing the hw irq is not that useful
without some indication of which host it belongs to. Best is to add a
name() or something like that to the host ops.

Ben.

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

* RE: [PATCH] Add irq host and hwirq pair fields to output whenshowing interrupts.
  2007-03-13  7:14 ` Benjamin Herrenschmidt
@ 2007-03-13  9:32   ` Zhang Wei-r63237
  2007-03-13 13:52     ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 6+ messages in thread
From: Zhang Wei-r63237 @ 2007-03-13  9:32 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev, paulus, Wang Haiying-r54964

> On Tue, 2007-03-13 at 11:19 +0800, Zhang Wei wrote:
> > Signed-off-by: Zhang Wei <wei.zhang@freescale.com>
> > ---
> >  arch/powerpc/kernel/irq.c |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> >=20
> > diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
> > index 919fbf5..2a30ffd 100644
> > --- a/arch/powerpc/kernel/irq.c
> > +++ b/arch/powerpc/kernel/irq.c
> > @@ -194,7 +194,7 @@ #else
> >  		seq_printf(p, "%10u ", kstat_irqs(i));
> >  #endif /* CONFIG_SMP */
> >  		if (desc->chip)
> > -			seq_printf(p, " %s ", desc->chip->typename);
> > +			seq_printf(p, " (%3d) @%s ",=20
> (irq_map[i].host->revmap_type =3D=3D IRQ_HOST_MAP_LEGACY) ? i :=20
> virq_to_hw(i), desc->chip->typename);
> >  		else
> >  			seq_puts(p, "  None      ");
> >  		seq_printf(p, "%s", (desc->status & IRQ_LEVEL)=20
> ? "Level " : "Edge  ");
>=20
> Well, first, we shouldn't modify the output of=20
> /proc/interrupts as this
> will likely break all sort of userland tools displaying it (well, I
> think).
>=20
> Now, regarding the patch itself, printing the hw irq is not=20
> that useful
> without some indication of which host it belongs to. Best is to add a
> name() or something like that to the host ops.
>=20

Sure, can I use the PIC controller node full name from of_tree as the
host name?

Do you prefer debugfs instead of /proc/interrupts?

Thanks!
Zhang Wei

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

* RE: [PATCH] Add irq host and hwirq pair fields to output whenshowing interrupts.
  2007-03-13  9:32   ` [PATCH] Add irq host and hwirq pair fields to output whenshowing interrupts Zhang Wei-r63237
@ 2007-03-13 13:52     ` Benjamin Herrenschmidt
  2007-03-15  9:53       ` [PATCH] Add irq host and hwirq pair fields to outputwhenshowing interrupts Zhang Wei-r63237
  0 siblings, 1 reply; 6+ messages in thread
From: Benjamin Herrenschmidt @ 2007-03-13 13:52 UTC (permalink / raw)
  To: Zhang Wei-r63237; +Cc: linuxppc-dev, paulus, Wang Haiying-r54964


> > Now, regarding the patch itself, printing the hw irq is not 
> > that useful
> > without some indication of which host it belongs to. Best is to add a
> > name() or something like that to the host ops.
> > 
> 
> Sure, can I use the PIC controller node full name from of_tree as the
> host name?

There is no 1:1 relationship between an OF node and an irq host. (There
is -most- of the time but I left the irq core on purpose more flexible,
hence the match() method. On some setups it makes sense to have multiple
HW PICs share a single domain number (for example on cell).

Thus I'd rather have a way for the host to give you that name, which in
turn can be the OF path if there is such a thing, or something else...

Best might be 4 columns:

<virq> <hwirq> <pic name> <host name>

(PIC name is the same as in /proc/interrupts).
 
> Do you prefer debugfs instead of /proc/interrupts?

Yes, at least for now. Maybe if we can convince ourselves that nothing
significant would break of changing /proc/interrupts, then we can add
stuffs to it, but I'd rather avoid.

Ben.

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

* RE: [PATCH] Add irq host and hwirq pair fields to outputwhenshowing interrupts.
  2007-03-13 13:52     ` Benjamin Herrenschmidt
@ 2007-03-15  9:53       ` Zhang Wei-r63237
  2007-03-15 10:22         ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 6+ messages in thread
From: Zhang Wei-r63237 @ 2007-03-15  9:53 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev, paulus, Wang Haiying-r54964

> > > Now, regarding the patch itself, printing the hw irq is not=20
> > > that useful
> > > without some indication of which host it belongs to. Best=20
> is to add a
> > > name() or something like that to the host ops.
> > >=20
> >=20
> > Sure, can I use the PIC controller node full name from=20
> of_tree as the
> > host name?
>=20
> There is no 1:1 relationship between an OF node and an irq=20
> host. (There
> is -most- of the time but I left the irq core on purpose more=20
> flexible,
> hence the match() method. On some setups it makes sense to=20
> have multiple
> HW PICs share a single domain number (for example on cell).
>=20
> Thus I'd rather have a way for the host to give you that=20
> name, which in
> turn can be the OF path if there is such a thing, or something else...
>=20
> Best might be 4 columns:
>=20
> <virq> <hwirq> <pic name> <host name>
>=20
> (PIC name is the same as in /proc/interrupts).
> =20
> > Do you prefer debugfs instead of /proc/interrupts?
>=20
> Yes, at least for now. Maybe if we can convince ourselves that nothing
> significant would break of changing /proc/interrupts, then we can add
> stuffs to it, but I'd rather avoid.
>=20

Hi, Ben,=20

How about set the host name when calling irq_alloc_host?
In the mpic, the host name can be the mpic->name, is it ok?

Thanks!
Best Regards,
Zhang Wei

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

* RE: [PATCH] Add irq host and hwirq pair fields to outputwhenshowing interrupts.
  2007-03-15  9:53       ` [PATCH] Add irq host and hwirq pair fields to outputwhenshowing interrupts Zhang Wei-r63237
@ 2007-03-15 10:22         ` Benjamin Herrenschmidt
  0 siblings, 0 replies; 6+ messages in thread
From: Benjamin Herrenschmidt @ 2007-03-15 10:22 UTC (permalink / raw)
  To: Zhang Wei-r63237; +Cc: linuxppc-dev, paulus, Wang Haiying-r54964


> > Yes, at least for now. Maybe if we can convince ourselves that nothing
> > significant would break of changing /proc/interrupts, then we can add
> > stuffs to it, but I'd rather avoid.
> > 
> 
> Hi, Ben, 
> 
> How about set the host name when calling irq_alloc_host?
> In the mpic, the host name can be the mpic->name, is it ok?

For MPIC it should probably be the OF full path

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

end of thread, other threads:[~2007-03-15 10:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-13  3:19 [PATCH] Add irq host and hwirq pair fields to output when showing interrupts Zhang Wei
2007-03-13  7:14 ` Benjamin Herrenschmidt
2007-03-13  9:32   ` [PATCH] Add irq host and hwirq pair fields to output whenshowing interrupts Zhang Wei-r63237
2007-03-13 13:52     ` Benjamin Herrenschmidt
2007-03-15  9:53       ` [PATCH] Add irq host and hwirq pair fields to outputwhenshowing interrupts Zhang Wei-r63237
2007-03-15 10:22         ` Benjamin Herrenschmidt

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