mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org,
	rafael.j.wysocki@intel.com, dirk.j.brandewie@intel.com
Subject: Re: [PATCH] intel-pstate: Use #defines instead of hard-coded values.
Date: Tue, 26 Mar 2013 14:37:51 +0100	[thread overview]
Message-ID: <13252849.uMIDiVUCkC@vostro.rjw.lan> (raw)
In-Reply-To: <1363789270-29579-1-git-send-email-konrad.wilk@oracle.com>

On Wednesday, March 20, 2013 10:21:10 AM Konrad Rzeszutek Wilk wrote:
> They are defined in coreboot (MSR_PLATFORM) and the other
> one is already defined in msr-index.h.
> 
> Lets use those.
> 
> CC: rafael.j.wysocki@intel.com
> CC: dirk.j.brandewie@intel.com
> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>

Applied.

Thanks,
Rafael


> ---
>  arch/x86/include/uapi/asm/msr-index.h | 1 +
>  drivers/cpufreq/intel_pstate.c        | 6 +++---
>  2 files changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/x86/include/uapi/asm/msr-index.h b/arch/x86/include/uapi/asm/msr-index.h
> index 892ce40..7a060f4 100644
> --- a/arch/x86/include/uapi/asm/msr-index.h
> +++ b/arch/x86/include/uapi/asm/msr-index.h
> @@ -44,6 +44,7 @@
>  #define SNB_C1_AUTO_UNDEMOTE		(1UL << 27)
>  #define SNB_C3_AUTO_UNDEMOTE		(1UL << 28)
>  
> +#define MSR_PLATFORM_INFO		0x000000ce
>  #define MSR_MTRRcap			0x000000fe
>  #define MSR_IA32_BBL_CR_CTL		0x00000119
>  #define MSR_IA32_BBL_CR_CTL3		0x0000011e
> diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
> index f6dd1e7..dadc27d 100644
> --- a/drivers/cpufreq/intel_pstate.c
> +++ b/drivers/cpufreq/intel_pstate.c
> @@ -358,14 +358,14 @@ static void intel_pstate_sysfs_expose_params(void)
>  static int intel_pstate_min_pstate(void)
>  {
>  	u64 value;
> -	rdmsrl(0xCE, value);
> +	rdmsrl(MSR_PLATFORM_INFO, value);
>  	return (value >> 40) & 0xFF;
>  }
>  
>  static int intel_pstate_max_pstate(void)
>  {
>  	u64 value;
> -	rdmsrl(0xCE, value);
> +	rdmsrl(MSR_PLATFORM_INFO, value);
>  	return (value >> 8) & 0xFF;
>  }
>  
> @@ -373,7 +373,7 @@ static int intel_pstate_turbo_pstate(void)
>  {
>  	u64 value;
>  	int nont, ret;
> -	rdmsrl(0x1AD, value);
> +	rdmsrl(MSR_NHM_TURBO_RATIO_LIMIT, value);
>  	nont = intel_pstate_max_pstate();
>  	ret = ((value) & 255);
>  	if (ret <= nont)
> 
-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

      parent reply	other threads:[~2013-03-26 13:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-20 14:21 Konrad Rzeszutek Wilk
2013-03-20 14:38 ` Viresh Kumar
2013-03-20 16:11 ` Dirk Brandewie
2013-03-26 13:37 ` Rafael J. Wysocki [this message]

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=13252849.uMIDiVUCkC@vostro.rjw.lan \
    --to=rjw@sisk.pl \
    --cc=dirk.j.brandewie@intel.com \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-acpi@vger.kernel.org \
    --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

all inboxes | Powered by JetHome®