[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v2 08/10] xen/arm: Release timer interrupts when CPU is hot-unplugged



Hi Julien,

You may have missed this one. Should we try using notifiers here as well?

Thanks,
Mirela

On Fri, Apr 20, 2018 at 2:25 PM, Mirela Simonovic
<mirela.simonovic@xxxxxxxxxx> wrote:
> When a CPU is hot-unplugged timer interrupts have to be released
> in order to free the memory that was allocated when the interrupts
> were requested (using request_irq()). The request_irq is called
> for each timer interrupt when the CPU gets hotplugged
> (start_secondary->init_timer_interrupt->request_irq).
>
> Signed-off-by: Mirela Simonovic <mirela.simonovic@xxxxxxxxxx>
>
> ---
> CC: Stefano Stabellini <sstabellini@xxxxxxxxxx>
> CC: Julien Grall <julien.grall@xxxxxxx>
> ---
>  xen/arch/arm/smpboot.c     | 1 +
>  xen/arch/arm/time.c        | 7 +++++++
>  xen/include/asm-arm/time.h | 6 ++++++
>  3 files changed, 14 insertions(+)
>
> diff --git a/xen/arch/arm/smpboot.c b/xen/arch/arm/smpboot.c
> index 449fefc77d..b4ed479dc6 100644
> --- a/xen/arch/arm/smpboot.c
> +++ b/xen/arch/arm/smpboot.c
> @@ -386,6 +386,7 @@ void __cpu_disable(void)
>       * in respective init interrupt functions called from start_secondary)
>       */
>      deinit_maintenance_interrupt();
> +    deinit_timer_interrupt();
>
>      /* It's now safe to remove this processor from the online map */
>      cpumask_clear_cpu(cpu, &cpu_online_map);
> diff --git a/xen/arch/arm/time.c b/xen/arch/arm/time.c
> index c11fcfeadd..1d9dc16f89 100644
> --- a/xen/arch/arm/time.c
> +++ b/xen/arch/arm/time.c
> @@ -312,6 +312,13 @@ void init_timer_interrupt(void)
>      check_timer_irq_cfg(timer_irq[TIMER_PHYS_NONSECURE_PPI], "NS-physical");
>  }
>
> +void deinit_timer_interrupt(void)
> +{
> +    release_irq(timer_irq[TIMER_HYP_PPI], NULL);
> +    release_irq(timer_irq[TIMER_VIRT_PPI], NULL);
> +    release_irq(timer_irq[TIMER_PHYS_NONSECURE_PPI], NULL);
> +}
> +
>  /* Wait a set number of microseconds */
>  void udelay(unsigned long usecs)
>  {
> diff --git a/xen/include/asm-arm/time.h b/xen/include/asm-arm/time.h
> index 5b9a31de91..6fa4c47532 100644
> --- a/xen/include/asm-arm/time.h
> +++ b/xen/include/asm-arm/time.h
> @@ -34,6 +34,12 @@ unsigned int timer_get_irq(enum timer_ppi ppi);
>  /* Set up the timer interrupt on this CPU */
>  extern void init_timer_interrupt(void);
>
> +/*
> + * Revert actions done in init_timer_interrupt that are required to properly
> + * disable this CPU.
> + */
> +extern void deinit_timer_interrupt(void);
> +
>  /* Counter value at boot time */
>  extern uint64_t boot_count;
>
> --
> 2.13.0
>

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.