History

drivers/perf: arm_pmu: Request PMU SPIs with IRQF_PER_CPU

Since the PMU register interface is banked per CPU, CPU PMU interrrupts cannot be handled by a CPU other than the one with the PMU asserting the interrupt. This means that migrating PMU SPIs, as we do during a CPU hotplug operation doesn't make any sense and can lead to the IRQ being disabled entirely if we route a spurious IRQ to the new affinity target. This has been observed in practice on AMD Seattle, where CPUs on the non-boot cluster appear to take a spurious PMU IRQ when coming online, which is routed to CPU0 where it cannot be handled. This patch passes IRQF_PERCPU for PMU SPIs and forcefully sets their affinity prior to requesting them, ensuring that they cannot be migrated during hotplug events. This interacts badly with the DB8500 erratum workaround that ping-pongs the interrupt affinity from the handler, so we avoid passing IRQF_PERCPU in that case by allowing the IRQ flags to be overridden in the platdata.

Will Deacon committed 9 years ago

Commit a3287c41 parent d0153c73 files · +32 −14Browse files

Showing the changes to include/linux/perf (1 of 3 files). Show all

Unified · Split

include/linux/perf/arm_pmu.h+4−0
@@ -24,10 +24,14 @@ · 23 unmodified lines
2424 * interrupt and passed the address of the low level handler,
2525 * and can be used to implement any platform specific handling
2626 * before or after calling it.
27+ *
28+ * @irq_flags: if non-zero, these flags will be passed to request_irq
29+ * when requesting interrupts for this PMU device.
2730 */
2831 struct arm_pmu_platdata {
2932 irqreturn_t (*handle_irq)(int irq, void *dev,
3033 irq_handler_t pmu_handler);
34+ unsigned long irq_flags;
3135 };
3236
3337 #ifdef CONFIG_ARM_PMU

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t