[PATCH 0/2] OPAL Poweroff events driver for PowerNV platform

Vipin K Parashar vipin at linux.vnet.ibm.com
Fri Apr 10 16:52:11 AEST 2015


OPAL Poweroff events driver handles poweroff events on PowerNV platform.
Currently this driver supports EPOW (Early Power Off Warning) and
Delayed Power Off (DPO) events on FSP based systems.
	EPOW events are generated by SPCN/FSP due to various critical system
conditions that need system shutdown. Few examples of these conditions are
high ambient temperature or system running on UPS power with UPS battery low.
DPO event is generated in reponse to user initiated system shutdown request.
	OPAL Poweroff events driver handles OPAL notifications for these events,
processes them, starts kernel system poweroff timers and send uevents to notify
udev. Poweroff event attributes are exposed as attributes files for platform
device opal-poweroff-events. Host userspace should add udev scripts to perform
various actions like sending event info to guests for graceful guest shutdown
and host poweroff scripts.

Below attribute files are created for platform device opal-poweroff-events:

admin_shutdown - Poweroff needed due to admin requested shutdown
        Values as below:
        No
        Yes

power_supply - Poweroff needed due to UPS/internal battery
        Values as below:
        Normal
        UPS
        UPS-low

thermal - Poweroff needed due to high, critical ambient or internal temp
        Values as below:
        Normal
        High-ambient-temp
        Critical-ambient-temp
        High-internal-temp
        Critical-internal-temp

timeout: Time allowed for poweroff

Vipin K Parashar (2):
  powerpc/powernv: OPAL poweroff events driver for PowerNV platform
  powerpc/powernv: Add udev notification and poweroff event attributes

 arch/powerpc/include/asm/opal.h                    |  22 +
 arch/powerpc/platforms/powernv/Makefile            |   2 +-
 .../platforms/powernv/opal-poweroff-events.c       | 567 +++++++++++++++++++++
 .../platforms/powernv/opal-poweroff-events.h       |  35 ++
 arch/powerpc/platforms/powernv/opal-wrappers.S     |   3 +-
 arch/powerpc/platforms/powernv/opal.c              |   8 +-
 6 files changed, 634 insertions(+), 3 deletions(-)
 create mode 100644 arch/powerpc/platforms/powernv/opal-poweroff-events.c
 create mode 100644 arch/powerpc/platforms/powernv/opal-poweroff-events.h

--
1.9.3



More information about the Linuxppc-dev mailing list