From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ozlabs.org (ozlabs.org [103.22.144.67]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 76B511A03E5 for ; Fri, 5 Jun 2015 08:01:02 +1000 (AEST) In-Reply-To: <1433419397-3119-2-git-send-email-vipin@linux.vnet.ibm.com> To: Vipin K Parashar , linuxppc-dev@lists.ozlabs.org From: Michael Ellerman Cc: stewart@linux.vnet.ibm.com, Vipin K Parashar , joel@jms.id.au, vaibhav@linux.vnet.ibm.com Subject: Re: [v6] powerpc/powernv: Add poweroff (EPOW, DPO) events support for PowerNV platform Message-Id: <20150604220102.6BCFE140281@ozlabs.org> Date: Fri, 5 Jun 2015 08:01:02 +1000 (AEST) List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Thu, 2015-04-06 at 12:03:17 UTC, Vipin K Parashar wrote: > 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 > Reviewed-by: Vaibhav Jain > Reviewed-by: Michael Ellerman > Signed-off-by: Vipin K Parashar Hi Vipin, One issue, on mambo I'm seeing: [666973573,3] OPAL: Called with bad token 105 ! opal-power: Existing DPO event detected. reboot: Failed to start orderly shutdown: forcing the issue reboot: Power down [684431322,5] OPAL: Shutdown request type 0x0... ie. at boot it shuts down immediately. The problem is in here I think: > + /* Check for DPO event */ > + rc = opal_get_dpo_status(&opal_dpo_timeout); > + if (rc != OPAL_WRONG_STATE) { > + pr_info("Existing DPO event detected.\n"); > + return true; > + } This also makes me think you probably haven't tested this on a BMC machine? cheers