linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
To: Jan Kiszka <jan.kiszka@siemens.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Cc: Kristen Carlson Accardi <kristen@linux.intel.com>
Subject: Re: [PATCH] intel_pstate: Fix MSR_CONFIG_TDP_x addressing in core_get_max_pstate
Date: Fri, 08 Jul 2016 12:39:07 -0700	[thread overview]
Message-ID: <1468006747.13617.117.camel@linux.intel.com> (raw)
In-Reply-To: <577FF3FC.6030004@siemens.com>

On Fri, 2016-07-08 at 20:42 +0200, Jan Kiszka wrote:
> If MSR_CONFIG_TDP_CONTROL is locked, we currently try to address some
> MSR 0x80000648 or so. Mask out the relevant level bits 0 and 1.
> 
> Found while running over the Jailhouse hypervisor which became upset
> about this strange MSR index.
> 
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>

> ---
>  drivers/cpufreq/intel_pstate.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/cpufreq/intel_pstate.c
> b/drivers/cpufreq/intel_pstate.c
> index 1fa1a32..1b15917 100644
> --- a/drivers/cpufreq/intel_pstate.c
> +++ b/drivers/cpufreq/intel_pstate.c
> @@ -944,7 +944,7 @@ static int core_get_max_pstate(void)
>  			if (err)
>  				goto skip_tar;
>  
> -			tdp_msr = MSR_CONFIG_TDP_NOMINAL + tdp_ctrl;
> +			tdp_msr = MSR_CONFIG_TDP_NOMINAL + (tdp_ctrl
> & 0x3);
>  			err = rdmsrl_safe(tdp_msr, &tdp_ratio);
>  			if (err)
>  				goto skip_tar;

  reply	other threads:[~2016-07-08 19:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-08 18:42 [PATCH] intel_pstate: Fix MSR_CONFIG_TDP_x addressing in core_get_max_pstate Jan Kiszka
2016-07-08 19:39 ` Srinivas Pandruvada [this message]
2016-07-09  0:45   ` Rafael J. Wysocki
2016-07-10  3:45     ` 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=1468006747.13617.117.camel@linux.intel.com \
    --to=srinivas.pandruvada@linux.intel.com \
    --cc=jan.kiszka@siemens.com \
    --cc=kristen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael.j.wysocki@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).