[PATCH v2 1/2] powerpc/powernv: Add poweroff (EPOW, DPO) events support for PowerNV platform

Michael Ellerman mpe at ellerman.id.au
Mon May 11 16:49:52 AEST 2015

On Thu, 2015-05-07 at 15:00 +0530, Vipin K Parashar wrote:
> This patch adds support for FSP EPOW (Early Power Off Warning) and
> DPO (Delayed Power Off) events support for PowerNV platform.  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 low UPS battery. DPO event
> is generated in response to admin initiated system shutdown request.
> 	This patch enables host kernel on PowerNV platform to handle OPAL
> notifications for these events and initiate system poweroff. Since EPOW
> notifications are sent in advance of impending shutdown event and thus
> this patch also adds functionality to wait for EPOW condition to return to
> normal. Host allows MAX_POWEROFF_SYS_TIME (600 seconds) as system
> poweroff time (time for host + guests shutdown) and waits for remaining
> time for EPOW condition to return to normal. If EPOW condition doesn't
> return to normal in calculated time it proceeds with graceful system
> shutdown. For EPOW events with smaller timeouts values than
> MAX_POWEROFF_SYS_TIME it proceeds with system shutdown without any wait
> for EPOW condition to return to normal.

Can I suggest an alternative design:
 - when we recieve a DPO event call orderly_poweroff()
 - when we recieve an EPOW event call orderly_poweroff()



More information about the Linuxppc-dev mailing list