[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b039aa6253d38219c40fc36c8109f3b48bee4147.camel@fi.rohmeurope.com>
Date: Sat, 17 Apr 2021 08:49:27 +0000
From: "Vaittinen, Matti" <Matti.Vaittinen@...rohmeurope.com>
To: "daniel.lezcano@...aro.org" <daniel.lezcano@...aro.org>
CC: "josef@...icpanda.com" <josef@...icpanda.com>,
"keescook@...omium.org" <keescook@...omium.org>,
"rppt@...nel.org" <rppt@...nel.org>,
"linux-arm-msm@...r.kernel.org" <linux-arm-msm@...r.kernel.org>,
"pmladek@...e.com" <pmladek@...e.com>,
linux-power <linux-power@...rohmeurope.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"bjorn.andersson@...aro.org" <bjorn.andersson@...aro.org>,
"rui.zhang@...el.com" <rui.zhang@...el.com>,
"linux-renesas-soc@...r.kernel.org"
<linux-renesas-soc@...r.kernel.org>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
"linux@...ck-us.net" <linux@...ck-us.net>,
"lgirdwood@...il.com" <lgirdwood@...il.com>,
"robh+dt@...nel.org" <robh+dt@...nel.org>,
"kai.heng.feng@...onical.com" <kai.heng.feng@...onical.com>,
"mcroce@...rosoft.com" <mcroce@...rosoft.com>,
"amitk@...nel.org" <amitk@...nel.org>,
"linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
"andy.shevchenko@...il.com" <andy.shevchenko@...il.com>,
"agross@...nel.org" <agross@...nel.org>,
"broonie@...nel.org" <broonie@...nel.org>,
"rafael.j.wysocki@...el.com" <rafael.j.wysocki@...el.com>
Subject: Re: [PATCH v7 2/9] reboot: thermal: Export hardware protection
shutdown
On Sat, 2021-04-17 at 06:57 +0200, Daniel Lezcano wrote:
> On 14/04/2021 07:52, Matti Vaittinen wrote:
> > Thermal core contains a logic for safety shutdown. System is
> > attempted to
> > be powered off if temperature exceeds safety limits.
> >
> > Currently this can be also utilized by regulator subsystem as a
> > final
> > protection measure if PMICs report dangerous over-voltage, over-
> > current or
> > over-temperature and if per regulator counter measures fail or do
> > not
> > exist.
> >
> > Move this logic to kernel/reboot.c and export the functionality for
> > other
> > subsystems to use. Also replace the mutex with a spinlock to allow
> > using
> > the function from any context.
> >
> > Also the EMIF bus code has implemented a safety shut-down. EMIF
> > does not
> > attempt orderly_poweroff at all. Thus the EMIF code is not
> > converted to use
> > this new function.
> >
> > Signed-off-by: Matti Vaittinen <matti.vaittinen@...rohmeurope.com>
> > ---
> > Changelog
> > v7:
> > - new patch
> >
> > Please note - this patch has received only a minimal amount of
> > testing.
> > (The new API call was tested to shut-down my system at driver probe
> > but
> > no odd corner-cases have been tested).
> >
> > Any testing for thermal shutdown is appreciated.
>
> You can test it easily by enabling the option
> CONFIG_THERMAL_EMULATION
>
> Then in any thermal zone:
>
> Assuming the critical temp is below the one specified in the command:
>
> echo 100000 > /sys/class/thermal/thermal_zone0/emul_temp
>
Thanks Daniel, I will see how that works when I create the next version
:)
Best Regards
Matti Vaittinen
Powered by blists - more mailing lists