Re: [PATCH 1/2] thermal: int340x: Add critical callback to override default shutdown behavior

From: Srinivas Pandruvada
Date: Mon Dec 21 2020 - 12:00:02 EST


On Mon, 2020-12-21 at 17:03 +0100, Daniel Lezcano wrote:
> On 21/12/2020 16:00, Kai-Heng Feng wrote:
> > On Mon, Dec 21, 2020 at 9:59 PM Daniel Lezcano
> > <daniel.lezcano@xxxxxxxxxx> wrote:
> > >
> > > On 21/12/2020 14:52, Kai-Heng Feng wrote:
> > > > We are seeing thermal shutdown on Intel based mobile
> > > > workstations, the
> > > > shutdown happens during the first trip handle in
> > > > thermal_zone_device_register():
> > > > kernel: thermal thermal_zone15: critical temperature reached
> > > > (101 C), shutting down
> > > >
> > > > However, we shouldn't do a thermal shutdown here, since
> > > > 1) We may want to use a dedicated daemon, Intel's thermald in
> > > > this case,
> > > > to handle thermal shutdown.
> > > >
> > > > 2) For ACPI based system, _CRT doesn't mean shutdown unless
> > > > it's inside
> > > > ThermalZone namespace. ACPI Spec, 11.4.4 _CRT (Critical
> > > > Temperature):
> > > > "... If this object it present under a device, the device’s
> > > > driver
> > > > evaluates this object to determine the device’s critical
> > > > cooling
> > > > temperature trip point. This value may then be used by the
> > > > device’s
> > > > driver to program an internal device temperature sensor trip
> > > > point."
> > > >
> > > > So a "critical trip" here merely means we should take a more
> > > > aggressive
> > > > cooling method.
> > > >
> > > > As int340x device isn't present under ACPI ThermalZone,
> > > > override the
> > > > default .critical callback to prevent surprising thermal
> > > > shutdown.
> > > >
> > > > Signed-off-by: Kai-Heng Feng <kai.heng.feng@xxxxxxxxxxxxx>
> > >
> > > I'll submit those changes for v5.11-rc1 and change the subject
> > > by:
> > >
> > > thermal: int340x: Fix unexpected shutdown at critical temperature
> > > thermal: pch: Fix unexpected shutdown at critical temperature
> > >
> > > Sounds good ?
> >
> > Sounds good to me. Thanks!
> >
> > Kai-Heng
>
> Rui, Srinivas? Are you ok with the changes ?
I have minor comment in one of the patch. But that is harmless.
So changes are fine.

Thanks,
Srinivas


>
>