|INTRMAP_CREATE(9)||Kernel Developer's Manual||INTRMAP_CREATE(9)|
— interrupt to CPU mapping API
struct intrmap *
intrmap_create(const struct device
*dv, unsigned int nintr,
unsigned int maxintr, unsigned int
struct cpu_info *
intrmap *im, unsigned int
The interrupt to CPU mapping API supports the use of multiple CPUs by hardware drivers. Drivers that can use multiple interrupts use the API to request a set of CPUs that they can establish those interrupts on. The API limits the requested number of interrupts to what is available on the system, and attempts to distribute the requested interrupts over those CPUs. On some platforms the API will filter the set of available CPUs.
allocates an interrupt map data structure for use by the driver identified
by dv. The number of interrupts the hardware supports
is specified via the nintr argument. The driver
supplies the maximum number of interrupts it can support via
maxintr, which, along with the number of available
CPUs at the time the function is called, is used as a constraint on the
number of requested interrupts. nintr may be zero to
use the driver limit as the number of requested interrupts. The
flags argument may have the following defines OR'ed
frees the memory associated with the interrupt map data structure passed via
returns the number of interrupts that the driver can establish according to
the im interrupt map.
returns which CPU the interrupt specified in index
should be established on according to the im interrupt
map. Interrupts are identified as a number from 0 to the value returned by
intrmap_cpu() can be called during autoconf, or from
intrmap_create() returns a pointer to an
interrupt mapping structure on success, or
intrmap_count() returns the number of
interrupts that were allocated for the driver to use.
intrmap_cpu() returns a pointer to the
cpu_info structure for the CPU that the interrupt should be established
The interrupt mapping API is based on the if_ringmap API in DragonFly. It was ported to OpenBSD 6.8 by David Gwynne <firstname.lastname@example.org>.
|June 17, 2020||OpenBSD-current|