From patchwork Fri Aug 22 11:39:00 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mika Westerberg X-Patchwork-Id: 4763221 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.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 8686B9F2E8 for ; Fri, 22 Aug 2014 11:39:07 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B9B8320179 for ; Fri, 22 Aug 2014 11:39:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C32CB20172 for ; Fri, 22 Aug 2014 11:39:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756052AbaHVLjE (ORCPT ); Fri, 22 Aug 2014 07:39:04 -0400 Received: from mga01.intel.com ([192.55.52.88]:55491 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751947AbaHVLjD (ORCPT ); Fri, 22 Aug 2014 07:39:03 -0400 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 22 Aug 2014 04:39:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.04,379,1406617200"; d="scan'208";a="588480379" Received: from blue.fi.intel.com ([10.237.72.156]) by fmsmga002.fm.intel.com with ESMTP; 22 Aug 2014 04:39:01 -0700 Received: by blue.fi.intel.com (Postfix, from userid 1004) id 8BF04E00A3; Fri, 22 Aug 2014 14:39:00 +0300 (EEST) From: Mika Westerberg To: Len Brown Cc: Kumar P Mahesh , Alan Cox , Mika Westerberg , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2] intel_idle: add idle values for Cherrytrail/Braswell Date: Fri, 22 Aug 2014 14:39:00 +0300 Message-Id: <1408707540-12393-1-git-send-email-mika.westerberg@linux.intel.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1408701508-13636-1-git-send-email-mika.westerberg@linux.intel.com> References: <1408701508-13636-1-git-send-email-mika.westerberg@linux.intel.com> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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: Mahesh Kumar P Cherrytrail/Braswell is a successor of Intel Baytrail but has slighly different CPU idle values and latencies. Signed-off-by: Kumar P Mahesh Signed-off-by: Alan Cox Signed-off-by: Mika Westerberg --- I learned from Mahesh that C1e, C4 and S0i2 states are deprecated so those are now removed. drivers/idle/intel_idle.c | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c index 9b7ee7e427df..e472580c1826 100644 --- a/drivers/idle/intel_idle.c +++ b/drivers/idle/intel_idle.c @@ -197,6 +197,42 @@ static struct cpuidle_state snb_cstates[] = { .enter = NULL } }; +static struct cpuidle_state cht_cstates[] = { + { /* MWAIT C1 */ + .name = "C1-CHT", + .desc = "MWAIT 0x00", + .flags = MWAIT2flg(0x00) | CPUIDLE_FLAG_TIME_VALID, + .exit_latency = 1, + .target_residency = 4, + .enter = &intel_idle }, + { /* MWAIT C6 */ + .name = "C6-CHT", + .desc = "MWAIT 0x52", + .flags = MWAIT2flg(0x52) | CPUIDLE_FLAG_TIME_VALID + | CPUIDLE_FLAG_TLB_FLUSHED, + .exit_latency = 140, + .target_residency = 560, + .enter = &intel_idle }, + { /* MWAIT C7-S0i1 */ + .name = "S0i1-CHT", + .desc = "MWAIT 0x60", + .flags = MWAIT2flg(0x60) | CPUIDLE_FLAG_TIME_VALID + | CPUIDLE_FLAG_TLB_FLUSHED, + .exit_latency = 1200, + .target_residency = 4000, + .enter = &intel_idle }, + { /* MWAIT C9-S0i3 */ + .name = "S0i3-CHT", + .desc = "MWAIT 0x64", + .flags = MWAIT2flg(0x64) | CPUIDLE_FLAG_TIME_VALID + | CPUIDLE_FLAG_TLB_FLUSHED, + .exit_latency = 10000, + .target_residency = 20000, + .enter = &intel_idle }, + { + .enter = NULL } +}; + static struct cpuidle_state byt_cstates[] = { { .name = "C1-BYT", @@ -677,6 +713,11 @@ static const struct idle_cpu idle_cpu_byt = { .byt_auto_demotion_disable_flag = true, }; +static const struct idle_cpu idle_cpu_cht = { + .state_table = cht_cstates, + .disable_promotion_to_c1e = true, +}; + static const struct idle_cpu idle_cpu_ivb = { .state_table = ivb_cstates, .disable_promotion_to_c1e = true, @@ -725,6 +766,7 @@ static const struct x86_cpu_id intel_idle_ids[] = { ICPU(0x3f, idle_cpu_hsw), ICPU(0x45, idle_cpu_hsw), ICPU(0x46, idle_cpu_hsw), + ICPU(0x4c, idle_cpu_cht), ICPU(0x4d, idle_cpu_avn), ICPU(0x3d, idle_cpu_bdw), ICPU(0x4f, idle_cpu_bdw),