ARM: perf: use cpumask_t to record active IRQs
commit0b390e2126e03b6ec41f96fb0550b1526d00e203
authorWill Deacon <will.deacon@arm.com>
Wed, 27 Jul 2011 14:18:59 +0000 (27 15:18 +0100)
committerWill Deacon <will.deacon@arm.com>
Wed, 31 Aug 2011 09:17:59 +0000 (31 10:17 +0100)
tree36520568e01918ab82900631c75960016ffe464c
parentb0e89590f4f27ea5ff30bdedb9a58ea904a6b353
ARM: perf: use cpumask_t to record active IRQs

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: Jamie Iles <jamie@jamieiles.com>
Reviewed-by: Jean Pihet <j-pihet@ti.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm/kernel/perf_event.c