lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CABxCQKs98pTbJF+EyP4HdEd+JOTvGdfkRgvYGLNOHoc0DX0A3Q@mail.gmail.com>
Date: Thu, 15 Feb 2024 08:22:13 +0900
From: Vishnu Sankar <vishnuocv@...il.com>
To: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
Cc: Hans de Goede <hdegoede@...hat.com>, platform-driver-x86@...r.kernel.org, 
	LKML <linux-kernel@...r.kernel.org>, Mark Pearson <mpearson-lenovo@...ebb.ca>, 
	vsankar@...ovo.com
Subject: Re: [PATCH 2/2] platform/x86: thinkpad_acpi: Fix to correct wrong
 temp reporting on some ThinkPads

Ilpo,
Thanks for the review.

On Wed, Feb 14, 2024 at 7:23 PM Ilpo Järvinen
<ilpo.jarvinen@...ux.intel.com> wrote:
>
> On Wed, 14 Feb 2024, Vishnu Sankar wrote:
>
> > Added non-standard thermal register support for some ThinkPads.
> >
> > Some of the Thinkpads use a non-standard ECFW which uses different
> > thermal register addresses.
> > This is a fix to correct the wrong temperature reporting on
> > those systems.
> >
> > Tested on Lenovo ThinkPad L13 Yoga Gen2
> >
> > Suggested-by: Mark Pearson <mpearson-lenovo@...ebb.ca>
> > Signed-off-by: Vishnu Sankar <vishnuocv@...il.com>
> > ---
> > -Improvements as requested.
> > -Improved the readability in case TPACPI_THERMAL_TPEC_12.
> > -idx < 8 from idx idx <=7 to match idx = 8
> > -KILO used from linux/units.h instead of 1000.
>
> >  static enum thermal_access_mode thermal_read_mode;
> >  static bool thermal_use_labels;
> > +static bool thermal_with_ns_address; /*Non-standard thermal reg address*/
>
> Comment is missing spaces.
Acked.
>
> > @@ -6239,6 +6267,20 @@ static int thermal_get_sensor(int idx, s32 *value)
> >               }
> >               break;
> >
> > +     /* The Non-standard EC uses 12 Thermal areas */
> > +     case TPACPI_THERMAL_TPEC_12:
> > +             if (idx >= 12)
> > +                     return -EINVAL;
> > +
> > +             t = idx < 8 ? TP_EC_THERMAL_TMP0_NS + idx :
> > +                             TP_EC_THERMAL_TMP8_NS + (idx - 8);
> > +
> > +             if (!acpi_ec_read(t, &tmp))
> > +                     return -EIO;
> > +
> > +             *value = tmp * KILO;
>
> Hmm, MILLI would be much more approriate here? But if this relates to
> degrees, there is MILLIDEGREE_PER_DEGREE?
Will Change to MILLIDEGREE_PER_DEGREE from KILO
>
> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
>
> --
>  i.



-- 

Regards,

      Vishnu Sankar
     +817015150407 (Japan)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ