freebsd-nq/sys/x86
John Baldwin bc153c692f Add a new bus method to fetch device-specific CPU sets.
bus_get_cpus() returns a specified set of CPUs for a device.  It accepts
an enum for the second parameter that indicates the type of cpuset to
request.  Currently two valus are supported:

 - LOCAL_CPUS (on x86 this returns all the CPUs in the package closest to
   the device when DEVICE_NUMA is enabled)
 - INTR_CPUS (like LOCAL_CPUS but only returns 1 SMT thread for each core)

For systems that do not support NUMA (or if it is not enabled in the kernel
config), LOCAL_CPUS fails with EINVAL.  INTR_CPUS is mapped to 'all_cpus'
by default.  The idea is that INTR_CPUS should always return a valid set.

Device drivers which want to use per-CPU interrupts should start using
INTR_CPUS instead of simply assigning interrupts to all available CPUs.
In the future we may wish to add tunables to control the policy of
INTR_CPUS (e.g. should it be local-only or global, should it ignore
SMT threads or not).

The x86 nexus driver exposes the internal set of interrupt CPUs from the
the x86 interrupt code via INTR_CPUS.

The ACPI bus driver and PCI bridge drivers use _PXM to return a suitable
LOCAL_CPUS set when _PXM exists and DEVICE_NUMA is enabled.  They also and
the global INTR_CPUS set from the nexus driver with the per-domain set from
_PXM to generate a local INTR_CPUS set for child devices.

Reviewed by:	wblock (manpage)
Differential Revision:	https://reviews.freebsd.org/D5519
2016-05-02 18:00:38 +00:00
..
acpica Add a new bus method to fetch device-specific CPU sets. 2016-05-02 18:00:38 +00:00
bios
cpufreq Cleanup unnecessary semicolons from the kernel. 2016-04-10 23:07:00 +00:00
include Add x86 CPU features definitions published in the Intel SDM rev. 58. 2016-04-16 06:07:13 +00:00
iommu sys: use our roundup2/rounddown2() macros when param.h is available. 2016-04-21 19:57:40 +00:00
isa atrtc: export function to set RTC 2016-05-02 16:14:55 +00:00
pci Convert rman to use rman_res_t instead of u_long 2016-01-27 02:23:54 +00:00
x86 Add a new bus method to fetch device-specific CPU sets. 2016-05-02 18:00:38 +00:00
xen xen: Set ipi_{alloc,free} even for UP 2016-04-07 07:00:00 +00:00