Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp989398ybe; Thu, 5 Sep 2019 08:45:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqy4NBhAX7fB3GLTEm6iEdSm5Y+SZANVx8mwCDSRYDuXNM5NaDOPc97ou3db+dDHjiKzNRDp X-Received: by 2002:a17:90a:e396:: with SMTP id b22mr4487849pjz.126.1567698354142; Thu, 05 Sep 2019 08:45:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567698354; cv=none; d=google.com; s=arc-20160816; b=WNf7qqDG/DhYTRIbOmQ9SIORoy1Gb/yab2dXLpBLEILwnN2W6ZWylHsMId4tLLWoMC x6Tr50kYsIxTOojmmIqqkVAH6fe2hJFzxoZzac2VvN63JFx7i6j3J8MUH+Wz2YHmRIo/ N7H6MYQU55rArcp9gpy4r6kuZE6hIMcS4fhzGfmafj76v3vMONoaZ67jiEaz3pC1KchI Hz3pq0e92cXv4GGENtwAY+h2/WzTGwFEB36oijQ/hXBsI16CL3ElrOp3LB8eD9HmNuhZ lnE1H3uXJaxm/FdkRtOQyG79rc0yhjI2B6QnVw+cdjtbqbwEPlp6u9w5deTzf1QFgsc4 W/UA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=5A4m082Nl/IjIpvy6Fh1It6zOfXNRWPzlfVqGWHoeHc=; b=pkSpZFpiffUL3SPR164oMSj0H13jD5okAmwkxMVadHM1MOC5A/fZBRNwH3yqKcwMxq /Y38iClnzVV/GRORLfLfYSR9exhz4pW63j9Ls5EqTh2Lk9d0bP4i3WoD94sKMwhS9gmH YL+SDlcNgjnS7FWyPyE+xGElVZ9teMRSEMROkmY7YFG7XosbJtxqBIDgqEw3aBm4VtAI lPO69MFj7vdKa2Twjm3OBSwSCGqk372zBz+T0h9Tz8seVf7mqeEtN4o7F14zVVQ4fTWe 4S5qy/rzPVe5Scx1Ip+V8lr/Q7D9o77NTcCwwpEIe38zcMgOFRZ1uNLRGbqf0CgbM5vB frQw== 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 98si2245063plb.345.2019.09.05.08.45.38; Thu, 05 Sep 2019 08:45:54 -0700 (PDT) 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389140AbfIEMDj (ORCPT + 99 others); Thu, 5 Sep 2019 08:03:39 -0400 Received: from mx1.redhat.com ([209.132.183.28]:22287 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389072AbfIEMDY (ORCPT ); Thu, 5 Sep 2019 08:03:24 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0DB447FDCD; Thu, 5 Sep 2019 12:03:24 +0000 (UTC) Received: from prarit.bos.redhat.com (prarit-guest.khw1.lab.eng.bos.redhat.com [10.16.200.63]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5B065100194E; Thu, 5 Sep 2019 12:03:23 +0000 (UTC) From: Prarit Bhargava To: platform-driver-x86@vger.kernel.org Cc: andriy.shevchenko@intel.com, Prarit Bhargava , Srinivas Pandruvada , David Arcari , linux-kernel@vger.kernel.org Subject: [PATCH v2 5/9] tools/power/x86/intel-speed-select: Switch output to MHz Date: Thu, 5 Sep 2019 08:03:07 -0400 Message-Id: <20190905120311.15286-6-prarit@redhat.com> In-Reply-To: <20190905120311.15286-1-prarit@redhat.com> References: <20190905120311.15286-1-prarit@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Thu, 05 Sep 2019 12:03:24 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org These features are introduced on new processors that will never operate in the KHz range. Save some zeros and switch the output to MHz. Signed-off-by: Prarit Bhargava Cc: Srinivas Pandruvada Cc: David Arcari Cc: linux-kernel@vger.kernel.org --- .../x86/intel-speed-select/isst-display.c | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/tools/power/x86/intel-speed-select/isst-display.c b/tools/power/x86/intel-speed-select/isst-display.c index 3ae693efceaa..4ec1924ff7a9 100644 --- a/tools/power/x86/intel-speed-select/isst-display.c +++ b/tools/power/x86/intel-speed-select/isst-display.c @@ -6,7 +6,7 @@ #include "isst.h" -#define DISP_FREQ_MULTIPLIER 100000 +#define DISP_FREQ_MULTIPLIER 100 static void printcpumask(int str_len, char *str, int mask_size, cpu_set_t *cpu_mask) @@ -156,7 +156,7 @@ static void _isst_pbf_display_information(int cpu, FILE *outf, int level, snprintf(header, sizeof(header), "speed-select-base-freq"); format_and_print(outf, disp_level, header, NULL); - snprintf(header, sizeof(header), "high-priority-base-frequency(KHz)"); + snprintf(header, sizeof(header), "high-priority-base-frequency(MHz)"); snprintf(value, sizeof(value), "%d", pbf_info->p1_high * DISP_FREQ_MULTIPLIER); format_and_print(outf, disp_level + 1, header, value); @@ -166,7 +166,7 @@ static void _isst_pbf_display_information(int cpu, FILE *outf, int level, pbf_info->core_cpumask); format_and_print(outf, disp_level + 1, header, value); - snprintf(header, sizeof(header), "low-priority-base-frequency(KHz)"); + snprintf(header, sizeof(header), "low-priority-base-frequency(MHz)"); snprintf(value, sizeof(value), "%d", pbf_info->p1_low * DISP_FREQ_MULTIPLIER); format_and_print(outf, disp_level + 1, header, value); @@ -209,7 +209,7 @@ static void _isst_fact_display_information(int cpu, FILE *outf, int level, if (fact_avx & 0x01) { snprintf(header, sizeof(header), - "high-priority-max-frequency(KHz)"); + "high-priority-max-frequency(MHz)"); snprintf(value, sizeof(value), "%d", bucket_info[j].sse_trl * DISP_FREQ_MULTIPLIER); format_and_print(outf, base_level + 2, header, value); @@ -217,7 +217,7 @@ static void _isst_fact_display_information(int cpu, FILE *outf, int level, if (fact_avx & 0x02) { snprintf(header, sizeof(header), - "high-priority-max-avx2-frequency(KHz)"); + "high-priority-max-avx2-frequency(MHz)"); snprintf(value, sizeof(value), "%d", bucket_info[j].avx_trl * DISP_FREQ_MULTIPLIER); format_and_print(outf, base_level + 2, header, value); @@ -225,7 +225,7 @@ static void _isst_fact_display_information(int cpu, FILE *outf, int level, if (fact_avx & 0x04) { snprintf(header, sizeof(header), - "high-priority-max-avx512-frequency(KHz)"); + "high-priority-max-avx512-frequency(MHz)"); snprintf(value, sizeof(value), "%d", bucket_info[j].avx512_trl * DISP_FREQ_MULTIPLIER); @@ -235,19 +235,19 @@ static void _isst_fact_display_information(int cpu, FILE *outf, int level, snprintf(header, sizeof(header), "speed-select-turbo-freq-clip-frequencies"); format_and_print(outf, base_level + 1, header, NULL); - snprintf(header, sizeof(header), "low-priority-max-frequency(KHz)"); + snprintf(header, sizeof(header), "low-priority-max-frequency(MHz)"); snprintf(value, sizeof(value), "%d", fact_info->lp_clipping_ratio_license_sse * DISP_FREQ_MULTIPLIER); format_and_print(outf, base_level + 2, header, value); snprintf(header, sizeof(header), - "low-priority-max-avx2-frequency(KHz)"); + "low-priority-max-avx2-frequency(MHz)"); snprintf(value, sizeof(value), "%d", fact_info->lp_clipping_ratio_license_avx2 * DISP_FREQ_MULTIPLIER); format_and_print(outf, base_level + 2, header, value); snprintf(header, sizeof(header), - "low-priority-max-avx512-frequency(KHz)"); + "low-priority-max-avx512-frequency(MHz)"); snprintf(value, sizeof(value), "%d", fact_info->lp_clipping_ratio_license_avx512 * DISP_FREQ_MULTIPLIER); @@ -291,7 +291,7 @@ void isst_ctdp_display_information(int cpu, FILE *outf, int tdp_level, snprintf(value, sizeof(value), "%d", ctdp_level->tdp_ratio); format_and_print(outf, base_level + 4, header, value); - snprintf(header, sizeof(header), "base-frequency(KHz)"); + snprintf(header, sizeof(header), "base-frequency(MHz)"); snprintf(value, sizeof(value), "%d", ctdp_level->tdp_ratio * DISP_FREQ_MULTIPLIER); format_and_print(outf, base_level + 4, header, value); -- 2.21.0