From: "Winiarska, Iwona" <iwona.winiarska@intel.com>
To: "fercerpav@gmail.com" <fercerpav@gmail.com>
Cc: "corbet@lwn.net" <corbet@lwn.net>,
"jae.hyun.yoo@linux.intel.com" <jae.hyun.yoo@linux.intel.com>,
"billy_tsai@aspeedtech.com" <billy_tsai@aspeedtech.com>,
"linux-hwmon@vger.kernel.org" <linux-hwmon@vger.kernel.org>,
"Hansen, Dave" <dave.hansen@intel.com>,
"Luck, Tony" <tony.luck@intel.com>,
"andrew@aj.id.au" <andrew@aj.id.au>,
"jdelvare@suse.com" <jdelvare@suse.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"olof@lixom.net" <olof@lixom.net>,
"rdunlap@infradead.org" <rdunlap@infradead.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-aspeed@lists.ozlabs.org" <linux-aspeed@lists.ozlabs.org>,
"linux@roeck-us.net" <linux@roeck-us.net>,
"Weiss, Zev" <zweiss@equinix.com>,
"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
"robh+dt@kernel.org" <robh+dt@kernel.org>,
"openbmc@lists.ozlabs.org" <openbmc@lists.ozlabs.org>,
"arnd@arndb.de" <arnd@arndb.de>,
"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
"bp@alien8.de" <bp@alien8.de>,
"pierre-louis.bossart@linux.intel.com"
<pierre-louis.bossart@linux.intel.com>,
"andriy.shevchenko@linux.intel.com"
<andriy.shevchenko@linux.intel.com>,
"Williams, Dan J" <dan.j.williams@intel.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v8 10/13] hwmon: peci: Add cputemp driver
Date: Tue, 21 Mar 2023 09:08:16 +0000 [thread overview]
Message-ID: <35aff70623a156ebe39106db26a443659de2ef79.camel@intel.com> (raw)
In-Reply-To: <ZBhHS7v+98NK56is@home.paul.comp>
On Mon, 2023-03-20 at 14:45 +0300, Paul Fertser wrote:
> Hello,
>
> We are seeing wrong DTS temperatures on at least "Intel(R) Xeon(R)
> Bronze 3204 CPU @ 1.90GHz" and most probably other Skylake Xeon CPUs
> are also affected, see inline.
>
> On Tue, Feb 08, 2022 at 04:36:36PM +0100, Iwona Winiarska wrote:
> > Add peci-cputemp driver for Digital Thermal Sensor (DTS) thermal
> > readings of the processor package and processor cores that are
> > accessible via the PECI interface.
> ...
> > +static const struct cpu_info cpu_hsx = {
> > + .reg = &resolved_cores_reg_hsx,
> > + .min_peci_revision = 0x33,
> > + .thermal_margin_to_millidegree =
> > &dts_eight_dot_eight_to_millidegree,
> > +};
> > +
> > +static const struct cpu_info cpu_icx = {
> > + .reg = &resolved_cores_reg_icx,
> > + .min_peci_revision = 0x40,
> > + .thermal_margin_to_millidegree = &dts_ten_dot_six_to_millidegree,
> > +};
> ...
> > + {
> > + .name = "peci_cpu.cputemp.skx",
> > + .driver_data = (kernel_ulong_t)&cpu_hsx,
> > + },
>
> With this configuration we get this data:
>
> /sys/bus/peci/devices/0-30/peci_cpu.cputemp.skx.48/hwmon/hwmon15# grep .
> temp[123]_{label,input}
> temp1_label:Die
> temp2_label:DTS
> temp3_label:Tcontrol
> temp1_input:30938
> temp2_input:67735
> temp3_input:80000
>
> On the host system "sensors" report
>
> Package id 0: +31.C (high = +80.C, crit = +90.C)
>
> So I conclude Die temperature as retrieved over PECI is correct while
> DTS is mis-calculated. The old downstream code in OpenBMC was using
> ten_dot_six_to_millidegree() function for conversion, and that was
> providing expected results. And indeed if we reverse the calculation
> here we get 80000 - ((80000-67735) * 256 / 64) = 30940 which matches
> expectations.
>
Hi!
Thanks for the report.
It was changed between v2 and v3 after a report about negative temperature on
pre-ICX platforms:
https://lore.kernel.org/lkml/6891496eabcc6f9cacec4fea505fb757ea9c11fc.camel@intel.com/
Unfortunately, I'm not able to test this on Cascade Lake X (or any other pre-ICX
platform).
I just sent a patch that changes SKX to use S10.6 format:
https://lore.kernel.org/lkml/20230321090410.866766-1-iwona.winiarska@intel.com/
Thanks
-Iwona
next prev parent reply other threads:[~2023-03-21 9:08 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-08 15:36 [PATCH v8 00/13] Introduce PECI subsystem Iwona Winiarska
2022-02-08 15:36 ` [PATCH v8 01/13] dt-bindings: Add generic bindings for PECI Iwona Winiarska
2022-02-08 15:36 ` [PATCH v8 02/13] dt-bindings: Add bindings for peci-aspeed Iwona Winiarska
2022-02-08 15:36 ` [PATCH v8 03/13] ARM: dts: aspeed: Add PECI controller nodes Iwona Winiarska
2022-02-08 15:36 ` [PATCH v8 04/13] peci: Add core infrastructure Iwona Winiarska
2022-02-08 15:36 ` [PATCH v8 05/13] peci: Add peci-aspeed controller driver Iwona Winiarska
2022-02-08 15:36 ` [PATCH v8 06/13] peci: Add device detection Iwona Winiarska
2022-02-08 15:36 ` [PATCH v8 07/13] peci: Add sysfs interface for PECI bus Iwona Winiarska
2022-02-08 15:36 ` [PATCH v8 08/13] peci: Add support for PECI device drivers Iwona Winiarska
2022-02-08 15:36 ` [PATCH v8 09/13] peci: Add peci-cpu driver Iwona Winiarska
2022-02-08 15:36 ` [PATCH v8 10/13] hwmon: peci: Add cputemp driver Iwona Winiarska
2023-03-20 11:45 ` Paul Fertser
2023-03-20 12:46 ` Andy Shevchenko
2023-03-21 9:08 ` Winiarska, Iwona [this message]
2022-02-08 15:36 ` [PATCH v8 11/13] hwmon: peci: Add dimmtemp driver Iwona Winiarska
2022-02-08 15:36 ` [PATCH v8 12/13] docs: hwmon: Document PECI drivers Iwona Winiarska
2022-02-08 15:36 ` [PATCH v8 13/13] docs: Add PECI documentation Iwona Winiarska
2022-02-08 23:10 ` [PATCH v8 00/13] Introduce PECI subsystem Joel Stanley
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=35aff70623a156ebe39106db26a443659de2ef79.camel@intel.com \
--to=iwona.winiarska@intel.com \
--cc=andrew@aj.id.au \
--cc=andriy.shevchenko@linux.intel.com \
--cc=arnd@arndb.de \
--cc=billy_tsai@aspeedtech.com \
--cc=bp@alien8.de \
--cc=corbet@lwn.net \
--cc=dan.j.williams@intel.com \
--cc=dave.hansen@intel.com \
--cc=devicetree@vger.kernel.org \
--cc=fercerpav@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=jae.hyun.yoo@linux.intel.com \
--cc=jdelvare@suse.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-aspeed@lists.ozlabs.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=olof@lixom.net \
--cc=openbmc@lists.ozlabs.org \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=rdunlap@infradead.org \
--cc=robh+dt@kernel.org \
--cc=tony.luck@intel.com \
--cc=zweiss@equinix.com \
/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