aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/perf/arm_pmu_acpi.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/perf/arm_pmu_acpi.c b/drivers/perf/arm_pmu_acpi.c
index 34c862f213c7..0a9b78705ee8 100644
--- a/drivers/perf/arm_pmu_acpi.c
+++ b/drivers/perf/arm_pmu_acpi.c
@@ -29,6 +29,17 @@ static int arm_pmu_acpi_register_irq(int cpu)
29 return -EINVAL; 29 return -EINVAL;
30 30
31 gsi = gicc->performance_interrupt; 31 gsi = gicc->performance_interrupt;
32
33 /*
34 * Per the ACPI spec, the MADT cannot describe a PMU that doesn't
35 * have an interrupt. QEMU advertises this by using a GSI of zero,
36 * which is not known to be valid on any hardware despite being
37 * valid per the spec. Take the pragmatic approach and reject a
38 * GSI of zero for now.
39 */
40 if (!gsi)
41 return 0;
42
32 if (gicc->flags & ACPI_MADT_PERFORMANCE_IRQ_MODE) 43 if (gicc->flags & ACPI_MADT_PERFORMANCE_IRQ_MODE)
33 trigger = ACPI_EDGE_SENSITIVE; 44 trigger = ACPI_EDGE_SENSITIVE;
34 else 45 else