Re: [PATCH 03/10] irqchip/gic: Switch to dynamic chip name output

From: Marc Zyngier
Date: Fri Feb 11 2022 - 04:09:44 EST


On Thu, 10 Feb 2022 23:38:49 +0000,
Linus Walleij <linus.walleij@xxxxxxxxxx> wrote:
>
> On Wed, Feb 9, 2022 at 5:26 PM Marc Zyngier <maz@xxxxxxxxxx> wrote:
>
> > The last dynamic aspect of the GIC's irq_chip structure is the
> > name that is associated to it.
> >
> > Move the output of that name to the relevant callback, which
> > allows us to do a bit of cleanup and mark the structures const.
> >
> > Signed-off-by: Marc Zyngier <maz@xxxxxxxxxx>
>
> Reviewed-by: Linus Walleij <linus.walleij@xxxxxxxxxx>
>
> This naming was once introduced for the ARM PB11MPCore
> that had two cascaded GICs (commit 58b8964990dc6)
> so it became a pain to see which one
> was being used in /proc/interrupts
> arch/arm/boot/dts/arm-realview-pb11mp.dts
>
> I see it is not appreciated to use /proc/interrupts for this
> type of diagnostics. Ugh. I suppose people do it for the
> same reason they keep using the GPIO sysfs, they like
> it and they know it.

It was sort of fair game to use /proc/interrupts to track these things
when we only had that. These days, we have a whole interrupt debugging
infrastructure that is able to track hierarchies, domains and other
state. And it isn't like we're taking away the /proc/interrupts
facility at all, we only indirecting the name output it when possible.

There are also a number of advantages in keeping these data structures
read-only when possible, in addition to the memory saving associated
with only having a reference to the irq_chip structure.

Thanks,

M.

--
Without deviation from the norm, progress is not possible.