mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: srinivas pandruvada <srinivas.pandruvada@linux.intel.com>
To: Hans de Goede <hdegoede@redhat.com>, markgross@kernel.org
Cc: platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] tools/power/x86/intel-speed-select: Display error on turbo mode disabled
Date: Wed, 11 May 2022 09:04:47 -0700	[thread overview]
Message-ID: <7481e4eb79a1eabb7389b3d74d132c111be36477.camel@linux.intel.com> (raw)
In-Reply-To: <e2f85541-3e7b-6120-1c44-70ec4447291c@redhat.com>

Hi Hans,

On Wed, 2022-05-11 at 17:56 +0200, Hans de Goede wrote:
> Hi,
> 
> On 5/10/22 04:34, Srinivas Pandruvada wrote:
> > For Intel SST turbo-freq feature to be enabled, the turbo mode on
> > the
> > platform must be enabled also. If turbo mode is disabled, display
> > error
> > while enabling turbo-freq feature.
> > 
> > Signed-off-by: Srinivas Pandruvada
> > <srinivas.pandruvada@linux.intel.com>
> > ---
> > Since this is a trivial patch, I am not sending a PULL request.
> 
> Note not related to this patch, but when test building intel-speed-
> select
> I got the following compiler warning:
> 
>   CC      hfi-events.o
> In function ‘process_hfi_event’,
>     inlined from ‘handle_event’ at hfi-events.c:220:5:
> hfi-events.c:184:9: warning: ‘perf_cap.cpu’ may be used uninitialized
> [-Wmaybe-uninitialized]
>   184 |         process_level_change(perf_cap->cpu);
>       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> hfi-events.c: In function ‘handle_event’:
> hfi-events.c:193:25: note: ‘perf_cap.cpu’ was declared here
>   193 |         struct perf_cap perf_cap;
>       |                         ^~~~~~~~
> 
> 
Let me send a patch to fix. In reality this will not happen as HFI
message will always have a CPU.

Thanks,
Srinivas


> Regards,
> 
> Hans
> 
> 
> 
> > 
> >  tools/power/x86/intel-speed-select/isst-config.c | 6 ++++++
> >  1 file changed, 6 insertions(+)
> > 
> > diff --git a/tools/power/x86/intel-speed-select/isst-config.c
> > b/tools/power/x86/intel-speed-select/isst-config.c
> > index 060390e88e37..9d35614995ee 100644
> > --- a/tools/power/x86/intel-speed-select/isst-config.c
> > +++ b/tools/power/x86/intel-speed-select/isst-config.c
> > @@ -1892,6 +1892,12 @@ static void set_fact_for_cpu(int cpu, void
> > *arg1, void *arg2, void *arg3,
> >         int ret;
> >         int status = *(int *)arg4;
> >  
> > +       if (status && no_turbo()) {
> > +               isst_display_error_info_message(1, "Turbo mode is
> > disabled", 0, 0);
> > +               ret = -1;
> > +               goto disp_results;
> > +       }
> > +
> >         ret = isst_get_ctdp_levels(cpu, &pkg_dev);
> >         if (ret) {
> >                 isst_display_error_info_message(1, "Failed to get
> > number of levels", 0, 0);
> 


      reply	other threads:[~2022-05-11 16:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-10  2:34 Srinivas Pandruvada
2022-05-11 15:53 ` Hans de Goede
2022-05-11 15:56 ` Hans de Goede
2022-05-11 16:04   ` srinivas pandruvada [this message]

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=7481e4eb79a1eabb7389b3d74d132c111be36477.camel@linux.intel.com \
    --to=srinivas.pandruvada@linux.intel.com \
    --cc=hdegoede@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=markgross@kernel.org \
    --cc=platform-driver-x86@vger.kernel.org \
    /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

Powered by JetHome