Re: [PATCH 2/2] parisc: Remove unnecessary NULL check of the kstat_irqs field
Helge Deller <[email protected]> Sat, 25 Jul 2026 22:04:20 +0200
| Newsgroups | org.kernel.vger.linux-parisc,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
On 7/5/26 23:09, Radu Rendec wrote: > The kstat_irqs field of struct irq_desc is used to store a per-cpu count > of interrupt events. It is initialized in init_desc(), along with all > the other fields in struct irq_desc that need explicit initialization, > and therefore it's always available (non-NULL) for any valid interrupt > descriptor. >=20 > On parisc, CONFIG_SPARSE_IRQ is disabled, interrupt descriptors are > allocated statically in the irq_desc[] array, and kstat_irqs is > initialized implicitly to NULL. The kstat_irqs field is initialized > later, for all descriptors, via start_kernel() -> early_irq_init() -> > init_desc(). >=20 > smp_boot_one_cpu() is used only for CPU hotplugging. On a SMP system, > the boot CPU initializes the interrupt descriptors as described above, > and smp_boot_one_cpu() is called later, for the secondary CPU(s). >=20 > The previous patch in this series makes a similar change across the > generic IRQ code in kernel/irq/irqdesc.c, and provides a more detailed > explanation of why kstat_irqs is guaranteed to be non-NULL. >=20 > Signed-off-by: Radu Rendec <[email protected]> > --- > arch/parisc/kernel/smp.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Acked-by: Helge Deller <[email protected]>