linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] intel_idle: Don't use on Lenovo Ideapad S10-3t
@ 2015-11-02 21:22 ville.syrjala
  2015-11-03  3:04 ` Brown, Len
  2016-10-27 18:10 ` ville.syrjala
  0 siblings, 2 replies; 7+ messages in thread
From: ville.syrjala @ 2015-11-02 21:22 UTC (permalink / raw)
  To: Len Brown
  Cc: Rafael J. Wysocki, linux-pm, linux-kernel, Ville Syrjälä

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Lenovo Ideapad S10-3t hangs coming out of S3 with intel_idle.
The two workaround that seem to help are "intel_idle.max_cstate=0"
or "nohz=off highres=off".

At a first glance quirk_tigerpoint_bm_sts() seemed promising, but
even when moved to early_resume it didn't do anything.

I have no idea what's wrong here, so let's just disable intel_idle
for these machines using a DMI match.

Cc: Len Brown <len.brown@intel.com>
Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
If anyone has any better ideas, I can try out some patches.

 drivers/idle/intel_idle.c | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c
index cd4510a..c4a6888 100644
--- a/drivers/idle/intel_idle.c
+++ b/drivers/idle/intel_idle.c
@@ -61,6 +61,7 @@
 #include <linux/notifier.h>
 #include <linux/cpu.h>
 #include <linux/module.h>
+#include <linux/dmi.h>
 #include <asm/cpu_device_id.h>
 #include <asm/mwait.h>
 #include <asm/msr.h>
@@ -925,6 +926,25 @@ static const struct x86_cpu_id intel_idle_ids[] __initconst = {
 };
 MODULE_DEVICE_TABLE(x86cpu, intel_idle_ids);
 
+static int intel_idle_disable_callback(const struct dmi_system_id *id)
+{
+	pr_debug(PREFIX "problematic system (%s), disabling\n", id->ident);
+	return 1;
+}
+
+static const struct dmi_system_id intel_idle_disable_dmi[] = {
+	{
+		/* Lenovo Ideapad S10-3t, hangs coming out of S3 */
+		.callback = intel_idle_disable_callback,
+		.ident = "Lenovo Ideapad S10-3t",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+			DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo Ideapad S10-3t"),
+		},
+	},
+	{}
+};
+
 /*
  * intel_idle_probe()
  */
@@ -957,6 +977,9 @@ static int __init intel_idle_probe(void)
 	    !mwait_substates)
 			return -ENODEV;
 
+	if (dmi_check_system(intel_idle_disable_dmi))
+		return -ENODEV;
+
 	pr_debug(PREFIX "MWAIT substates: 0x%x\n", mwait_substates);
 
 	icpu = (const struct idle_cpu *)id->driver_data;
-- 
2.4.10


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-10-27 22:25 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-02 21:22 [PATCH] intel_idle: Don't use on Lenovo Ideapad S10-3t ville.syrjala
2015-11-03  3:04 ` Brown, Len
2015-11-04 16:21   ` Ville Syrjälä
2015-11-08 19:20     ` Henrique de Moraes Holschuh
2015-11-09 10:28       ` Ville Syrjälä
2016-10-27 18:10 ` ville.syrjala
2016-10-27 22:22   ` Thomas Gleixner

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).