Interrupts on all CPUs

Andrew Turner andrew at
Thu Jul 23 17:32:15 UTC 2015

We have a problem on ARM where some interrupts need to be unmasked on
all CPUs in an SMP environment. The main place we need this is with the
timer driver as the hardware can send interrupts to the requested CPU.

Until now we have hacked around this by unmasking the three interrupts
the timer hardware uses when we enable the non-boot CPU. Luckily these
interrupts values have been common across all SoCs, however there is no
requirement for this to be the case.

To fix this I'm proposing adding a flag to bus_setup_intr to add
support for per-cpu interrupts. The architecture code is then expected
to perform whatever is needed to handle this.

I have attached a proof of concept patch that adds support to arm64 for
this. When we setup an interrupt with the flag set it will record this
so when the non-boot CPUs are enabled they can unmask the interrupt. It
will then signal to any running CPUs to unmask the given interrupt.

I would expect this could be extended to other architectures, however I
only know the arm and arm64 code, and am only able to test there.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-WIP-Allow-per-cpu-interrupts.patch
Type: text/x-patch
Size: 4349 bytes
Desc: not available
URL: <>

More information about the freebsd-arch mailing list