• Will Deacon's avatar
    ARM: perf: use cpumask_t to record active IRQs · 0b390e21
    Will Deacon authored
    Commit 5dfc54e0 ("ARM: GIC: avoid routing interrupts to offline CPUs")
    prevents the GIC from setting the affinity of an IRQ to a CPU with
    id >= nr_cpu_ids. This was previously abused by perf on some platforms
    where more IRQs were registered than possible CPUs.
    
    This patch fixes the problem by using a cpumask_t to keep track of the
    active (requested) interrupts in perf. The same effect could be achieved
    by limiting the number of IRQs to the number of CPUs, but using a mask
    instead will be useful for adding extended CPU hotplug support in the
    future.
    Acked-by: default avatarJamie Iles <jamie@jamieiles.com>
    Reviewed-by: default avatarJean Pihet <j-pihet@ti.com>
    Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
    0b390e21
perf_event.c 18.6 KB