From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from e23smtp09.au.ibm.com (e23smtp09.au.ibm.com [202.81.31.142]) (using TLSv1 with cipher CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 2B4141A0023 for ; Tue, 9 Jun 2015 00:22:03 +1000 (AEST) Received: from /spool/local by e23smtp09.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 9 Jun 2015 00:22:01 +1000 Received: from d23relay10.au.ibm.com (d23relay10.au.ibm.com [9.190.26.77]) by d23dlp03.au.ibm.com (Postfix) with ESMTP id 31F853578048 for ; Tue, 9 Jun 2015 00:22:00 +1000 (EST) Received: from d23av02.au.ibm.com (d23av02.au.ibm.com [9.190.235.138]) by d23relay10.au.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t58EKaxG47513796 for ; Tue, 9 Jun 2015 00:20:45 +1000 Received: from d23av02.au.ibm.com (localhost [127.0.0.1]) by d23av02.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t58EKCil013528 for ; Tue, 9 Jun 2015 00:20:12 +1000 Message-ID: <5575A48A.6080601@linux.vnet.ibm.com> Date: Mon, 08 Jun 2015 19:49:54 +0530 From: Vipin K Parashar MIME-Version: 1.0 To: Michael Ellerman , linuxppc-dev@lists.ozlabs.org CC: stewart@linux.vnet.ibm.com, joel@jms.id.au, vaibhav@linux.vnet.ibm.com Subject: Re: [v6] powerpc/powernv: Add poweroff (EPOW, DPO) events support for PowerNV platform References: <20150604220102.6BCFE140281@ozlabs.org> In-Reply-To: <20150604220102.6BCFE140281@ozlabs.org> Content-Type: text/plain; charset=windows-1252; format=flowed List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On 06/05/2015 03:31 AM, Michael Ellerman wrote: > 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; >> + } Thanks for catching it. EPOW, DPO doesn't exist for BMC and thus we shouldn't be hitting this path on BMC/mambo. Bug exists below down where we check for epow device-tree node . This bug got introduced with this version of patch when i renamed epow_dpo_supported flag with supported flag and re-organized code. Will send out fix for this. Above if cond is also isn't prefect so will fix it too with new patch. For FSP systems please use below FW patch to make it avoid notifications which doesn't cause EPOW. Its already in recent skiboot tree. Commit id 1954251ca83b8a458193e629d15da06d00643ae8 https://patchwork.ozlabs.org/patch/472303/ > > This also makes me think you probably haven't tested this on a BMC machine? > > cheers >