Re: [PATCH 3/4] irqchip/gic: Use GIC_* DT binding definitions
From: Marc Zyngier
Date: Thu Mar 05 2026 - 05:39:08 EST
On Thu, 05 Mar 2026 10:24:23 +0000,
Geert Uytterhoeven <geert@xxxxxxxxxxxxxx> wrote:
>
> Hi Marc,
>
> On Thu, 5 Mar 2026 at 11:13, Marc Zyngier <maz@xxxxxxxxxx> wrote:
> > On Wed, 04 Mar 2026 17:21:58 +0000,
> > Geert Uytterhoeven <geert+renesas@xxxxxxxxx> wrote:
> > > Replace magic numbers by symbolic DT binding definitions. This improves
> > > readability, and makes it easier to find where the various GIC
> > > interrupts types are handled.
> > >
> > > Signed-off-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
>
> > > --- a/drivers/irqchip/irq-gic-v3.c
> > > +++ b/drivers/irqchip/irq-gic-v3.c
> > > @@ -35,6 +35,8 @@
> > > #include <asm/smp_plat.h>
> > > #include <asm/virt.h>
> > >
> > > +#include <dt-bindings/interrupt-controller/arm-gic.h>
> > > +
> > > #include "irq-gic-common.h"
> > >
> > > static u8 dist_prio_irq __ro_after_init = GICV3_PRIO_IRQ;
> > > @@ -1602,25 +1604,25 @@ static int gic_irq_domain_translate(struct irq_domain *d,
> > > return -EINVAL;
> > >
> > > switch (fwspec->param[0]) {
> > > - case 0: /* SPI */
> > > + case GIC_SPI:
> >
> > I'd rather not do that. I use *numeric* values on purpose, because
> > that's what the DT *binding* describes, and I have no control over
> > what lives in that include file (it gets changed without me being even
> > Cc'd).
> >
> > So I want to stick to the binding, and not to the interpretation of
> > it. If you want symbolic values to be used, describe them in the
> > binding, have a tool to generate the values from the binding, and use
> > that everywhere.
>
> This sounds more like a philosophical debate, so I'd like to defer
> to the DT maintainers...
That's not philosophical.
That's a pragmatic approach to having a common source of information,
and a unique reference. Carrying an extra copy that can be
independently changed is a source of errors, which I've been trying to
reduce in other parts of the kernel (system register description and
encoding, for example).
>
> About you not being notified: that can be fixed easily ;-)
>
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -2110,6 +2110,7 @@ F: arch/arm64/include/asm/arch_gicv3.h
> F: drivers/irqchip/irq-gic*.[ch]
> F: include/linux/irqchip/arm-gic*.h
> F: include/linux/irqchip/arm-vgic-info.h
> +F: include/dt-bindings/interrupt-controller/arm-gic.h
I'm actively trying to *remove* myself from the kernel, not to grab
more stuff.
Thanks,
M.
--
Without deviation from the norm, progress is not possible.