summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Zyngier <maz@kernel.org>2026-07-25 17:26:27 +0100
committerWill Deacon <will@kernel.org>2026-08-02 11:16:22 +0000
commite445816a488a66ea75f228f3b9b451aeff953250 (patch)
tree8e33f8ee1d7cc95acde28d2d8a0b6c23dce62561
parent36e200f0199192c48e563bd365fe6e88e4cb0862 (diff)
downloadlinux-next-e445816a488a66ea75f228f3b9b451aeff953250.tar.gz
linux-next-e445816a488a66ea75f228f3b9b451aeff953250.zip
perf: arm_pmu_acpi: Get rid of the edge-triggered interrupt oddity
The ACPI spec bizarrely indicates that the PMU interrupt can be edge-triggered, which contradicts the very basics of the PMU architecture (SW is required to clear the interrupt condition for the level to drop). Remove the code parsing this flag and always flag the interrupt as level triggered, no matter what firmware says. Signed-off-by: Marc Zyngier <maz@kernel.org> Reviewed-by: Zenghui Yu <yuzenghui@huawei.com> Signed-off-by: Will Deacon <will@kernel.org>
-rw-r--r--drivers/perf/arm_pmu_acpi.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/perf/arm_pmu_acpi.c b/drivers/perf/arm_pmu_acpi.c
index e80f76d95e68..ca6bf8f86cfe 100644
--- a/drivers/perf/arm_pmu_acpi.c
+++ b/drivers/perf/arm_pmu_acpi.c
@@ -22,7 +22,7 @@ static DEFINE_PER_CPU(int, pmu_irqs);
static int arm_pmu_acpi_register_irq(int cpu)
{
struct acpi_madt_generic_interrupt *gicc;
- int gsi, trigger;
+ int gsi;
gicc = acpi_cpu_get_madt_gicc(cpu);
@@ -38,11 +38,6 @@ static int arm_pmu_acpi_register_irq(int cpu)
if (!gsi)
return 0;
- if (gicc->flags & ACPI_MADT_PERFORMANCE_IRQ_MODE)
- trigger = ACPI_EDGE_SENSITIVE;
- else
- trigger = ACPI_LEVEL_SENSITIVE;
-
/*
* Helpfully, the MADT GICC doesn't have a polarity flag for the
* "performance interrupt". Luckily, on compliant GICs the polarity is
@@ -53,8 +48,12 @@ static int arm_pmu_acpi_register_irq(int cpu)
* may not match the real polarity, but that should not matter.
*
* Other interrupt controllers are not supported with ACPI.
+ *
+ * The spec also indicates that the PMU interrupt can be edge
+ * triggered, which doesn't make any sense (SW needs to clear the
+ * interrupt condition for the level to drop). Ignore the silly flag.
*/
- return acpi_register_gsi(NULL, gsi, trigger, ACPI_ACTIVE_HIGH);
+ return acpi_register_gsi(NULL, gsi, ACPI_LEVEL_SENSITIVE, ACPI_ACTIVE_HIGH);
}
static void arm_pmu_acpi_unregister_irq(int cpu)