Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp1810ybe; Wed, 4 Sep 2019 14:01:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqwSoE1NGn8YNzXVui0pU6fiwM2x37/vhtVbmrxGkXh69i6QWku4OTPhfSFPacS+5VqeFfPr X-Received: by 2002:a62:cd45:: with SMTP id o66mr49287754pfg.112.1567630883765; Wed, 04 Sep 2019 14:01:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567630883; cv=none; d=google.com; s=arc-20160816; b=q3fQBZEm85OV1tZIcvWtLwf9Jmhf8pBWy5PxGU8ST2jWGzDt1WxcIxb3GxSn8dby/l HpEyCIlcvOXr9J7ndvPbe/ugJ4BcTMBcjak5yft5qrmWpOF7C3VhnEO8NSG2Pg3Ed97D o3kix9g2dHNxOelFwYIsHfT+p4hb8lWaYv+pN/MqZTLcYun4ZlrVB2+iA+zzgikGh0Tu ZRyYL0gQvmDOD6TNIc5ImiZg9wqjWxxfFqBTfpe4YdtyTcwvX6KNLZmPnyewmmKvstTA +3P/E2AfpbvoHji6NeAaR7gf1mxMfGGrOzsU6m8rqgHuawNEARHyvBMacjbmQZArZRn0 ThYA== 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:date:cc:to:from:subject:message-id; bh=FxWpFnEP94Iy+vqgOx4wmwZ1cOwBbw61dpgdUroitu4=; b=ePpwKOLUI1VrMerCpXG5R+HTHLJVGxbjzFubCh8b3mfk573uhQGuVt3QtNx+6i550K 0ePZUktQmfnQEC338AiwooAxF4xxzEODeSCU3TLN4OEK5duSbME9Zc0gLL1LagPo+rA8 6bPoErny8PBNVups0J0kgvwTCxTD9cOJldUuaDnMvwuR3fjzQKc4gqHBN96raoWOq7Za RetIkSLwexT8tRyZ/XxQpvaKEV025JK2ReFscIswOP6XpOTQn1Sz3PisCfQKpQRDqTHv diYvevE9r+5g6zULDVBBiV75rTNstt7vPliqN8Az1CQ/Mx2hNSWIQjEwdflU9hxKqP1r I9Bw== 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 i6si165705pjs.13.2019.09.04.14.01.04; Wed, 04 Sep 2019 14:01:23 -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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730550AbfIDU7t (ORCPT + 99 others); Wed, 4 Sep 2019 16:59:49 -0400 Received: from mga12.intel.com ([192.55.52.136]:57442 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726495AbfIDU7t (ORCPT ); Wed, 4 Sep 2019 16:59:49 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Sep 2019 13:59:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,468,1559545200"; d="scan'208";a="187748999" Received: from spandruv-desk.jf.intel.com ([10.54.75.31]) by orsmga006.jf.intel.com with ESMTP; 04 Sep 2019 13:59:48 -0700 Message-ID: <6119c6d98c056b3a3377031b1e46fb0fa77e6af2.camel@linux.intel.com> Subject: Re: [PATCH 0/8] tools-power-x86-intel-speed-select: Fixes and updates for output From: Srinivas Pandruvada To: Prarit Bhargava , platform-driver-x86@vger.kernel.org, Andy Shevchenko Cc: David Arcari , linux-kernel@vger.kernel.org Date: Wed, 04 Sep 2019 13:59:48 -0700 In-Reply-To: References: <20190903153734.11904-1-prarit@redhat.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 (3.28.5-3.fc28) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2019-09-04 at 16:55 -0400, Prarit Bhargava wrote: > > On 9/4/19 4:06 PM, Srinivas Pandruvada wrote: > > On Tue, 2019-09-03 at 11:37 -0400, Prarit Bhargava wrote: > > > Some general fixes and updates for intel-speed-select. Fixes > > > include > > > some > > > typos as well as an off-by-one cpu count reporting > > > error. Updates > > > for the > > > output are > > > > > > - switching to MHz as a standard > > > - reporting CPU frequencies instead of ratios as a standard > > > - viewing a human-readable CPU list. > > > - avoiding reporting "0|1" as success|fail as these can be > > > confusing > > > for a > > > user. > > > > Series looks fine, except 8/8. > > So please submit v2. Better to resubmit as a series as v2, unless > > Andy > > has other preference. > > Thanks Srinivas. > > I have an additional patch. It looks like there's a memory > leak. Sorry for the > cut-and-paste but if okay I'll submit this as part of v2. Reworking > the code > this way makes it easier to introduce CascadeLake-N support too. > Looks good to me. > diff --git a/tools/power/x86/intel-speed-select/isst-config.c > b/tools/power/x86/ > intel-speed-select/isst-config.c > index 78f0cebda1da..59753b3917bb 100644 > --- a/tools/power/x86/intel-speed-select/isst-config.c > +++ b/tools/power/x86/intel-speed-select/isst-config.c > @@ -603,6 +603,10 @@ static int isst_fill_platform_info(void) > > close(fd); > > + if (isst_platform_info.api_version > supported_api_ver) { > + printf("Incompatible API versions; Upgrade of tool is > required\n"); > + return -1; > + } > return 0; > } > > @@ -1528,6 +1532,7 @@ static void cmdline(int argc, char **argv) > { > int opt; > int option_index = 0; > + int ret; > > static struct option long_options[] = { > { "cpu", required_argument, 0, 'c' }, > @@ -1589,13 +1594,14 @@ static void cmdline(int argc, char **argv) > set_max_cpu_num(); > set_cpu_present_cpu_mask(); > set_cpu_target_cpu_mask(); > - isst_fill_platform_info(); > - if (isst_platform_info.api_version > supported_api_ver) { > - printf("Incompatible API versions; Upgrade of tool is > required\n"); > - exit(0); > - } > + ret = isst_fill_platform_info(); > + if (ret) > + goto out; > > process_command(argc, argv); > +out: > + free_cpu_set(present_cpumask); > + free_cpu_set(target_cpumask); > } > > int main(int argc, char **argv) > > P. > > > > Thanks, > > Srinivas > > > > > > > > Signed-off-by: Prarit Bhargava > > > Cc: Srinivas Pandruvada > > > Cc: David Arcari > > > Cc: linux-kernel@vger.kernel.org > > > > > > Prarit Bhargava (8): > > > tools/power/x86/intel-speed-select: Fix package typo > > > tools/power/x86/intel-speed-select: Fix help option typo > > > tools/power/x86/intel-speed-select: Fix cpu-count output > > > tools/power/x86/intel-speed-select: Simplify output for turbo- > > > freq > > > and > > > base-freq > > > tools/power/x86/intel-speed-select: Switch output to MHz > > > tools/power/x86/intel-speed-select: Change turbo ratio output > > > to > > > maximum turbo frequency > > > tools/power/x86/intel-speed-select: Output human readable CPU > > > list > > > tools/power/x86/intel-speed-select: Output success/failed for > > > command > > > output > > > > > > .../x86/intel-speed-select/isst-config.c | 4 +- > > > .../x86/intel-speed-select/isst-display.c | 116 > > > ++++++++++++-- > > > ---- > > > 2 files changed, 83 insertions(+), 37 deletions(-) > > >