All of lore.kernel.org
 help / color / mirror / Atom feed
From: Valdis.Kletnieks@vt.edu
To: Huaxu Wan <huaxu.wan@linux.intel.com>
Cc: linux-kernel@vger.kernel.org, lm-sensors@lm-sensors.org,
	huaxu.wan@intel.com, Carsten Emde <Carsten.Emde@osadl.org>
Subject: Re: [lm-sensors] [PATCH 1/2 V3] hwmon: (coretemp) Detect the
Date: Tue, 11 May 2010 21:45:19 +0000	[thread overview]
Message-ID: <31726.1273614319@localhost> (raw)
In-Reply-To: Your message of "Tue, 11 May 2010 16:01:12 +0800." <20100511080112.GB19762@owl>


[-- Attachment #1.1: Type: text/plain, Size: 1333 bytes --]

On Tue, 11 May 2010 16:01:12 +0800, Huaxu Wan said:
> The thermal sensors of Intel(R) CPUs can be detected by CPUID instruction,
> indicated by CPUID.06H.EAX[0].
> 
> Signed-off-by: Huaxu Wan <huaxu.wan@linux.intel.com>
> Signed-off-by: Carsten Emde <C.Emde@osadl.org>
> ---
>  drivers/hwmon/coretemp.c |   34 +++++++++++++---------------------
>  1 files changed, 13 insertions(+), 21 deletions(-)
> 
> diff --git a/drivers/hwmon/coretemp.c b/drivers/hwmon/coretemp.c
> index e9b7fbc..be0ddcf 100644
> --- a/drivers/hwmon/coretemp.c
> +++ b/drivers/hwmon/coretemp.c
> @@ -451,28 +451,20 @@ static int __init coretemp_init(void)
> 
>         for_each_online_cpu(i) {
>                 struct cpuinfo_x86 *c = &cpu_data(i);
> +               /*
> +                * CPUID.06H.EAX[0] indicates whether the CPU has thermal
> +                * sensors. We check this bit only, all the early CPUs
> +                * without thermal sensors will be filtered out.
> +                */
> +               if (c->cpuid_level >= 6 && (cpuid_eax(0x06) & 0x01)) {
> +                       err = coretemp_device_add(i);
> +                       if (err)
> +                               goto exit_devices_unreg;

OK, that looks sane. :)  For what it's worth, feel free to stick on a

Reviewed-By: Valdis Kletnieks <valdis.kletnieks@vt.edu>

[-- Attachment #1.2: Type: application/pgp-signature, Size: 227 bytes --]

[-- Attachment #2: Type: text/plain, Size: 153 bytes --]

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

WARNING: multiple messages have this Message-ID (diff)
From: Valdis.Kletnieks@vt.edu
To: Huaxu Wan <huaxu.wan@linux.intel.com>
Cc: linux-kernel@vger.kernel.org, lm-sensors@lm-sensors.org,
	huaxu.wan@intel.com, Carsten Emde <Carsten.Emde@osadl.org>
Subject: Re: [PATCH 1/2 V3] hwmon: (coretemp) Detect the thermal sensors by CPUID
Date: Tue, 11 May 2010 17:45:19 -0400	[thread overview]
Message-ID: <31726.1273614319@localhost> (raw)
In-Reply-To: Your message of "Tue, 11 May 2010 16:01:12 +0800." <20100511080112.GB19762@owl>

[-- Attachment #1: Type: text/plain, Size: 1333 bytes --]

On Tue, 11 May 2010 16:01:12 +0800, Huaxu Wan said:
> The thermal sensors of Intel(R) CPUs can be detected by CPUID instruction,
> indicated by CPUID.06H.EAX[0].
> 
> Signed-off-by: Huaxu Wan <huaxu.wan@linux.intel.com>
> Signed-off-by: Carsten Emde <C.Emde@osadl.org>
> ---
>  drivers/hwmon/coretemp.c |   34 +++++++++++++---------------------
>  1 files changed, 13 insertions(+), 21 deletions(-)
> 
> diff --git a/drivers/hwmon/coretemp.c b/drivers/hwmon/coretemp.c
> index e9b7fbc..be0ddcf 100644
> --- a/drivers/hwmon/coretemp.c
> +++ b/drivers/hwmon/coretemp.c
> @@ -451,28 +451,20 @@ static int __init coretemp_init(void)
> 
>         for_each_online_cpu(i) {
>                 struct cpuinfo_x86 *c = &cpu_data(i);
> +               /*
> +                * CPUID.06H.EAX[0] indicates whether the CPU has thermal
> +                * sensors. We check this bit only, all the early CPUs
> +                * without thermal sensors will be filtered out.
> +                */
> +               if (c->cpuid_level >= 6 && (cpuid_eax(0x06) & 0x01)) {
> +                       err = coretemp_device_add(i);
> +                       if (err)
> +                               goto exit_devices_unreg;

OK, that looks sane. :)  For what it's worth, feel free to stick on a

Reviewed-By: Valdis Kletnieks <valdis.kletnieks@vt.edu>

[-- Attachment #2: Type: application/pgp-signature, Size: 227 bytes --]

  reply	other threads:[~2010-05-11 21:45 UTC|newest]

Thread overview: 75+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-05 15:28 [lm-sensors] [PATCH 1/2] hwmon: (coretemp) Detect the thermal Huaxu Wan
2010-05-07  9:54 ` Huaxu Wan
2010-05-07  9:54   ` [PATCH 1/2] hwmon: (coretemp) Detect the thermal sensors by CPUID Huaxu Wan
2010-05-07 12:43   ` [lm-sensors] [PATCH 1/2] hwmon: (coretemp) Detect the thermal Jean Delvare
2010-05-07 12:43     ` [PATCH 1/2] hwmon: (coretemp) Detect the thermal sensors by CPUID Jean Delvare
2010-05-07 13:21   ` [lm-sensors] [PATCH 1/2] hwmon: (coretemp) Detect the thermal Carsten Emde
2010-05-07 13:21     ` [lm-sensors] [PATCH 1/2] hwmon: (coretemp) Detect the thermal sensors by CPUID Carsten Emde
2010-05-10  2:35     ` [lm-sensors] [PATCH 1/2] hwmon: (coretemp) Detect the thermal Huaxu Wan
2010-05-10  2:35       ` [lm-sensors] [PATCH 1/2] hwmon: (coretemp) Detect the thermal sensors by CPUID Huaxu Wan
2010-05-10  3:35   ` [lm-sensors] [PATCH 1/2 V2] hwmon: (coretemp) Detect the thermal Huaxu Wan
2010-05-10  3:35     ` [PATCH 1/2 V2] hwmon: (coretemp) Detect the thermal sensors by CPUID Huaxu Wan
2010-05-10 12:45     ` [lm-sensors] [PATCH 1/2 V2] hwmon: (coretemp) Detect the Valdis.Kletnieks
2010-05-10 12:45       ` [PATCH 1/2 V2] hwmon: (coretemp) Detect the thermal sensors by CPUID Valdis.Kletnieks
2010-05-11  3:41       ` [lm-sensors] [PATCH 1/2 V2] hwmon: (coretemp) Detect the Huaxu Wan
2010-05-11  3:41         ` [PATCH 1/2 V2] hwmon: (coretemp) Detect the thermal sensors by CPUID Huaxu Wan
2010-05-11  7:55     ` [lm-sensors] [PATCH 1/2 V3] hwmon: (coretemp) Detect the thermal Huaxu Wan
2010-05-11  8:01       ` [PATCH 1/2 V3] hwmon: (coretemp) Detect the thermal sensors by CPUID Huaxu Wan
2010-05-11 21:45       ` Valdis.Kletnieks [this message]
2010-05-11 21:45         ` Valdis.Kletnieks
2010-05-14  3:20       ` [lm-sensors] [PATCH 1/2 V3] hwmon: (coretemp) Detect the Henrique de Moraes Holschuh
2010-05-14  3:20         ` [lm-sensors] [PATCH 1/2 V3] hwmon: (coretemp) Detect the thermal sensors by CPUID Henrique de Moraes Holschuh
2010-05-14  6:58         ` [lm-sensors] [PATCH 1/2 V3 minor change] hwmon: (coretemp) Detect Huaxu Wan
2010-05-14  6:58           ` [PATCH 1/2 V3 minor change] hwmon: (coretemp) Detect the thermal sensors by CPUID Huaxu Wan
2010-05-17  9:41           ` [lm-sensors] [PATCH 0/2] hwmon: Update coretemp to current Intel Carsten Emde
2010-05-17  9:41             ` [PATCH 0/2] hwmon: Update coretemp to current Intel processors Carsten Emde
2010-05-17  9:41             ` [lm-sensors] [PATCH 1/2] Detect the thermal sensors by CPUID Carsten Emde
2010-05-17  9:41               ` Carsten Emde
2010-05-17  9:41             ` [lm-sensors] [PATCH 2/2] Get TjMax value from MSR Carsten Emde
2010-05-17  9:41               ` Carsten Emde
2010-05-18  4:47             ` [lm-sensors] [PATCH 0/2] hwmon: Update coretemp to current Dmitry Gromov
2010-05-18  7:01               ` Carsten Emde
2010-05-18  7:01                 ` [lm-sensors] [PATCH 0/2] hwmon: Update coretemp to current Intel processors Carsten Emde
2010-05-18 12:03                 ` [lm-sensors] [PATCH 0/2] hwmon: Update coretemp to current Dmitry Gromov
2010-05-18 12:03                   ` [lm-sensors] [PATCH 0/2] hwmon: Update coretemp to current Intel processors Dmitry Gromov
2010-05-19  1:27                 ` [lm-sensors] [PATCH 0/2] hwmon: Update coretemp to current Huaxu Wan
2010-05-19  1:27                   ` [lm-sensors] [PATCH 0/2] hwmon: Update coretemp to current Intel processors Huaxu Wan
2010-05-18  5:07             ` [lm-sensors] [PATCH 0/2] hwmon: Update coretemp to current Wan, Huaxu
2010-05-18  6:45             ` Dmitry Gromov
2010-05-18  7:13               ` Carsten Emde
2010-05-18  7:13                 ` [lm-sensors] [PATCH 0/2] hwmon: Update coretemp to current Intel processors Carsten Emde
2010-05-19  0:50               ` [lm-sensors] [PATCH 0/2] hwmon: Update coretemp to current Huaxu Wan
2010-05-19  0:50                 ` [lm-sensors] [PATCH 0/2] hwmon: Update coretemp to current Intel processors Huaxu Wan
2010-05-19  3:12                 ` [lm-sensors] [PATCH 0/2] hwmon: Update coretemp to current Dmitry Gromov
2010-05-19  3:12                   ` [lm-sensors] [PATCH 0/2] hwmon: Update coretemp to current Intel processors Dmitry Gromov
  -- strict thread matches above, loose matches on Subject: below --
2010-03-05 15:38 [lm-sensors] [PATCH 2/2] hwmon: (coretemp) Get TjMax value from MSR Huaxu Wan
2010-03-05 16:19 ` [lm-sensors] [PATCH 2/2] hwmon: (coretemp) Get TjMax value from Luca Tettamanti
2010-03-08 14:44 ` Huaxu Wan
2010-05-07  9:59 ` [lm-sensors] [PATCH 2/2] hwmon: (coretemp) Get TjMax value from MSR Huaxu Wan
2010-05-07  9:59   ` Huaxu Wan
2010-05-07 13:29   ` [lm-sensors] [PATCH 2/2] hwmon: (coretemp) Get TjMax value from Carsten Emde
2010-05-07 13:29     ` [lm-sensors] [PATCH 2/2] hwmon: (coretemp) Get TjMax value from MSR Carsten Emde
2010-05-10  3:09     ` [lm-sensors] [PATCH 2/2] hwmon: (coretemp) Get TjMax value from Huaxu Wan
2010-05-10  3:09       ` [lm-sensors] [PATCH 2/2] hwmon: (coretemp) Get TjMax value from MSR Huaxu Wan
2010-05-10  3:50   ` [lm-sensors] [PATCH 2/2 V2] hwmon: (coretemp) Get TjMax value from Huaxu Wan
2010-05-10  3:50     ` [PATCH 2/2 V2] hwmon: (coretemp) Get TjMax value from MSR Huaxu Wan
2010-05-29  5:39   ` [lm-sensors] [PATCH 2/2] hwmon: (coretemp) Get TjMax value from Maxim Levitsky
2010-05-29  5:39     ` [PATCH 2/2] hwmon: (coretemp) Get TjMax value from MSR Maxim Levitsky
2010-05-30 14:43     ` [lm-sensors] [PATCH 2/2] hwmon: (coretemp) Get TjMax value from Maxim Levitsky
2010-05-30 14:43       ` [PATCH 2/2] hwmon: (coretemp) Get TjMax value from MSR Maxim Levitsky
2010-05-31  1:39     ` [lm-sensors] [PATCH 2/2] hwmon: (coretemp) Get TjMax value from Huaxu Wan
2010-05-31  1:39       ` [PATCH 2/2] hwmon: (coretemp) Get TjMax value from MSR Huaxu Wan
2010-06-02 16:34       ` [lm-sensors] [PATCH 2/2] hwmon: (coretemp) Get TjMax value from Maxim Levitsky
2010-06-02 16:34         ` [PATCH 2/2] hwmon: (coretemp) Get TjMax value from MSR Maxim Levitsky
2010-06-02 20:10         ` [lm-sensors] [PATCH 2/2] hwmon: (coretemp) Get TjMax value from Maxim Levitsky
2010-06-02 20:10           ` [PATCH 2/2] hwmon: (coretemp) Get TjMax value from MSR Maxim Levitsky
2010-06-12 13:03           ` [lm-sensors] [PATCH 2/2] hwmon: (coretemp) Get TjMax value from Maxim Levitsky
2010-06-12 13:03             ` [PATCH 2/2] hwmon: (coretemp) Get TjMax value from MSR Maxim Levitsky
2010-06-13  2:27             ` [lm-sensors] [PATCH 2/2] hwmon: (coretemp) Get TjMax value from Wan, Huaxu
2010-06-13  2:27               ` [PATCH 2/2] hwmon: (coretemp) Get TjMax value from MSR Wan, Huaxu
2010-07-26  8:16               ` [lm-sensors] [PATCH 2/2] hwmon: (coretemp) Get TjMax value from Maxim Levitsky
2010-07-26  8:16                 ` [PATCH 2/2] hwmon: (coretemp) Get TjMax value from MSR Maxim Levitsky
2010-08-30  1:42                 ` [lm-sensors] [PATCH 2/2] hwmon: (coretemp) Get TjMax value from Huaxu Wan
2010-08-30  1:42                   ` [PATCH 2/2] hwmon: (coretemp) Get TjMax value from MSR Huaxu Wan
2010-08-31 21:01                   ` [lm-sensors] [PATCH 2/2] hwmon: (coretemp) Get TjMax value from Fenghua Yu
2010-08-31 21:01                     ` [PATCH 2/2] hwmon: (coretemp) Get TjMax value from MSR Fenghua Yu

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=31726.1273614319@localhost \
    --to=valdis.kletnieks@vt.edu \
    --cc=Carsten.Emde@osadl.org \
    --cc=huaxu.wan@intel.com \
    --cc=huaxu.wan@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lm-sensors@lm-sensors.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.