From patchwork Thu Oct 27 18:10:14 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= X-Patchwork-Id: 9400129 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2EB9A600BA for ; Thu, 27 Oct 2016 18:10:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 238192A338 for ; Thu, 27 Oct 2016 18:10:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 177262A348; Thu, 27 Oct 2016 18:10:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 962AC2A338 for ; Thu, 27 Oct 2016 18:10:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936503AbcJ0SKY (ORCPT ); Thu, 27 Oct 2016 14:10:24 -0400 Received: from mga11.intel.com ([192.55.52.93]:54836 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933792AbcJ0SKW (ORCPT ); Thu, 27 Oct 2016 14:10:22 -0400 Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP; 27 Oct 2016 11:10:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,553,1473145200"; d="scan'208";a="778677875" Received: from stinkbox.fi.intel.com (HELO stinkbox) ([10.237.72.174]) by FMSMGA003.fm.intel.com with SMTP; 27 Oct 2016 11:10:14 -0700 Received: by stinkbox (sSMTP sendmail emulation); Thu, 27 Oct 2016 21:10:14 +0300 From: ville.syrjala@linux.intel.com To: Len Brown Cc: feng.tang@intel.com, Steven Rostedt , Sebastian Andrzej Siewior , Thomas Gleixner , Rik van Riel , "Srivatsa S. Bhat" , Peter Zijlstra , Arjan van de Ven , Rusty Russell , Oleg Nesterov , Tejun Heo , Andrew Morton , Paul McKenney , Linus Torvalds , Paul Turner , "Zhang, Rui" , "Rafael J . Wysocki" , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-acpi@vger.kernel.org, =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= Subject: [PATCH] intel_idle: Don't use on Lenovo Ideapad S10-3t Date: Thu, 27 Oct 2016 21:10:14 +0300 Message-Id: <1477591814-10985-1-git-send-email-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1446499360-31984-1-git-send-email-ville.syrjala@linux.intel.com> References: <1446499360-31984-1-git-send-email-ville.syrjala@linux.intel.com> MIME-Version: 1.0 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Ville Syrjälä 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@intel.com Cc: Steven Rostedt Cc: Sebastian Andrzej Siewior Cc: Thomas Gleixner Cc: Rik van Riel Cc: "Srivatsa S. Bhat" Cc: Peter Zijlstra Cc: Arjan van de Ven Cc: Rusty Russell Cc: Oleg Nesterov Cc: Tejun Heo Cc: Andrew Morton Cc: Paul McKenney Cc: Linus Torvalds Cc: Paul Turner Cc: "Zhang, Rui" Cc: Len Brown Cc: Rafael J. Wysocki Cc: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-arch@vger.kernel.org Cc: linux-acpi@vger.kernel.org Signed-off-by: Ville Syrjälä --- 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 #include #include +#include #include #include #include @@ -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;