All of lore.kernel.org
 help / color / mirror / Atom feed
From: Prarit Bhargava <prarit@redhat.com>
To: platform-driver-x86@vger.kernel.org
Cc: linux-kernel@vger.kernel.org,
	srinivas.pandruvada@linux.intel.com,
	Prarit Bhargava <prarit@redhat.com>
Subject: [PATCH v2 5/7] intel-speed-select: Implement CascadeLake-N help and command functions structures
Date: Thu,  3 Oct 2019 08:11:10 -0400	[thread overview]
Message-ID: <20191003121112.25870-6-prarit@redhat.com> (raw)
In-Reply-To: <20191003121112.25870-1-prarit@redhat.com>

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 <prarit@redhat.com>
---
 .../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 164c4e5e6ccb..3ab0edade5ec 100644
--- a/tools/power/x86/intel-speed-select/isst-config.c
+++ b/tools/power/x86/intel-speed-select/isst-config.c
@@ -1632,6 +1632,10 @@ static void get_clos_assoc(int arg)
 	isst_ctdp_display_information_end(outf);
 }
 
+static struct process_cmd_struct clx_n_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 },
@@ -1820,12 +1824,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 (!is_clx_n_platform()) {
+		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)
@@ -1875,6 +1882,12 @@ static struct process_cmd_help_struct isst_help_cmds[] = {
 	{ NULL, NULL }
 };
 
+static struct process_cmd_help_struct clx_n_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)
@@ -2031,11 +2044,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 (!is_clx_n_platform()) {
+		ret = isst_fill_platform_info();
+		if (ret)
+			goto out;
+		process_command(argc, argv, isst_help_cmds, isst_cmds);
+	} else {
+		process_command(argc, argv, clx_n_help_cmds, clx_n_cmds);
+	}
 out:
 	free_cpu_set(present_cpumask);
 	free_cpu_set(target_cpumask);
-- 
2.18.1


  parent reply	other threads:[~2019-10-03 12:11 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-03 12:11 [PATCH v2 0/7] Add CascadeLake-N Support Prarit Bhargava
2019-10-03 12:11 ` [PATCH v2 1/7] intel-speed-select: Add int argument to command functions Prarit Bhargava
2019-10-03 12:11 ` [PATCH v2 2/7] intel-speed-select: Make process_command generic Prarit Bhargava
2019-10-03 12:11 ` [PATCH v2 3/7] intel-speed-select: Add check for CascadeLake-N models Prarit Bhargava
2019-10-04 17:15   ` Srinivas Pandruvada
2019-10-04 17:18     ` Prarit Bhargava
2019-10-07 10:03     ` Andy Shevchenko
2019-10-07 19:18       ` Srinivas Pandruvada
2019-10-03 12:11 ` [PATCH v2 4/7] intel-speed-select: Add configuration for CascadeLake-N Prarit Bhargava
2019-10-03 12:11 ` Prarit Bhargava [this message]
2019-10-03 12:11 ` [PATCH v2 6/7] intel-speed-select: Implement 'perf-profile info' on CascadeLake-N Prarit Bhargava
2019-10-04 17:23   ` Srinivas Pandruvada
2019-10-04 17:32     ` Srinivas Pandruvada
2019-10-04 20:14   ` Srinivas Pandruvada
2019-10-03 12:11 ` [PATCH v2 7/7] intel-speed-select: Implement base-freq commands " Prarit Bhargava

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191003121112.25870-6-prarit@redhat.com \
    --to=prarit@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=srinivas.pandruvada@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.