opnsense-src/sys/powerpc/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
..
altivec.c Dump VMX registers into the userland coredump. 2015-01-03 21:06:06 +00:00
autoconf.c
bcopy.c
bus_machdep.c Remove TNF license clauses 3 and 4, matching upstream 2014-01-01 20:04:43 +00:00
busdma_machdep.c Revert r291142. 2015-11-23 11:19:00 +00:00
clock.c sys/powerpc: make use of the howmany() macro when available. 2016-04-26 14:44:49 +00:00
copyinout.c Use setjmp() instead of the identical-except-for-having-a-wrong-prototype 2016-01-10 16:42:14 +00:00
copystr.c
cpu.c Bring CPU features list in line with the ABI requirements. 2016-01-02 18:15:10 +00:00
db_disasm.c powerpc: for pointers replace 0 with NULL. 2016-04-15 14:25:13 +00:00
db_hwwatch.c
db_interface.c Write 2- and 4-byte aligned values as single writes in ddb(4) 2015-11-06 04:56:52 +00:00
db_trace.c Use our nitems() macro when param.h is available. 2016-04-20 15:45:55 +00:00
dump_machdep.c Factor out duplicated code from dumpsys() on each architecture into generic 2015-01-07 01:01:39 +00:00
elf32_machdep.c powerpc: for pointers replace 0 with NULL. 2016-04-15 14:25:13 +00:00
elf64_machdep.c powerpc: for pointers replace 0 with NULL. 2016-04-15 14:25:13 +00:00
exec_machdep.c Update comments for the MD functions managing contexts for new 2016-06-16 12:05:44 +00:00
fpu.c Kernel support for the Vector-Scalar eXtension (VSX) found on the POWER7 2015-02-22 21:40:27 +00:00
fuswintr.c
gdb_machdep.c
genassym.c Fix SMP booting for PowerPC Book-E 2016-04-19 01:48:18 +00:00
in_cksum.c
interrupt.c Merge booke and aim interrupt.c files. 2015-07-06 05:08:57 +00:00
intr_machdep.c Add support for the Freescale dTSEC DPAA-based ethernet controller. 2016-02-29 03:38:00 +00:00
iommu_if.m
machdep.c Fix fat-fingering: #if AIM should have been #ifdef AIM to avoid failures on 2016-06-29 16:34:56 +00:00
mem.c There does not seem to be any reason to acquire GIANT here. Follow amd64 2015-01-20 16:21:59 +00:00
mmu_if.m Implement pmap_change_attr() for PowerPC (Book-E only for now) 2016-02-27 20:39:36 +00:00
mp_machdep.c Replace a number of conflations of mp_ncpus and mp_maxid with either 2016-07-06 14:09:49 +00:00
nexus.c Use uintmax_t (typedef'd to rman_res_t type) for rman ranges. 2016-03-18 01:28:41 +00:00
openpic.c Add suspend/resume state saving for OpenPIC on PowerMac. It's likely this 2013-12-21 04:31:54 +00:00
pic_if.m Allow PIC drivers to translate firmware sense codes for themselves. This 2013-10-24 15:37:32 +00:00
platform.c Extend idle support for newer Book-E cores. 2016-01-01 02:47:40 +00:00
platform_if.m Extend idle support for newer Book-E cores. 2016-01-01 02:47:40 +00:00
pmap_dispatch.c Implement pmap_change_attr() for PowerPC (Book-E only for now) 2016-02-27 20:39:36 +00:00
ptrace_machdep.c Add Altivec/VMX register support to ptrace. 2015-01-14 07:01:21 +00:00
sc_machdep.c
setjmp.S Remove dead code and dead comments, most notably the implemenation of the 2016-01-10 18:00:01 +00:00
sigcode32.S Align signal stack pointer to 16 bytes. 2016-02-03 01:50:27 +00:00
sigcode64.S Provide support for ELFv2 userland if using a newer compiler (recent clang 2015-12-03 00:10:57 +00:00
stack_machdep.c Add stack_save_td_running(), a function to trace the kernel stack of a 2015-09-11 03:54:37 +00:00
suswintr.c
swtch32.S Save the link register in savectx(). 2015-10-06 01:24:46 +00:00
swtch64.S Make ELFv2 powerpc64 kernels build and run. Loader support will come in a 2015-11-29 07:16:08 +00:00
syncicache.c Provide $FreeBSD$ in the standard way. This fixes the build with clang 3.6. 2015-03-08 16:50:45 +00:00
sys_machdep.c
trap.c OR in the unsigned form of the MCAR lower register. 2016-04-25 03:01:57 +00:00
uio_machdep.c Delete stray clause 3 (Advertising clause) and renumber while i'm 2014-03-11 23:41:35 +00:00
uma_machdep.c Include sys/_task.h into uma_int.h, so that taskqueue.h isn't a 2016-02-09 20:22:35 +00:00
vm_machdep.c Update comments for the MD functions managing contexts for new 2016-06-16 12:05:44 +00:00