[PATCH v6] powerpc/powernv: Poweroff (EPOW, DPO) events support for PowerNV platform

Vipin K Parashar vipin at linux.vnet.ibm.com
Thu Jun 4 22:03:16 AEST 2015


This patch adds support for FSP (Flexible Service Processor)
EPOW (Early Power Off Warning) and DPO (Delayed Power Off) events for
the PowerNV platform. EPOW events are generated by FSP due to various
critical system conditions that require system shutdown. A few examples
of these conditions are high ambient temperature or system running on
UPS power with low UPS battery. DPO event is generated in response to
admin initiated system shutdown request. Upon receipt of EPOW and DPO
events the host kernel invokes orderly_poweroff() for performing
graceful system shutdown.

Reviewed-by: Joel Stanley <joel at jms.id.au>
Reviewed-by: Vaibhav Jain <vaibhav at linux.vnet.ibm.com>
Reviewed-by: Michael Ellerman <mpe at ellerman.id.au>

Changes in v6:
 - Made below changes as suggested by Michael Ellerman on previous patch.
 - Changed EPOW, DPO notifier blocks to use opal_power_control_event()
   and enhanced opal_power_control_event() to handle EPOW and DPO events.
 - Reorganized code and added/changed few variable, function names removing
   older ones.
 - Minor cleanup like removing unused headers, blank lines etc.

Changes in v5:
 - Made changes to address review comments on previous patch.

Changes in v4:
 - Made changes to address review comments on previous patch.

Changes in v3:
 - Made changes to immediately call orderly_poweroff upon receipt of
   OPAL EPOW, DPO notifications.
 - Made code changes to address review comments on previous patch.
 - Made code changes to use existing OPAL EPOW API.
 - Removed patch to extract EPOW event timeout from OPAL device-tree.

Changes in v2:
 - Made code changes to improve code as per previous review comments.
 - Added patch to obtain EPOW event timeout values from OPAL device-tree.

Vipin K Parashar (1):
  powerpc/powernv: Add poweroff (EPOW, DPO) events support for PowerNV
    platform

 arch/powerpc/include/asm/opal-api.h            |  40 ++++++++
 arch/powerpc/include/asm/opal.h                |   3 +-
 arch/powerpc/platforms/powernv/opal-power.c    | 125 +++++++++++++++++++++----
 arch/powerpc/platforms/powernv/opal-wrappers.S |   1 +
 4 files changed, 152 insertions(+), 17 deletions(-)

-- 
1.9.3



More information about the Linuxppc-dev mailing list