Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1780958ybl; Thu, 9 Jan 2020 01:19:52 -0800 (PST) X-Google-Smtp-Source: APXvYqzzE5B1PNg7sCJuS1/c61cYQBRcBnmCfCLfJTP/gJjC7wOmxfiZVQ3tAr5vxf1IDhUbRJkO X-Received: by 2002:a05:6830:194:: with SMTP id q20mr8053517ota.92.1578561591966; Thu, 09 Jan 2020 01:19:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578561591; cv=none; d=google.com; s=arc-20160816; b=s7RFD19b4yzzRECeGUX1S4uevPijwfCXs/SkTtSsEHCELzfdhLT465S1DN+VYIsNC+ tJpD04HXy5Nrxet+e4vx+HpR2GypFIjdTVWYknQVtG6nnqxObIDwfgYKR5//NOqGyvTw b6Kovcs+8ZQcaF8N9+891Ru8gAD6QSWFaxflYq3y+U9FYzHqMeTu4Kk0isgFQoKVFHLy EpZIg75aknAI8Bp9fzUCTK5DpOUsKWkFqHsgs/eT1cxJysHpkN82NCWr3oFKE3mLVvVu tAahd8DKIV9ImAfI3sYWi8kDjefkueN62BHYcOERxEW8LnMHqltY0yKyR/GtGby7quDB c5ZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=0VXun5Kv0djHfYYhto3FmIRqbmx1cWvYWzFfc+rb2W8=; b=nPcXHICyX3C/4dHH7mb6TtwXWrym8arMLjIA8XRKU2z2vw0qmqfDDf/lpeeshrTs1C l0U7I8u7BJH4+g9E6w7uP5DEgoIjI/j4xBkUxDZVGybhxdTRlPukBuPUjej7s0bhzxDZ VcPWrD3gpKDuCBVKELzNivyUlMdBeUg1NIGbzi7gioD60GwQPOK2yLVjnwlYygHmI5Tn TqpyO66+8F/mL8cCZw6QBQUiuC1NCslmoA57b+bH+pEiZJb9JRmDwM2lU4Mbq6pxUoh0 oSb6bQWQysf/EXVaCj2Bu+jEDmBN+MfipjFakmJuyCazsVfdqDsiLe2dSINWOvwX8bYX VE3A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n203si3244097oia.112.2020.01.09.01.19.39; Thu, 09 Jan 2020 01:19:51 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729347AbgAIJSQ (ORCPT + 99 others); Thu, 9 Jan 2020 04:18:16 -0500 Received: from mga18.intel.com ([134.134.136.126]:8755 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729319AbgAIJSQ (ORCPT ); Thu, 9 Jan 2020 04:18:16 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Jan 2020 01:18:15 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,413,1571727600"; d="scan'208";a="246606171" Received: from chenyu-office.sh.intel.com ([10.239.158.173]) by fmsmga004.fm.intel.com with ESMTP; 09 Jan 2020 01:18:14 -0800 From: Chen Yu To: Len Brown Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Rui Zhang , "Rafael J. Wysocki" , Chen Yu Subject: [PATCH] tools/power turbostat: Add Elkhart Lake support Date: Thu, 9 Jan 2020 17:17:01 +0800 Message-Id: <20200109091701.8197-1-yu.c.chen@intel.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Elkhart Lake(TREMONT) succeed GOLDMONT, reuse the code. Elkhart Lake does not support group turbo limit counter register and might trigger failure in has_turbo_ratio_group_limits(), so it is not applicable to reuse GOLDMONT cpuid in intel_model_duplicates(). Signed-off-by: Chen Yu --- tools/power/x86/turbostat/turbostat.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/power/x86/turbostat/turbostat.c b/tools/power/x86/turbostat/turbostat.c index 5d0fddda842c..2d3d0a3d5e07 100644 --- a/tools/power/x86/turbostat/turbostat.c +++ b/tools/power/x86/turbostat/turbostat.c @@ -3265,6 +3265,7 @@ int probe_nhm_msrs(unsigned int family, unsigned int model) case INTEL_FAM6_ATOM_GOLDMONT: /* BXT */ case INTEL_FAM6_ATOM_GOLDMONT_PLUS: case INTEL_FAM6_ATOM_GOLDMONT_D: /* DNV */ + case INTEL_FAM6_ATOM_TREMONT: /* ELK */ pkg_cstate_limits = glm_pkg_cstate_limits; break; default: @@ -3888,6 +3889,7 @@ void rapl_probe_intel(unsigned int family, unsigned int model) break; case INTEL_FAM6_ATOM_GOLDMONT: /* BXT */ case INTEL_FAM6_ATOM_GOLDMONT_PLUS: + case INTEL_FAM6_ATOM_TREMONT: /* ELK */ do_rapl = RAPL_PKG | RAPL_PKG_POWER_INFO; if (rapl_joules) BIC_PRESENT(BIC_Pkg_J); @@ -4295,6 +4297,7 @@ int has_snb_msrs(unsigned int family, unsigned int model) case INTEL_FAM6_ATOM_GOLDMONT: /* BXT */ case INTEL_FAM6_ATOM_GOLDMONT_PLUS: case INTEL_FAM6_ATOM_GOLDMONT_D: /* DNV */ + case INTEL_FAM6_ATOM_TREMONT: /* ELK */ return 1; } return 0; @@ -4324,6 +4327,7 @@ int has_c8910_msrs(unsigned int family, unsigned int model) case INTEL_FAM6_CANNONLAKE_L: /* CNL */ case INTEL_FAM6_ATOM_GOLDMONT: /* BXT */ case INTEL_FAM6_ATOM_GOLDMONT_PLUS: + case INTEL_FAM6_ATOM_TREMONT: /* ELK */ return 1; } return 0; -- 2.17.1