freebsd-skq/sys/powerpc
Nathan Whitehorn 96c85efb4b 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
..
aim Do not rely on firmware having pre-enabled the MMU in a reasonable way for 2016-06-29 14:40:43 +00:00
booke sys/powerpc: make use of the howmany() macro when available. 2016-04-26 14:44:49 +00:00
conf Remove SoC-specific integrations from dTSEC, to make it SoC agnostic. 2016-07-05 06:16:42 +00:00
cpufreq Some style(9) fixes 2013-12-13 05:54:25 +00:00
fpu Fix build of powerpc FPU emulator after changes in r295132 to restore the 2016-02-04 17:43:56 +00:00
include Replace a number of conflations of mp_ncpus and mp_maxid with either 2016-07-06 14:09:49 +00:00
mambo CALLOUT_MPSAFE has lost its meaning since r141428, i.e., for more than ten 2015-05-22 17:05:21 +00:00
mikrotik Create a RouterBoard platform and use it to create a flash map 2015-08-22 05:50:18 +00:00
mpc85xx Unbreak the LBC driver, broken with the large RMan and 36-bit physical address changes. 2016-07-05 06:14:23 +00:00
ofw Add a bus_null_rescan() method that always fails with an error. 2016-04-27 17:49:42 +00:00
powermac Fix the deciKelvin to Celsius conversion in kernel. 2016-05-22 13:58:32 +00:00
powerpc Replace a number of conflations of mp_ncpus and mp_maxid with either 2016-07-06 14:09:49 +00:00
ps3 Fix the resource_list_print_type() calls to use uintmax_t. 2016-03-22 22:25:08 +00:00
pseries Use our nitems() macro when param.h is available. 2016-04-20 15:45:55 +00:00
psim Use OF_prop_free instead of direct call to free(9) 2016-05-14 20:06:38 +00:00