[PATCH] intel_idle: Don't use on Lenovo Ideapad S10-3t

From: ville . syrjala
Date: Thu Oct 27 2016 - 14:10:28 EST


From: Ville SyrjÃlà <ville.syrjala@xxxxxxxxxxxxxxx>

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.

I sent this patch originally about one year ago, at which time I was
asked to file a bug, which I did [1], which was mostly a waste of time
since no one actually did anything to fix the problem. In the
meantime even acpi-idle got broken and then fixed again [2], so at
least there's still a working alternative. As intel_idle has never
worked on this machine, and it looks like no one has any real
intention to fix it, I'm going to suggest *again* that we simply
disable intel_idle on this machine and get on with life.

[1] https://bugzilla.kernel.org/show_bug.cgi?id=107151
[2] https://lkml.org/lkml/2016/5/11/238

Cc: feng.tang@xxxxxxxxx
Cc: Steven Rostedt <rostedt@xxxxxxxxxxx>
Cc: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx>
Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Cc: Rik van Riel <riel@xxxxxxxxxx>
Cc: "Srivatsa S. Bhat" <srivatsa@xxxxxxx>
Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Cc: Arjan van de Ven <arjan@xxxxxxxxxxxxxxx>
Cc: Rusty Russell <rusty@xxxxxxxxxxxxxxx>
Cc: Oleg Nesterov <oleg@xxxxxxxxxx>
Cc: Tejun Heo <tj@xxxxxxxxxx>
Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Cc: Paul McKenney <paulmck@xxxxxxxxxxxxxxxxxx>
Cc: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
Cc: Paul Turner <pjt@xxxxxxxxxx>
Cc: "Zhang, Rui" <rui.zhang@xxxxxxxxx>
Cc: Len Brown <len.brown@xxxxxxxxx>
Cc: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>
Cc: linux-pm@xxxxxxxxxxxxxxx
Cc: linux-kernel@xxxxxxxxxxxxxxx
Cc: linux-arch@xxxxxxxxxxxxxxx
Cc: linux-acpi@xxxxxxxxxxxxxxx
Signed-off-by: Ville SyrjÃlà <ville.syrjala@xxxxxxxxxxxxxxx>
---
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 4466a2f969d7..db81b27f6250 100644
--- a/drivers/idle/intel_idle.c
+++ b/drivers/idle/intel_idle.c
@@ -59,6 +59,7 @@
#include <linux/notifier.h>
#include <linux/cpu.h>
#include <linux/moduleparam.h>
+#include <linux/dmi.h>
#include <asm/cpu_device_id.h>
#include <asm/intel-family.h>
#include <asm/mwait.h>
@@ -1089,6 +1090,25 @@ static const struct x86_cpu_id intel_idle_ids[] __initconst = {
{}
};

+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()
*/
@@ -1121,6 +1141,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.7.4