Skip to content
Permalink
Browse files
irq-apple-fiq: FIQ code adjustments
In Apple M1 ARM64 SoCs, many interrupts are FIQs (fast IRQs) rather
than "real" IRQs. Those used to be handled by the IRQ driver, but it
makes more sense to have a separate driver as there are no
interdependencies. Like the IRQ driver, irq-apple-fiq relies on an
external vIPI layer since it doesn't provide a sufficient number of
IPIs.

A cpuhotplug state was added so CPUs don't come online with pending
FIQs, which would crash them as soon as the F flag in the PSTATE word
is cleared.

Signed-off-by: Pip Cet <pipcet@gmail.com>
  • Loading branch information
pipcet committed Aug 11, 2021
1 parent 1d4c717 commit 44401c9ad669cb9e5443a73a7b504d253dec0a8c
Show file tree
Hide file tree
Showing 3 changed files with 168 additions and 116 deletions.
@@ -175,6 +175,8 @@ static void __exception_irq_entry aic_handle_irq(struct pt_regs *regs)
* for them separately. This should never trigger if KVM is working
* properly, because it will have already taken care of clearing it
* on guest exit before this handler runs.
*
* XXX it would be nice to skip this check.
*/
if (is_kernel_in_hyp_mode() && (read_sysreg_s(SYS_ICH_HCR_EL2) & ICH_HCR_EN) &&
read_sysreg_s(SYS_ICH_MISR_EL2) != 0) {
@@ -504,8 +506,8 @@ static int __init aic_of_ic_init(struct device_node *node, struct device_node *p

vgic_set_kvm_info(&vgic_info);

pr_info("Initialized with %d IRQs, %d FIQs, %d vIPIs\n",
irqc->nr_hw, AIC_NR_FIQ, AIC_NR_SWIPI);
pr_info("Initialized with %d IRQs, 1 IPI, %sused for IPI\n", irqc->nr_hw,
use_for_ipi ? "" : "not ");

return 0;
}

0 comments on commit 44401c9

Please sign in to comment.