From: Abhishek <huntbag@linux.vnet.ibm.com>
To: shuah <shuah@kernel.org>,
linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: trenn@suse.com, "Gautham R. Shenoy" <ego@linux.vnet.ibm.com>
Subject: Re: [PATCH] cpupower : Handle set and info subcommands for powerpc
Date: Thu, 12 Sep 2019 15:13:40 +0530 [thread overview]
Message-ID: <f43715dd-219b-d3ae-58a9-f343fe745d7d@linux.vnet.ibm.com> (raw)
In-Reply-To: <3326dc53-f8a1-dd7b-5ae8-b86ef5ef8b24@kernel.org>
Hi Shuah,
Thanks for the review. Few comments below.
On 09/11/2019 03:41 PM, shuah wrote:
> On 9/11/19 3:54 AM, Abhishek Goel wrote:
>> Cpupower tool has set and info options which are not being used by
>> POWER machines. For powerpc, we will return directly for these two
>> subcommands. This removes the ambiguous error message while using set
>> option in case of power systems.
>
> What is the error message you see? Please include it in the commit log.
>
Sure. Will include it in next version.
>>
>> Signed-off-by: Abhishek Goel <huntbag@linux.vnet.ibm.com>
>> ---
>> tools/power/cpupower/utils/cpupower-info.c | 5 +++++
>> tools/power/cpupower/utils/cpupower-set.c | 5 +++++
>> 2 files changed, 10 insertions(+)
>>
>> diff --git a/tools/power/cpupower/utils/cpupower-info.c
>> b/tools/power/cpupower/utils/cpupower-info.c
>> index 4c9d342b70ff..674b707a76af 100644
>> --- a/tools/power/cpupower/utils/cpupower-info.c
>> +++ b/tools/power/cpupower/utils/cpupower-info.c
>> @@ -39,6 +39,11 @@ int cmd_info(int argc, char **argv)
>> } params = {};
>> int ret = 0;
>> + #ifdef __powerpc__
>> + printf(_("Cannot read info as system does not support
>> performance bias setting\n"));
>> + return 0;
>> + #endif
>> +
>
We see something like this for "cpupower info" --->
"System does not support Intel's performance bias setting"
> I am not in favor of bailing out this early with this ifdef switch.
> I would rather see this checked somehow(?) when the ambiguous error
> happens.
Since these two options are not being used by any other architecture
except x86, I suggest these options should not even be shown for
other architecture. So we can do something like this in cpupower.c :
static struct cmd_struct commands[] = {
.............
+#if defined (__x86_64__) || defined (__i386__)
{ "set", cmd_set, 1 },
{ "info", cmd_info, 0 },
+#endif
..............
Is this Okay?
>
>> setlocale(LC_ALL, "");
>> textdomain(PACKAGE);
>> diff --git a/tools/power/cpupower/utils/cpupower-set.c
>> b/tools/power/cpupower/utils/cpupower-set.c
>> index 3cd95c6cb974..c95b29278780 100644
>> --- a/tools/power/cpupower/utils/cpupower-set.c
>> +++ b/tools/power/cpupower/utils/cpupower-set.c
>> @@ -41,6 +41,11 @@ int cmd_set(int argc, char **argv)
>> int perf_bias = 0;
>> int ret = 0;
>> + #ifdef __powerpc__
>> + printf(_("System does not support performance bias setting\n"));
>> + return 0;
>> + #endif
>> +
>
> Same here.
>
For "cpupower set -b 10", we get something like :
"Error setting perf-bias value on CPU"
>> setlocale(LC_ALL, "");
>> textdomain(PACKAGE);
>>
>
> thanks,
> -- Shuah
Thanks,
-- Abhishek
next prev parent reply other threads:[~2019-09-12 9:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20190911095424.49605-1-huntbag@linux.vnet.ibm.com>
2019-09-11 10:11 ` shuah
2019-09-12 9:43 ` Abhishek [this message]
2019-09-12 10:16 ` Thomas Renninger
2019-09-12 10:23 ` Abhishek
2019-09-12 9:54 ` Thomas Renninger
2019-09-12 10:19 ` Abhishek
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=f43715dd-219b-d3ae-58a9-f343fe745d7d@linux.vnet.ibm.com \
--to=huntbag@linux.vnet.ibm.com \
--cc=ego@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=shuah@kernel.org \
--cc=trenn@suse.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®