From patchwork Fri Feb 1 04:11:34 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Len Brown X-Patchwork-Id: 2076471 X-Patchwork-Delegate: lenb@kernel.org Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 1949BDFE75 for ; Fri, 1 Feb 2013 04:20:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754300Ab3BAEUJ (ORCPT ); Thu, 31 Jan 2013 23:20:09 -0500 Received: from mail-ve0-f182.google.com ([209.85.128.182]:43156 "EHLO mail-ve0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755283Ab3BAET5 (ORCPT ); Thu, 31 Jan 2013 23:19:57 -0500 X-Greylist: delayed 493 seconds by postgrey-1.27 at vger.kernel.org; Thu, 31 Jan 2013 23:19:57 EST Received: by mail-ve0-f182.google.com with SMTP id ox1so1773363veb.13 for ; Thu, 31 Jan 2013 20:19:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:in-reply-to:references:reply-to:organization; bh=55uQtkFl7de3GMtGN00uYoJmQq9Y6JBk8sUu/nd7IJY=; b=QsDwdJr02JFKvrgClRHvKW4EEmgfSdb8gkhXxnmiloJXPQxiWIQgp+xBBRAtCUMvIx yL8Vyq0x0eQfWprSYBuQK8Lm9KsGNB5GkomjDczL/11R7s9niZ5hiAVOCMvRa5TW0IOu U+vDsKQ7Feo35qGZTrQPDx7W7ELlqAzASfy208mP/cywDlguMnhyqKSkfrjfCF57BFn5 VawmKpPY+g4WLvN3+ZOjRP77ccUN4q7eY2tLcWqXFBov/EKVy42uExc3ZsNUA/SQlYT0 O00og0QLPiN08/skhdNlIhTtCNuSpF0v+PxPOcnClDUWmQCktz12X3A5dRlZLrR1FVlB xyrA== X-Received: by 10.58.133.227 with SMTP id pf3mr6133476veb.0.1359691906497; Thu, 31 Jan 2013 20:11:46 -0800 (PST) Received: from x980.localdomain6 (pool-108-7-58-246.bstnma.fios.verizon.net. [108.7.58.246]) by mx.google.com with ESMTPS id cl9sm7079625vdb.3.2013.01.31.20.11.45 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 31 Jan 2013 20:11:45 -0800 (PST) From: Len Brown To: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Len Brown Subject: [PATCH 2/4] tools/power turbostat: support HSW Date: Thu, 31 Jan 2013 23:11:34 -0500 Message-Id: X-Mailer: git-send-email 1.8.1.2.422.g08c0e7f In-Reply-To: <1359691896-23567-1-git-send-email-lenb@kernel.org> References: <1359691896-23567-1-git-send-email-lenb@kernel.org> In-Reply-To: <9a38405338d7464c852c4524465f84f8a2ac22fb.1359691799.git.len.brown@intel.com> References: <9a38405338d7464c852c4524465f84f8a2ac22fb.1359691799.git.len.brown@intel.com> Reply-To: Len Brown Organization: Intel Open Source Technology Center Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org From: Len Brown This patch enables turbostat to run properly on the next-generation Intel(R) Microarchitecture, code named Haswell (HSW). HSW supports the BCLK and counters found in SNB. Signed-off-by: Len Brown --- tools/power/x86/turbostat/turbostat.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tools/power/x86/turbostat/turbostat.c b/tools/power/x86/turbostat/turbostat.c index ce6d460..b326878 100644 --- a/tools/power/x86/turbostat/turbostat.c +++ b/tools/power/x86/turbostat/turbostat.c @@ -1397,6 +1397,9 @@ int has_nehalem_turbo_ratio_limit(unsigned int family, unsigned int model) case 0x2D: /* SNB Xeon */ case 0x3A: /* IVB */ case 0x3E: /* IVB Xeon */ + case 0x3C: /* HSW */ + case 0x3F: /* HSW */ + case 0x45: /* HSW */ return 1; case 0x2E: /* Nehalem-EX Xeon - Beckton */ case 0x2F: /* Westmere-EX Xeon - Eagleton */ @@ -1488,6 +1491,9 @@ void rapl_probe(unsigned int family, unsigned int model) switch (model) { case 0x2A: case 0x3A: + case 0x3C: /* HSW */ + case 0x3F: /* HSW */ + case 0x45: /* HSW */ do_rapl = RAPL_PKG | RAPL_CORES | RAPL_GFX; break; case 0x2D: @@ -1724,6 +1730,9 @@ int is_snb(unsigned int family, unsigned int model) case 0x2D: case 0x3A: /* IVB */ case 0x3E: /* IVB Xeon */ + case 0x3C: /* HSW */ + case 0x3F: /* HSW */ + case 0x45: /* HSW */ return 1; } return 0; @@ -2248,7 +2257,7 @@ int main(int argc, char **argv) cmdline(argc, argv); if (verbose) - fprintf(stderr, "turbostat v3.0 November 23, 2012" + fprintf(stderr, "turbostat v3.1 January 8, 2013" " - Len Brown \n"); turbostat_init();