Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp2020206ybn; Thu, 26 Sep 2019 05:57:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqzYqXCgg++vs6y85pVizu8XKVuVidNXCAGpFPoadjIQSMiFkHEDuMh7e12A05d+v5k02zK9 X-Received: by 2002:a17:906:4ad2:: with SMTP id u18mr2913356ejt.117.1569502657498; Thu, 26 Sep 2019 05:57:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569502657; cv=none; d=google.com; s=arc-20160816; b=ur/Ze3opVAIt9TOJltHxaG1I63lY7jKchh6uJYU7XSvhWUj2iHnz1YNvFuE26VT0cY sEoMOJU3Rcg/y1dSPKsAcq1wseCIiCPnwXq/tJurWjl6nFxlTVCPrCMfgf0QJhB8uaV3 89xHgV9W3pOidu2Mv79308bL9e3LhTpdSVe7wQMfRpcSRNOAmbWCdC8uUmuJKGobn4/a w+Mwrr5cpNjPqXJhBu0OmZiRQpjNtYNvY+VcPPvRRiyHXAn1zHHdv8DpOarCXv01UY4b KScdPV204moPYVmvQyvFv0xL0uotjn6xXpBotR59m3fqPH0i5DaOYj4F2L/mkJ0ZMMqd yJrQ== 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=j1SS8BoDw2F9cuYF2t7Bpb8QnWF3jkTqiLXDmJ4ch5s=; b=XiQtCb1yt5lg9GNiiq4L83WuSsNyxJ8akJ39pEbNoVKXAadlV1nZqwr/7CK81o5IMi BmZ5ehKA2+mCwFxPhwxUVGR01f6OGGXCRUmlG9oME6E63o0iOxcZ31u34RbvQss5u9pH zBUsknMnYxrY0I2OZ5kI8CxLjJByo5ICJb4gRc3f2ua8J9q45wmb6epBgHMQNWZgDMjl W/mLYjVrKcKgRKwnq0M8lxxhxQVaeaqq2WD4CI1OQrIuNlt2Pu/sF4ZSms3T29VTKttq J0Aph/iWcsuAb6lJ/ECp6I0meHvdx/9tS/I+esiFP7dKpBSd1YbhLg0uzyCz9HF/iNb5 J1KQ== 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 a14si1380218eda.111.2019.09.26.05.57.13; Thu, 26 Sep 2019 05:57:37 -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 S1726907AbfIZMzT (ORCPT + 99 others); Thu, 26 Sep 2019 08:55:19 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44732 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726857AbfIZMzR (ORCPT ); Thu, 26 Sep 2019 08:55:17 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0F83C7FDEC; Thu, 26 Sep 2019 12:55:17 +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 84E2860A97; Thu, 26 Sep 2019 12:55:16 +0000 (UTC) From: Prarit Bhargava To: platform-driver-x86@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Prarit Bhargava , Srinivas Pandruvada Subject: [PATCH 5/7] intel-speed-select: Implement CascadeLake-N help and command functions structures Date: Thu, 26 Sep 2019 08:54:59 -0400 Message-Id: <20190926125501.1616-6-prarit@redhat.com> In-Reply-To: <20190926125501.1616-1-prarit@redhat.com> References: <20190926125501.1616-1-prarit@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Thu, 26 Sep 2019 12:55:17 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org CascadeLake-N only supports SST-BF and needs some of the perf-profile commands, and the base-freq commands. Add help functions, and create an empty command structures (the functions will be implemented later in this patchset). Call these functions when running on CascadeLake-N. Signed-off-by: Prarit Bhargava Cc: Srinivas Pandruvada --- .../x86/intel-speed-select/isst-config.c | 37 ++++++++++++++----- 1 file changed, 27 insertions(+), 10 deletions(-) diff --git a/tools/power/x86/intel-speed-select/isst-config.c b/tools/power/x86/intel-speed-select/isst-config.c index 33f328d971d3..a82005825990 100644 --- a/tools/power/x86/intel-speed-select/isst-config.c +++ b/tools/power/x86/intel-speed-select/isst-config.c @@ -1373,6 +1373,10 @@ static void get_clos_assoc(int arg) isst_ctdp_display_information_end(outf); } +static struct process_cmd_struct cn_cmds[] = { + { NULL, NULL, NULL, 0 } +}; + static struct process_cmd_struct isst_cmds[] = { { "perf-profile", "get-lock-status", get_tdp_locked, 0 }, { "perf-profile", "get-config-levels", get_tdp_levels, 0 }, @@ -1557,12 +1561,15 @@ static void isst_help(void) TDP, etc.\n"); printf("\nCommands : For feature=perf-profile\n"); printf("\tinfo\n"); - printf("\tget-lock-status\n"); - printf("\tget-config-levels\n"); - printf("\tget-config-version\n"); - printf("\tget-config-enabled\n"); - printf("\tget-config-current-level\n"); - printf("\tset-config-level\n"); + + if (cpu_model != 0x55) { + printf("\tget-lock-status\n"); + printf("\tget-config-levels\n"); + printf("\tget-config-version\n"); + printf("\tget-config-enabled\n"); + printf("\tget-config-current-level\n"); + printf("\tset-config-level\n"); + } } static void pbf_help(void) @@ -1612,6 +1619,12 @@ static struct process_cmd_help_struct isst_help_cmds[] = { { NULL, NULL } }; +static struct process_cmd_help_struct cn_help_cmds[] = { + { "perf-profile", isst_help }, + { "base-freq", pbf_help }, + { NULL, NULL } +}; + void process_command(int argc, char **argv, struct process_cmd_help_struct *help_cmds, struct process_cmd_struct *cmds) @@ -1768,11 +1781,15 @@ static void cmdline(int argc, char **argv) set_max_cpu_num(); set_cpu_present_cpu_mask(); set_cpu_target_cpu_mask(); - ret = isst_fill_platform_info(); - if (ret) - goto out; - process_command(argc, argv, isst_help_cmds, isst_cmds); + if (cpu_model != 0x55) { + ret = isst_fill_platform_info(); + if (ret) + goto out; + process_command(argc, argv, isst_help_cmds, isst_cmds); + } else { + process_command(argc, argv, cn_help_cmds, cn_cmds); + } out: free_cpu_set(present_cpumask); free_cpu_set(target_cpumask); -- 2.21.0