diff mbox

cpufreq: intel_pstate: disable HWP notifications

Message ID 1456441771-4961-1-git-send-email-srinivas.pandruvada@linux.intel.com (mailing list archive)
State Accepted, archived
Delegated to: Rafael Wysocki
Headers show

Commit Message

srinivas pandruvada Feb. 25, 2016, 11:09 p.m. UTC
Disable HWP Interrupt notification before enabling HWP. Since we don't
have HWP interrupt handling for possible performance interrupts, there
is not much use of enabling HWP interrupts.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
---
 drivers/cpufreq/intel_pstate.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Rafael J. Wysocki Feb. 25, 2016, 11:18 p.m. UTC | #1
On Thursday, February 25, 2016 03:09:31 PM Srinivas Pandruvada wrote:
> Disable HWP Interrupt notification before enabling HWP. Since we don't
> have HWP interrupt handling for possible performance interrupts, there
> is not much use of enabling HWP interrupts.
> 
> Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>

The patch is fine, but are there any known systems where it fixes any
functional issues just for the record?

Rafael

--
To unsubscribe from this list: send the line "unsubscribe linux-pm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
srinivas pandruvada Feb. 25, 2016, 11:20 p.m. UTC | #2
On Fri, 2016-02-26 at 00:18 +0100, Rafael J. Wysocki wrote:
> On Thursday, February 25, 2016 03:09:31 PM Srinivas Pandruvada wrote:
> > Disable HWP Interrupt notification before enabling HWP. Since we
> > don't
> > have HWP interrupt handling for possible performance interrupts,
> > there
> > is not much use of enabling HWP interrupts.
> > 
> > Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel
> > .com>
> 
> The patch is fine, but are there any known systems where it fixes any
> functional issues just for the record?

We don't know whether it fixes any functional issue. But it was set on
some system on boot. I worry that this may cause flooding of interrupt
during boot if there are some thermal issues.

Thanks,
Srinivas

> 
> Rafael
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-pm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Rafael J. Wysocki Feb. 26, 2016, 1:28 a.m. UTC | #3
On Thursday, February 25, 2016 03:20:42 PM Srinivas Pandruvada wrote:
> On Fri, 2016-02-26 at 00:18 +0100, Rafael J. Wysocki wrote:
> > On Thursday, February 25, 2016 03:09:31 PM Srinivas Pandruvada wrote:
> > > Disable HWP Interrupt notification before enabling HWP. Since we
> > > don't
> > > have HWP interrupt handling for possible performance interrupts,
> > > there
> > > is not much use of enabling HWP interrupts.
> > > 
> > > Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel
> > > .com>
> > 
> > The patch is fine, but are there any known systems where it fixes any
> > functional issues just for the record?
> 
> We don't know whether it fixes any functional issue.

OK

> But it was set on some system on boot. I worry that this may cause flooding
> of interrupt during boot if there are some thermal issues.

It obviously may lead to problems, which is why the patch is needed.

Thanks,
Rafael

--
To unsubscribe from this list: send the line "unsubscribe linux-pm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Rafael J. Wysocki Feb. 27, 2016, 12:01 a.m. UTC | #4
On Friday, February 26, 2016 02:28:00 AM Rafael J. Wysocki wrote:
> On Thursday, February 25, 2016 03:20:42 PM Srinivas Pandruvada wrote:
> > On Fri, 2016-02-26 at 00:18 +0100, Rafael J. Wysocki wrote:
> > > On Thursday, February 25, 2016 03:09:31 PM Srinivas Pandruvada wrote:
> > > > Disable HWP Interrupt notification before enabling HWP. Since we
> > > > don't
> > > > have HWP interrupt handling for possible performance interrupts,
> > > > there
> > > > is not much use of enabling HWP interrupts.
> > > > 
> > > > Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel
> > > > .com>
> > > 
> > > The patch is fine, but are there any known systems where it fixes any
> > > functional issues just for the record?
> > 
> > We don't know whether it fixes any functional issue.
> 
> OK
> 
> > But it was set on some system on boot. I worry that this may cause flooding
> > of interrupt during boot if there are some thermal issues.
> 
> It obviously may lead to problems, which is why the patch is needed.

I've queued it up for 4.6, thanks!

Rafael

--
To unsubscribe from this list: send the line "unsubscribe linux-pm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
index f4d85c2..80ea548 100644
--- a/drivers/cpufreq/intel_pstate.c
+++ b/drivers/cpufreq/intel_pstate.c
@@ -532,6 +532,9 @@  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);
+
 	wrmsrl_on_cpu(cpudata->cpu, MSR_PM_ENABLE, 0x1);
 }