freebsd-skq/sys
bde cf8a25e82e Use resume_cpus() instead of restart_cpus() to resume from ACPI suspension.
restart_cpus() worked well enough by accident.  Before this set of fixes,
resume_cpus() used the same cpuset (started_cpus, meaning CPUs directed to
restart) as restart_cpus().  resume_cpus() waited for the wrong cpuset
(stopped_cpus) to become empty, but since mixtures of stopped and suspended
CPUs are not close to working, stopped_cpus must be empty when resuming so
the wait is null -- restart_cpus just allows the other CPUs to restart and
returns without waiting.

Fix resume_cpus() to wait on a non-wrong cpuset for the ACPI case, and
add further kludges to try to keep it working for the XEN case.  It
was only used for XEN.  It waited on suspended_cpus.  This works for
XEN.  However, for ACPI, resuming is a 2-step process.  ACPI has already
woken up the other CPUs and removed them from suspended_cpus.  This
fix records the move by putting them in a new cpuset resuming_cpus.
Waiting on suspended_cpus would give the same null wait as waiting on
stopped_cpus.  Wait on resuming_cpus instead.

Add a cpuset toresume_cpus to map the CPUs being told to resume to keep
this separate from the cpuset started_cpus for mapping the CPUs being told
to restart.  Mixtures of stopped and suspended/resuming CPUs are still far
from working.  Describe new and some old cpusets in comments.

Add further kludges to cpususpend_handler() to try to avoid breaking it
for XEN.  XEN doesn't use resumectx(), so it doesn't use the second
return path for savectx(), and it goes from the suspended state directly
to the restarted state, while ACPI resume goes through the resuming state.
Enter the resuming state early for all cases so that resume_cpus can test
for being in this state and not have to worry about the intermediate
!suspended state for ACPI only.

Reviewed by:	kib
2017-12-21 09:17:48 +00:00
..
amd64 Add atomic_load(9) and atomic_store(9) operations. 2017-12-19 09:59:20 +00:00
arm If a temporary mapping is made to support EARLY_PRINTF, undo that mapping 2017-12-20 22:19:11 +00:00
arm64 Add atomic_load(9) and atomic_store(9) operations. 2017-12-19 09:59:20 +00:00
bsm sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
cam Return domain, bus, slot, and function for the transport settings in 2017-12-20 19:13:55 +00:00
cddl Don't return early for non-failure for one of the EMLINK checks. 2017-12-19 23:54:44 +00:00
compat Update Matthew Macy contact info 2017-12-19 17:59:00 +00:00
conf Add a new kernel config option, MD_ROOT_READONLY, which forces on the 2017-12-20 18:23:22 +00:00
contrib MFC: r326864 2017-12-14 23:21:31 +00:00
crypto sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
ddb ddb: fix validation of cpu id in 'set db_cpu=x' 2017-12-05 14:22:08 +00:00
dev ixgbe(4): Fix build error on i386. 2017-12-21 00:35:14 +00:00
dts dts: arm: Remove imx6 related dts 2017-12-04 13:28:56 +00:00
fs Replace one more LINK_MAX with NFS_LINK_MAX missed in r326991. 2017-12-19 22:43:39 +00:00
gdb sys/gdb: further adoption of SPDX licensing ID tags. 2017-11-27 15:16:59 +00:00
geom Avoid using bioq_* in gmirror. 2017-12-19 17:13:04 +00:00
gnu Introduce bwn(4) support for the bhnd(4) bus. 2017-12-02 02:21:27 +00:00
i386 Add atomic_load(9) and atomic_store(9) operations. 2017-12-19 09:59:20 +00:00
isa sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
kern Use resume_cpus() instead of restart_cpus() to resume from ACPI suspension. 2017-12-21 09:17:48 +00:00
kgssapi sys/kgssapi: general adoption of SPDX licensing ID tags. 2017-11-27 15:49:00 +00:00
libkern sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
mips Add atomic_load(9) and atomic_store(9) operations. 2017-12-19 09:59:20 +00:00
modules ixgbe(4): Convert driver to use iflib 2017-12-20 18:15:06 +00:00
net Don't call tcp_lro_rx() unless hardware verified TCP/UDP csum 2017-12-21 01:22:36 +00:00
net80211 [net80211] add a method for checking if a VAP WME AC has a NOACK policy or not. 2017-12-09 23:16:02 +00:00
netgraph sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
netinet Fix mbuf leak when TCPMD5_OUTPUT() method returns error. 2017-12-14 12:54:20 +00:00
netinet6 Follow the RFC6980 and silently ignore following IPv6 NDP messages 2017-12-15 12:37:32 +00:00
netipsec Do better cleaning in key_destroy() for VIMAGE case. 2017-12-01 09:59:42 +00:00
netpfil SPDX: license IDs for some ISC-related files. 2017-12-08 15:57:29 +00:00
netsmb sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
nfs sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
nfsclient sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
nfsserver sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
nlm sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
ofed sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
opencrypto We don't need both _STAND and _STANDALONE. There's more places that 2017-12-02 00:07:09 +00:00
powerpc Increase default MAXDSIZ to 32G on powerpc64 2017-12-20 16:49:45 +00:00
riscv Add atomic_load(9) and atomic_store(9) operations. 2017-12-19 09:59:20 +00:00
rpc sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
security sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
sparc64 Remove MD atomic_load_{32,64,int,long,ptr}(9) obsolete since the addition 2017-12-21 01:27:32 +00:00
sys Use resume_cpus() instead of restart_cpus() to resume from ACPI suspension. 2017-12-21 09:17:48 +00:00
teken sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
tests style(9): sort headers 2017-05-09 05:08:47 +00:00
tools embed_mfs: support embedding mfs into loader 2017-12-19 19:44:06 +00:00
ufs Rework pathconf handling for FIFOs. 2017-12-19 22:39:05 +00:00
vm Perform all accesses to uma_reclaim_needed using atomic(9) KPI. 2017-12-19 10:06:55 +00:00
x86 Use resume_cpus() instead of restart_cpus() to resume from ACPI suspension. 2017-12-21 09:17:48 +00:00
xdr sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
xen sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
Makefile Move sys/boot to stand. Fix all references to new location 2017-11-14 23:02:19 +00:00