public inbox for linux-hwmon@vger.kernel.org
 help / color / mirror / Atom feed
From: Zhang Rui <rui.zhang@intel.com>
To: Guenter Roeck <linux@roeck-us.net>, jdelvare@suse.com
Cc: linux-hwmon@vger.kernel.org
Subject: coretemp driver change on dual-die/package systems
Date: Mon, 11 Feb 2019 17:46:12 +0800	[thread overview]
Message-ID: <1549878372.2099.36.camel@intel.com> (raw)

Hi, Jean and Guenter,

Per the Intel Software Developer's Manual, which you can found at www.i
ntel.com/sdm, when CPUID.1F is present, it is preferred over CPUID.B.

New dual-die/package systems will see this difference:    
   CPUID.0B enumerates the CPUs on each die as if they were in
different packages.
   CPUID.1F enumerates the CPUs on each die within the same package.

This will manifest in the sysfs physical_package_id attribute. ie. In
the example above, CPUID.B would cause lscpu to show 2 packages, and
CPUID.1F will cause lscpu to show 1 package.

Also, with CPUID.B the concept of a package-scope MSR and a die-scope
MSR are synonymous.  With CPUID.1F, it is possible for some MSRs to
have die-scope, and other MSRs to have package-scope.

MSR_IA32_PACKAGE_THERM_STATUS is a die-scope MSR, thus we need to
update the coretemp driver to become multi-die-aware when we support
CPUID.1F.

Previously, we create one hwmon device for each package, now we need to
create one hwmon device for each die.
But there is one problem left. For each coretemp hwmon device, the
"temp1_input" attribute represents the temperature got from
MSR_IA32_PACKAGE_THERM_STATUS, and "temp1_label" is "Package id X",
where X is the logical package id.
Now we create one hwmon device for each die, thus temp1_label can not
use logical package id any more, because there are two dies in the same
package.
To me, there are two choices,
1. changing "temp1_label" from "Package id X" to "Package id Y", where
Y is just a unique number instead of logical package id, say, using
ida.
2. changing "temp1_label" from "Package id X" to "Package id X Die id
Y", where Y is the die id.

Question is I'm not sure how temp1_label is used and if this change
will break any userspace, like lm-sensors?

thanks,
rui


             reply	other threads:[~2019-02-11  9:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-11  9:46 Zhang Rui [this message]
2019-02-11 14:13 ` coretemp driver change on dual-die/package systems Guenter Roeck
2019-02-12 15:55   ` Zhang Rui

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=1549878372.2099.36.camel@intel.com \
    --to=rui.zhang@intel.com \
    --cc=jdelvare@suse.com \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux@roeck-us.net \
    /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