All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rafael@kernel.org>
To: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Linux PM <linux-pm@vger.kernel.org>,
	spandruv <spandruv@spandruv-mobl.jf.intel.com>
Subject: Re: [PATCH] cpufreq: intel_pstate: Check cpuid for MSR_HWP_INTERRUPT
Date: Wed, 20 Jul 2016 01:38:56 +0200	[thread overview]
Message-ID: <CAJZ5v0iCouZ9xU8AOOL51RZZEsuRmY7fLLpidY+0mmoGB+R92Q@mail.gmail.com> (raw)
In-Reply-To: <1468971284-17686-1-git-send-email-srinivas.pandruvada@linux.intel.com>

On Wed, Jul 20, 2016 at 1:34 AM, Srinivas Pandruvada
<srinivas.pandruvada@linux.intel.com> wrote:
> From: spandruv <spandruv@spandruv-mobl.jf.intel.com>
>
> The MSR MSR_HWP_INTERRUPT is valid only when CPUID.06H:EAX[8] = 1, so
> check for feature before accessing this MSR.
>
> Signed-off-by: spandruv <spandruv@spandruv-mobl.jf.intel.com>

Do you really want this in the S-o-b tag?

> ---
>  drivers/cpufreq/intel_pstate.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
> index 2fe9af1..712afbd 100644
> --- a/drivers/cpufreq/intel_pstate.c
> +++ b/drivers/cpufreq/intel_pstate.c
> @@ -822,8 +822,10 @@ static void __init intel_pstate_sysfs_expose_params(void)
>
>  static void intel_pstate_hwp_enable(struct cpudata *cpudata)
>  {
> +
>         /* First disable HWP notification interrupt as we don't process them */
> -       wrmsrl_on_cpu(cpudata->cpu, MSR_HWP_INTERRUPT, 0x00);
> +       if (static_cpu_has(X86_FEATURE_HWP_NOTIFY))
> +               wrmsrl_on_cpu(cpudata->cpu, MSR_HWP_INTERRUPT, 0x00);
>
>         wrmsrl_on_cpu(cpudata->cpu, MSR_PM_ENABLE, 0x1);
>  }
> --

  reply	other threads:[~2016-07-19 23:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-19 23:34 [PATCH] cpufreq: intel_pstate: Check cpuid for MSR_HWP_INTERRUPT Srinivas Pandruvada
2016-07-19 23:38 ` Rafael J. Wysocki [this message]
2016-07-19 23:40   ` Rafael J. Wysocki
2016-07-19 23:42     ` Srinivas Pandruvada
2016-07-19 23:40 ` Pandruvada, Srinivas

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=CAJZ5v0iCouZ9xU8AOOL51RZZEsuRmY7fLLpidY+0mmoGB+R92Q@mail.gmail.com \
    --to=rafael@kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=spandruv@spandruv-mobl.jf.intel.com \
    --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 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.