[Skiboot] [PATCH 0/9] p9_stop_api error handling

Akshay Adiga akshay.adiga at linux.vnet.ibm.com
Thu Jan 4 22:27:57 AEDT 2018

From: Akshay Adiga <aks at aksadiga.ibm>

This patch series adds error handling for p9_stop_api. Following are
the features that the series adds :
 - stop api calls will only be attempted if there is real reason to do so.
 - If stop api calls fail at init, deeper states will not be exposed in
device tree.
 - stop api calls will be ignored if it does not have deep states enabled
 and return sucess.
 - if stop api fails at run time, all futher calls will be returned as
failure without attempting.

There are 3 states that a wakeup_engine can have (wakeup_engine_state) :
- WAKEUP_ENGINE_NOT_PRESENT : Homer base is not set
- WAKEUP_ENGINE_FAILED : stop api returned error sometime in the past.
- WAKEUP_ENGINE_PRESENT : Homer base is present and till now stop api
 has succeeded

Discover if stop-enabled-bits has any states that requires wakeup engine.
and set it in the global variable :
- has_deep_states

if ( has_deep_states == false) :
 - No need to call stop api.

else if ( wakeup_engine_state != WAKEUP_ENGINE_PRESENT ) :
 - Return fail without attempting stop api.

else If ( wakeup_engine_state ==  WAKEUP_ENGINE_PRESENT ) : 
 - Actually call stop api
 - If it fails, mark wakeup_engine_state = WAKEUP_ENGINE_FAILED

if (wakeup_engine_state == WAKEUP_ENGINE_FAILED) before device-tree creation
 - set has_deep_states = false;
 - don't add deep states in device-tree.

Akshay Adiga (9):
  SLW: Delay cpuidle device-tree creation
  SLW: Split init functions
  SLW: Call slw_late_init_p{8,9} only when has_wakeup_engine is set
  SLW: Use wakeup_engine state to handle errors in wakeup engine
  SLW: Move MAMBO simulator checks to slw_init
  SLW: Detect if deep states are enabled
  SLW: Call p9_stop_api only if deep_states are enabled
  SCOM restore for DARN and XIVE
  SLW: Add p9_stop_api calls for IMC

 core/opal.c       |   1 -
 hw/imc.c          |  40 ++++++++++++++
 hw/nx.c           |  42 +++++++++++++++
 hw/slw.c          | 159 ++++++++++++++++++++++++++++++++++--------------------
 hw/xive.c         |  30 +++++++++++
 include/skiboot.h |  13 +++++
 6 files changed, 227 insertions(+), 58 deletions(-)


More information about the Skiboot mailing list