[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v1 1/4] arm/time: Use static irqaction
Hi Mykyta, On 18/09/2025 13:16, Mykyta Poturai wrote: When stopping a core deinit_timer_interrupt 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> --- xen/arch/arm/time.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/xen/arch/arm/time.c b/xen/arch/arm/time.c index e74d30d258..6f215de210 100644 --- a/xen/arch/arm/time.c +++ b/xen/arch/arm/time.c @@ -303,6 +303,20 @@ static void check_timer_irq_cfg(unsigned int irq, const char *which) "WARNING: %s-timer IRQ%u is not level triggered.\n", which, irq); }+static struct irqaction __read_mostly irq_hyp = {+ .name = "hyptimer", + .handler = htimer_interrupt, + .dev_id = NULL, + .free_on_release = 0, +}; + +static struct irqaction __read_mostly irq_virt = { + .name = "virtimer", + .handler = vtimer_interrupt, + .dev_id = NULL, + .free_on_release = 0, +}; setup_irq() will update the field "next" in irqaction. So we need one instance per call. Effectively, this means one per CPU. Therefore, we want to use DEFINE_PER_CPU. This applies to the rest of the series. Cheers, -- Julien Grall
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |