Re: [PATCH] Incorrect MSI interrupt type name

From: Zhang, Yanmin
Date: Tue Nov 14 2006 - 03:23:25 EST


On Tue, 2006-11-14 at 15:43, Andrew Morton wrote:
> On Tue, 14 Nov 2006 15:22:57 +0800
> "Zhang, Yanmin" <yanmin_zhang@xxxxxxxxxxxxxxx> wrote:
>
> > /proc/interrupts shows "<NULL>" for MSI interrupt type name on
> > my ia64 machine.
> >
> > Below patch against 2.6.19-rc5-mm1 fixes it.
> >
> > Signed-off-by: Zhang Yanmin <yanmin.zhang@xxxxxxxxx>
> >
> > ---
> >
> > --- linux-2.6.19-rc5-mm1/arch/ia64/kernel/msi_ia64.c 2006-11-14 14:16:12.000000000 +0800
> > +++ linux-2.6.19-rc5-mm1_fix/arch/ia64/kernel/msi_ia64.c 2006-11-14 15:08:37.000000000 +0800
> > @@ -115,7 +115,7 @@ static int ia64_msi_retrigger_irq(unsign
> > * Generic ops used on most IA64 platforms.
> > */
> > static struct irq_chip ia64_msi_chip = {
> > - .name = "PCI-MSI",
> > + .typename = "PCI-MSI",
> > .mask = mask_msi_irq,
> > .unmask = unmask_msi_irq,
> > .ack = ia64_ack_msi_irq,
>
> I think the bug is that ia64 is printing ->typename, whereas it should be
> printing ->name:
A couple of other arch also use typename instead of name when printing.

In addition, function irq_chip_set_defaults will let name=typename if
name is NULL.

Is it more reasonable to delete typename completely?

>
>
> arch/ia64/kernel/iosapic.c | 2 +-
> arch/ia64/kernel/irq.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff -puN arch/ia64/kernel/iosapic.c~ia64-irqs-use-name-not-typename arch/ia64/kernel/iosapic.c
> --- a/arch/ia64/kernel/iosapic.c~ia64-irqs-use-name-not-typename
> +++ a/arch/ia64/kernel/iosapic.c
> @@ -664,7 +664,7 @@ register_intr (unsigned int gsi, int vec
> printk(KERN_WARNING
> "%s: changing vector %d from %s to %s\n",
> __FUNCTION__, vector,
> - idesc->chip->typename, irq_type->typename);
> + idesc->chip->name, irq_type->name);
> idesc->chip = irq_type;
> }
> return 0;
> diff -puN arch/ia64/kernel/irq.c~ia64-irqs-use-name-not-typename arch/ia64/kernel/irq.c
> --- a/arch/ia64/kernel/irq.c~ia64-irqs-use-name-not-typename
> +++ a/arch/ia64/kernel/irq.c
> @@ -76,7 +76,7 @@ int show_interrupts(struct seq_file *p,
> seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]);
> }
> #endif
> - seq_printf(p, " %14s", irq_desc[i].chip->typename);
> + seq_printf(p, " %14s", irq_desc[i].chip->name);
> seq_printf(p, " %s", action->name);
>
> for (action=action->next; action; action = action->next)
> _
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/