freebsd-skq/sys/i386
nwhitehorn 89d01c24d1 Replace a number of conflations of mp_ncpus and mp_maxid with either
mp_maxid or CPU_FOREACH() as appropriate. This fixes a number of places in
the kernel that assumed CPU IDs are dense in [0, mp_ncpus) and would try,
for example, to run tasks on CPUs that did not exist or to allocate too
few buffers on systems with sparse CPU IDs in which there are holes in the
range and mp_maxid > mp_ncpus. Such circumstances generally occur on
systems with SMT, but on which SMT is disabled. This patch restores system
operation at least on POWER8 systems configured in this way.

There are a number of other places in the kernel with potential problems
in these situations, but where sparse CPU IDs are not currently known
to occur, mostly in the ARM machine-dependent code. These will be fixed
in a follow-up commit after the stable/11 branch.

PR:		kern/210106
Reviewed by:	jhb
Approved by:	re (glebius)
2016-07-06 14:09:49 +00:00
..
acpica If x86 CPU implementation of the MWAIT instruction reasonably 2015-05-09 12:28:48 +00:00
bios Make it explicit that D_MEM cdevsw d_flag is to signify that the 2016-05-01 17:46:56 +00:00
conf Native PCI-express HotPlug support. 2016-05-05 22:26:23 +00:00
i386 Update comments for the MD functions managing contexts for new 2016-06-16 12:05:44 +00:00
ibcs2 X86: use our nitems() macro when it is avaliable through param.h. 2016-04-19 23:41:46 +00:00
include Replace a number of conflations of mp_ncpus and mp_maxid with either 2016-07-06 14:09:49 +00:00
isa Migrate many bus_alloc_resource() calls to bus_alloc_resource_anywhere(). 2016-02-27 03:38:01 +00:00
linux Regen after r300359 (struct l_sched_param removal). 2016-05-21 08:03:13 +00:00
pci As <machine/pmap.h> is included from <vm/pmap.h>, there is no need to 2016-02-22 09:02:20 +00:00
svr4 sys: use our roundup2/rounddown2() macros when param.h is available. 2016-04-21 19:57:40 +00:00
xbox After r261980, the local ptr variable in xbox_init() is no longer used, 2014-02-16 22:48:36 +00:00
Makefile