From patchwork Mon Nov 2 21:22:40 2015 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: 7538221 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 8A1529F71A for ; Mon, 2 Nov 2015 21:22:47 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A91D220662 for ; Mon, 2 Nov 2015 21:22:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9D879205E9 for ; Mon, 2 Nov 2015 21:22:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754088AbbKBVWo (ORCPT ); Mon, 2 Nov 2015 16:22:44 -0500 Received: from mga09.intel.com ([134.134.136.24]:35051 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754036AbbKBVWn (ORCPT ); Mon, 2 Nov 2015 16:22:43 -0500 Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP; 02 Nov 2015 13:22:43 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,236,1444719600"; d="scan'208";a="810001747" Received: from stinkbox.fi.intel.com (HELO stinkbox) ([10.237.72.174]) by orsmga001.jf.intel.com with SMTP; 02 Nov 2015 13:22:40 -0800 Received: by stinkbox (sSMTP sendmail emulation); Mon, 02 Nov 2015 23:22:40 +0200 From: ville.syrjala@linux.intel.com To: Len Brown Cc: "Rafael J. Wysocki" , linux-pm@vger.kernel.org, linux-kernel@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: Mon, 2 Nov 2015 23:22:40 +0200 Message-Id: <1446499360-31984-1-git-send-email-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 2.4.10 MIME-Version: 1.0 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.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. Cc: Len Brown Cc: Rafael J. Wysocki Cc: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Ville Syrjälä --- 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 #include #include +#include #include #include #include @@ -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;