• Sudeep Holla's avatar
    arm64: use cpu_online_mask when using forced irq_set_affinity · 601c9421
    Sudeep Holla authored
    Commit 01f8fa4f("genirq: Allow forcing cpu affinity of interrupts")
    enabled the forced irq_set_affinity which previously refused to route an
    interrupt to an offline cpu.
    
    Commit ffde1de6("irqchip: Gic: Support forced affinity setting")
    implements this force logic and disables the cpu online check for GIC
    interrupt controller.
    
    When __cpu_disable calls migrate_irqs, it disables the current cpu in
    cpu_online_mask and uses forced irq_set_affinity to migrate the IRQs
    away from the cpu but passes affinity mask with the cpu being offlined
    also included in it.
    
    When calling irq_set_affinity with force == true in a cpu hotplug path,
    the caller must ensure that the cpu being offlined is not present in the
    affinity mask or it may be selected as the target CPU, leading to the
    interrupt not being migrated.
    
    This patch uses cpu_online_mask when using forced irq_set_affinity so
    that the IRQs are properly migrated away.
    Signed-off-by: default avatarSudeep Holla <sudeep.holla@arm.com>
    Acked-by: default avatarMark Rutland <mark.rutland@arm.com>
    Cc: Will Deacon <will.deacon@arm.com>
    Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
    601c9421
irq.c 3.89 KB