From: Sasha Levin <sashal@kernel.org>
To: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Cc: stable@vger.kernel.org, Michael Ellerman <mpe@ellerman.id.au>
Subject: Re: [PATCH stable v4.4] powerpc/pseries: Do not initiate shutdown when system is running on UPS
Date: Thu, 27 Aug 2020 10:57:23 -0400 [thread overview]
Message-ID: <20200827145723.GO8670@sasha-vm> (raw)
In-Reply-To: <20200827074307.522970-1-hegdevasant@linux.vnet.ibm.com>
On Thu, Aug 27, 2020 at 01:13:07PM +0530, Vasant Hegde wrote:
>commit 90a9b102eddf6a3f987d15f4454e26a2532c1c98 upstream.
>
>As per PAPR we have to look for both EPOW sensor value and event
>modifier to identify the type of event and take appropriate action.
>
>In LoPAPR v1.1 section 10.2.2 includes table 136 "EPOW Action Codes":
>
> SYSTEM_SHUTDOWN 3
>
> The system must be shut down. An EPOW-aware OS logs the EPOW error
> log information, then schedules the system to be shut down to begin
> after an OS defined delay internal (default is 10 minutes.)
>
>Then in section 10.3.2.2.8 there is table 146 "Platform Event Log
>Format, Version 6, EPOW Section", which includes the "EPOW Event
>Modifier":
>
> For EPOW sensor value = 3
> 0x01 = Normal system shutdown with no additional delay
> 0x02 = Loss of utility power, system is running on UPS/Battery
> 0x03 = Loss of system critical functions, system should be shutdown
> 0x04 = Ambient temperature too high
> All other values = reserved
>
>We have a user space tool (rtas_errd) on LPAR to monitor for
>EPOW_SHUTDOWN_ON_UPS. Once it gets an event it initiates shutdown
>after predefined time. It also starts monitoring for any new EPOW
>events. If it receives "Power restored" event before predefined time
>it will cancel the shutdown. Otherwise after predefined time it will
>shutdown the system.
>
>Commit 79872e35469b ("powerpc/pseries: All events of
>EPOW_SYSTEM_SHUTDOWN must initiate shutdown") changed our handling of
>the "on UPS/Battery" case, to immediately shutdown the system. This
>breaks existing setups that rely on the userspace tool to delay
>shutdown and let the system run on the UPS.
>
>Fixes: 79872e35469b ("powerpc/pseries: All events of EPOW_SYSTEM_SHUTDOWN must initiate shutdown")
>Cc: stable@vger.kernel.org # v4.0+
>Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
>[mpe: Massage change log and add PAPR references]
>Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
>Link: https://lore.kernel.org/r/20200820061844.306460-1-hegdevasant@linux.vnet.ibm.com
>Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
>---
>Hi,
> Please apply this patch to linux-stable-v4.4 branch. Its already applied to
> other required stable branches.
Queued up, thanks!
--
Thanks,
Sasha
prev parent reply other threads:[~2020-08-27 14:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-27 7:43 [PATCH stable v4.4] powerpc/pseries: Do not initiate shutdown when system is running on UPS Vasant Hegde
2020-08-27 14:57 ` Sasha Levin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200827145723.GO8670@sasha-vm \
--to=sashal@kernel.org \
--cc=hegdevasant@linux.vnet.ibm.com \
--cc=mpe@ellerman.id.au \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox