Skip to content

Commit 7443813

Browse files
Marc ZyngierKAGA-KOKO
authored andcommitted
irqchip/apple-aic: Drop support for custom PMU irq partitions
Similarly to what has been done for GICv3, drop the irq partitioning support from the AIC driver, effectively merging the two per-cpu interrupts for the PMU. Signed-off-by: Marc Zyngier <maz@kernel.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Tested-by: Will Deacon <will@kernel.org> Reviewed-by: Sven Peter <sven@kernel.org> Link: https://patch.msgid.link/20251020122944.3074811-23-maz@kernel.org
1 parent 64b9738 commit 7443813

1 file changed

Lines changed: 7 additions & 21 deletions

File tree

drivers/irqchip/irq-apple-aic.c

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -578,16 +578,9 @@ static void __exception_irq_entry aic_handle_fiq(struct pt_regs *regs)
578578
}
579579

580580
if ((read_sysreg_s(SYS_IMP_APL_PMCR0_EL1) & (PMCR0_IMODE | PMCR0_IACT)) ==
581-
(FIELD_PREP(PMCR0_IMODE, PMCR0_IMODE_FIQ) | PMCR0_IACT)) {
582-
int irq;
583-
if (cpumask_test_cpu(smp_processor_id(),
584-
&aic_irqc->fiq_aff[AIC_CPU_PMU_P]->aff))
585-
irq = AIC_CPU_PMU_P;
586-
else
587-
irq = AIC_CPU_PMU_E;
581+
(FIELD_PREP(PMCR0_IMODE, PMCR0_IMODE_FIQ) | PMCR0_IACT))
588582
generic_handle_domain_irq(aic_irqc->hw_domain,
589-
AIC_FIQ_HWIRQ(irq));
590-
}
583+
AIC_FIQ_HWIRQ(AIC_CPU_PMU_P));
591584

592585
if (static_branch_likely(&use_fast_ipi) &&
593586
(FIELD_GET(UPMCR0_IMODE, read_sysreg_s(SYS_IMP_APL_UPMCR0_EL1)) == UPMCR0_IMODE_FIQ) &&
@@ -632,18 +625,7 @@ static int aic_irq_domain_map(struct irq_domain *id, unsigned int irq,
632625
handle_fasteoi_irq, NULL, NULL);
633626
irqd_set_single_target(irq_desc_get_irq_data(irq_to_desc(irq)));
634627
} else {
635-
int fiq = FIELD_GET(AIC_EVENT_NUM, hw);
636-
637-
switch (fiq) {
638-
case AIC_CPU_PMU_P:
639-
case AIC_CPU_PMU_E:
640-
irq_set_percpu_devid_partition(irq, &ic->fiq_aff[fiq]->aff);
641-
break;
642-
default:
643-
irq_set_percpu_devid(irq);
644-
break;
645-
}
646-
628+
irq_set_percpu_devid(irq);
647629
irq_domain_set_info(id, irq, hw, &fiq_chip, id->host_data,
648630
handle_percpu_devid_irq, NULL, NULL);
649631
}
@@ -732,6 +714,10 @@ static int aic_irq_domain_translate(struct irq_domain *id,
732714
break;
733715
}
734716
}
717+
718+
/* Merge the two PMUs on a single interrupt */
719+
if (*hwirq == AIC_CPU_PMU_E)
720+
*hwirq = AIC_CPU_PMU_P;
735721
break;
736722
default:
737723
return -EINVAL;

0 commit comments

Comments
 (0)