diff options
author | Nicholas Piggin <npiggin@gmail.com> | 2017-11-29 15:37:01 +1000 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2017-12-03 22:10:55 -0600 |
commit | 0d84ea6bda03a00a1765dd7240a9e5231a537e96 (patch) | |
tree | f3b3b27baa34392bb77dece570087d871ae71f99 /include/opal-internal.h | |
parent | 602c6d44a302aedb02065934ab8db57311261654 (diff) | |
download | skiboot-0d84ea6bda03a00a1765dd7240a9e5231a537e96.zip skiboot-0d84ea6bda03a00a1765dd7240a9e5231a537e96.tar.gz skiboot-0d84ea6bda03a00a1765dd7240a9e5231a537e96.tar.bz2 |
core: Add support for quiescing OPAL
Quiescing is ensuring all host controlled CPUs (except the current
one) are out of OPAL and prevented from entering. This can be use in
debug and shutdown paths, particularly with system reset sequences.
This patch adds per-CPU entry and exit tracking for OPAL calls, and
adds logic to "hold" or "reject" at entry time, if OPAL is quiesced.
An OPAL call is added, to expose the functionality to Linux, where it
can be used for shutdown, kexec, and before generating sreset IPIs for
debugging (so the debug code does not recurse into OPAL).
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'include/opal-internal.h')
-rw-r--r-- | include/opal-internal.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/opal-internal.h b/include/opal-internal.h index 583e999..8d3d0a1 100644 --- a/include/opal-internal.h +++ b/include/opal-internal.h @@ -61,6 +61,8 @@ extern void add_opal_node(void); (func), (nargs)) extern void __opal_register(uint64_t token, void *func, unsigned num_args); +int64_t opal_quiesce(uint32_t shutdown_type, int32_t cpu); + /* Warning: no locking at the moment, do at init time only * * XXX TODO: Add the big RCU-ish "opal API lock" to protect us here |