[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v3 2/5] arm/gic: Use static irqaction
Hi Mykyta, On Fri, Oct 10, 2025 at 12:22 PM Mykyta Poturai <Mykyta_Poturai@xxxxxxxx> wrote: > > When stopping a core cpu_gic_callback is called in non-alloc > context, which causes xfree in release_irq to fail an assert. > > To fix this, switch to a statically allocated irqaction that does not > need to be freed in release_irq. > > Signed-off-by: Mykyta Poturai <mykyta_poturai@xxxxxxxx> > > v2->v3: > * no changes > > v1->v2: > * use percpu actions > --- > xen/arch/arm/gic.c | 11 +++++++++-- > 1 file changed, 9 insertions(+), 2 deletions(-) > > diff --git a/xen/arch/arm/gic.c b/xen/arch/arm/gic.c > index 260ee64cca..ed6853bb32 100644 > --- a/xen/arch/arm/gic.c > +++ b/xen/arch/arm/gic.c > @@ -386,10 +386,17 @@ void gic_dump_info(struct vcpu *v) > gic_hw_ops->dump_state(v); > } > > +DEFINE_PER_CPU_READ_MOSTLY(struct irqaction, irq_maintenance); Scope nit (MISRA C:2012 R8.8): if irq_maintenance is only used in this TU, give it internal linkage. > + > void init_maintenance_interrupt(void) > { > - request_irq(gic_hw_ops->info->maintenance_irq, 0, maintenance_interrupt, > - "irq-maintenance", NULL); > + struct irqaction *maintenance = &this_cpu(irq_maintenance); > + > + maintenance->name = "irq-maintenance"; > + maintenance->handler = maintenance_interrupt; > + maintenance->dev_id = NULL; > + maintenance->free_on_release = 0; > + setup_irq(gic_hw_ops->info->maintenance_irq, 0, maintenance); > } > > int gic_make_hwdom_dt_node(const struct domain *d, > -- > 2.34.1 > Reviewed-by: Mykola Kvach <mykola_kvach@xxxxxxxx> Best regards, Mykola
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |