CVSROOT:        /cvs
Module name:    src
Changes by:     patr...@cvs.openbsd.org 2020/07/14 10:01:08

Modified files:
        sys/arch/arm64/dev: agintc.c 

Log message:
Add support for routing interrupts to other CPUs in agintc(4).  Most of the
supporting code was already there.  The driver supports establishing multiple
handlers on the same pin.  Make sure that a single pin can only be established
on a specific core by recording the struct cpu_info * of the first establish,
and returning NULL if someone tries to share the pin with a different core.

For LPIs, typically used for MSIs, the routing is done by targetting an LPI
to a specific "collection".  We create a collection per core, indexing it by
cpu_number().

For this we need to know a CPU's "processor number", unless GITS_TYPER_PTA is
set.  Since we now attach CPUs early, and the redistributors are not banked,
we can retrieve that information early on.  It's important to move this as far
up as possible, as it's not as easy as on ampintc(4) to re-route LPIs.

To establish an LPI on a different core, we now only have the pass the CPU's
number as part of the map command which is sent to the hardware.

Prompted by dlg@
ok kettenis@

Reply via email to