From patchwork Wed Oct 12 18:29:49 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Piotr Luc X-Patchwork-Id: 9373667 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 9845660839 for ; Wed, 12 Oct 2016 18:32:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8878F295D4 for ; Wed, 12 Oct 2016 18:32:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7B962295DE; Wed, 12 Oct 2016 18:32:44 +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 E1BFA295D4 for ; Wed, 12 Oct 2016 18:32:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754719AbcJLScm (ORCPT ); Wed, 12 Oct 2016 14:32:42 -0400 Received: from mga06.intel.com ([134.134.136.31]:51950 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933937AbcJLScl (ORCPT ); Wed, 12 Oct 2016 14:32:41 -0400 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga104.jf.intel.com with ESMTP; 12 Oct 2016 11:30:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,336,1473145200"; d="scan'208";a="1063932867" Received: from gklab-125-115.igk.intel.com ([10.91.125.115]) by orsmga002.jf.intel.com with ESMTP; 12 Oct 2016 11:30:15 -0700 From: Piotr Luc To: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org Cc: "Rafael J. Wysocki" Subject: [PATCH 2/2] tools/power turbostat: enable turbostat to support Knights Mill (KNM) Date: Wed, 12 Oct 2016 20:29:49 +0200 Message-Id: <20161012182949.4015-3-piotr.luc@intel.com> X-Mailer: git-send-email 2.10.1 In-Reply-To: <20161012182949.4015-1-piotr.luc@intel.com> References: <20161012182949.4015-1-piotr.luc@intel.com> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add Knights Mill (KNM) to the list of CPUIDs supported by turbostat. Signed-off-by: Piotr Luc Reviewed-by: Dave Hansen Cc: linux-kernel@vger.kernel.org --- Depends-on: x86/cpu/intel: Add Knights Mill to Intel family https://lkml.kernel.org/r/20161012180520.30976-1-piotr.luc () intel ! com tools/power/x86/turbostat/turbostat.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/power/x86/turbostat/turbostat.c b/tools/power/x86/turbostat/turbostat.c index cea7a76..19c31a7 100644 --- a/tools/power/x86/turbostat/turbostat.c +++ b/tools/power/x86/turbostat/turbostat.c @@ -2212,6 +2212,7 @@ int probe_nhm_msrs(unsigned int family, unsigned int model) pkg_cstate_limits = amt_pkg_cstate_limits; break; case INTEL_FAM6_XEON_PHI_KNL: /* PHI */ + case INTEL_FAM6_XEON_PHI_KNM: /* PHI */ pkg_cstate_limits = phi_pkg_cstate_limits; break; case INTEL_FAM6_ATOM_GOLDMONT: /* BXT */ @@ -2237,6 +2238,7 @@ int has_nhm_turbo_ratio_limit(unsigned int family, unsigned int model) case INTEL_FAM6_NEHALEM_EX: /* Nehalem-EX Xeon - Beckton */ case INTEL_FAM6_WESTMERE_EX: /* Westmere-EX Xeon - Eagleton */ case INTEL_FAM6_XEON_PHI_KNL: /* PHI - Knights Landing (different MSR definition) */ + case INTEL_FAM6_XEON_PHI_KNM: /* PHI - Knights Mill (similar to KNL) */ return 0; default: return 1; @@ -2284,6 +2286,7 @@ int has_knl_turbo_ratio_limit(unsigned int family, unsigned int model) switch (model) { case INTEL_FAM6_XEON_PHI_KNL: /* Knights Landing */ + case INTEL_FAM6_XEON_PHI_KNM: /* Knights Mill */ return 1; default: return 0; @@ -2314,6 +2317,7 @@ int has_config_tdp(unsigned int family, unsigned int model) case INTEL_FAM6_SKYLAKE_X: /* SKX */ case INTEL_FAM6_XEON_PHI_KNL: /* Knights Landing */ + case INTEL_FAM6_XEON_PHI_KNM: /* Knights Mill */ return 1; default: return 0; @@ -2615,6 +2619,7 @@ rapl_dram_energy_units_probe(int model, double rapl_energy_units) case INTEL_FAM6_BROADWELL_X: /* BDX */ case INTEL_FAM6_BROADWELL_XEON_D: /* BDX-DE */ case INTEL_FAM6_XEON_PHI_KNL: /* KNL */ + case INTEL_FAM6_XEON_PHI_KNM: /* KNM */ return (rapl_dram_energy_units = 15.3 / 1000000); default: return (rapl_energy_units); @@ -2663,6 +2668,7 @@ void rapl_probe(unsigned int family, unsigned int model) case INTEL_FAM6_BROADWELL_XEON_D: /* BDX-DE */ case INTEL_FAM6_SKYLAKE_X: /* SKX */ case INTEL_FAM6_XEON_PHI_KNL: /* KNL */ + case INTEL_FAM6_XEON_PHI_KNM: /* KNM */ do_rapl = RAPL_PKG | RAPL_DRAM | RAPL_DRAM_POWER_INFO | RAPL_DRAM_PERF_STATUS | RAPL_PKG_PERF_STATUS | RAPL_PKG_POWER_INFO; break; case INTEL_FAM6_SANDYBRIDGE_X: @@ -3023,6 +3029,7 @@ int is_knl(unsigned int family, unsigned int model) return 0; switch (model) { case INTEL_FAM6_XEON_PHI_KNL: /* KNL */ + case INTEL_FAM6_XEON_PHI_KNM: /* KNM */ return 1; } return 0;