From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from e28smtp08.in.ibm.com (e28smtp08.in.ibm.com [122.248.162.8]) (using TLSv1 with cipher CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 62D5D1A001D for ; Thu, 14 May 2015 06:17:15 +1000 (AEST) Received: from /spool/local by e28smtp08.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 14 May 2015 01:47:12 +0530 Received: from d28relay03.in.ibm.com (d28relay03.in.ibm.com [9.184.220.60]) by d28dlp02.in.ibm.com (Postfix) with ESMTP id 96B1B394004E for ; Thu, 14 May 2015 01:47:09 +0530 (IST) Received: from d28av01.in.ibm.com (d28av01.in.ibm.com [9.184.220.63]) by d28relay03.in.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t4DKH8sg32964828 for ; Thu, 14 May 2015 01:47:08 +0530 Received: from d28av01.in.ibm.com (localhost [127.0.0.1]) by d28av01.in.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t4DKH579010349 for ; Thu, 14 May 2015 01:47:06 +0530 Message-ID: <5553B140.4090401@linux.vnet.ibm.com> Date: Thu, 14 May 2015 01:47:04 +0530 From: Vipin K Parashar MIME-Version: 1.0 To: Michael Ellerman Subject: Re: [PATCH v2 1/2] powerpc/powernv: Add poweroff (EPOW, DPO) events support for PowerNV platform References: <1430991020-7556-1-git-send-email-vipin@linux.vnet.ibm.com> <1430991020-7556-2-git-send-email-vipin@linux.vnet.ibm.com> <1431326992.31935.1.camel@ellerman.id.au> In-Reply-To: <1431326992.31935.1.camel@ellerman.id.au> Content-Type: text/plain; charset=utf-8; format=flowed Cc: stewart@linux.vnet.ibm.com, linuxppc-dev@lists.ozlabs.org, joel@jms.id.au List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On 05/11/2015 12:19 PM, Michael Ellerman wrote: > 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() > > Thoughts? Will make changes as per suggested design above and sent out patch. > > cheers > >