linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Zhang Rui <rui.zhang@intel.com>
To: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Cc: dwalker@fifo99.com, linux-pm@vger.kernel.org, eduardo.valentin@ti.com
Subject: Re: [PATCH] Thermal: x86 package temp thermal crash
Date: Mon, 15 Jul 2013 16:27:19 +0800	[thread overview]
Message-ID: <1373876839.3034.1.camel@rzhang1-mobl4> (raw)
In-Reply-To: <1373561430-29314-1-git-send-email-srinivas.pandruvada@linux.intel.com>

On Thu, 2013-07-11 at 09:50 -0700, Srinivas Pandruvada wrote:
> On systems with no package MSR support this caused crash as there
> is a bug in the logic to check presence of DTHERM and PTS feature
> together. Added a change so that when there is no PTS support, module
> doesn't get loaded. Even if some CPU comes online with the PTS
> feature disabled, and other CPUs has this support, this patch
> will still prevent such MSR accesses.
> 
> Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
> Reported-by: Daniel Walker <dwalker@fifo99.com>

applied to thermal -next.

thanks,
rui
> ---
>  drivers/thermal/x86_pkg_temp_thermal.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/thermal/x86_pkg_temp_thermal.c b/drivers/thermal/x86_pkg_temp_thermal.c
> index 5de56f6..034604c 100644
> --- a/drivers/thermal/x86_pkg_temp_thermal.c
> +++ b/drivers/thermal/x86_pkg_temp_thermal.c
> @@ -511,7 +511,7 @@ static int get_core_online(unsigned int cpu)
>  
>  	/* Check if there is already an instance for this package */
>  	if (!phdev) {
> -		if (!cpu_has(c, X86_FEATURE_DTHERM) &&
> +		if (!cpu_has(c, X86_FEATURE_DTHERM) ||
>  					!cpu_has(c, X86_FEATURE_PTS))
>  			return -ENODEV;
>  		if (pkg_temp_thermal_device_add(cpu))
> @@ -562,7 +562,7 @@ static struct notifier_block pkg_temp_thermal_notifier __refdata = {
>  };
>  
>  static const struct x86_cpu_id __initconst pkg_temp_thermal_ids[] = {
> -	{ X86_VENDOR_INTEL, X86_FAMILY_ANY, X86_MODEL_ANY, X86_FEATURE_DTHERM },
> +	{ X86_VENDOR_INTEL, X86_FAMILY_ANY, X86_MODEL_ANY, X86_FEATURE_PTS },
>  	{}
>  };
>  MODULE_DEVICE_TABLE(x86cpu, pkg_temp_thermal_ids);



  reply	other threads:[~2013-07-15  8:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-11 16:50 [PATCH] Thermal: x86 package temp thermal crash Srinivas Pandruvada
2013-07-15  8:27 ` Zhang Rui [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-07-11  5:49 Srinivas Pandruvada
2013-07-11 15:59 ` Daniel Walker
2013-07-11 16:28   ` Srinivas Pandruvada

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=1373876839.3034.1.camel@rzhang1-mobl4 \
    --to=rui.zhang@intel.com \
    --cc=dwalker@fifo99.com \
    --cc=eduardo.valentin@ti.com \
    --cc=linux-pm@vger.kernel.org \
    --cc=srinivas.pandruvada@linux.intel.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;
as well as URLs for NNTP newsgroup(s).