mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Tim Chen <tim.c.chen@linux.intel.com>,
	Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>,
	dvhart@infradead.org
Cc: platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] platform: x86: Support Turbo Boost Max 3.0 for non HWP systems
Date: Thu, 19 Jan 2017 12:38:34 +0200	[thread overview]
Message-ID: <1484822314.2133.222.camel@linux.intel.com> (raw)
In-Reply-To: <1484779250.2833.34.camel@linux.intel.com>

On Wed, 2017-01-18 at 14:40 -0800, Tim Chen wrote:
> On Wed, 2017-01-18 at 10:29 -0800, Srinivas Pandruvada wrote:
> >  
> > +
> > +static int itmt_legacy_cpu_online(unsigned int cpu)
> > +{
> > +	static u32 max_highest_perf = 0, min_highest_perf =
> > U32_MAX;
> 
> Should the max_highest_perf and min_highest_perf be defined and
> initialized
> outside this function?  Otherwise the max and min value will be lost
> and reset
> each time a new cpu comes online.
> 
> We will always find max_highest_perf == min_highest_perf.

Perhaps you missed static keyword there. Their behaviour is the same as
for global variables, i.e. the initial value assigned only at the
beginning.

-- 
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy

  reply	other threads:[~2017-01-19 10:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-18 18:29 Srinivas Pandruvada
2017-01-18 19:15 ` Andy Shevchenko
2017-01-18 20:36 ` Darren Hart
2017-01-18 22:40 ` Tim Chen
2017-01-19 10:38   ` Andy Shevchenko [this message]
2017-01-19 19:43     ` Tim Chen

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=1484822314.2133.222.camel@linux.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=dvhart@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=srinivas.pandruvada@linux.intel.com \
    --cc=tim.c.chen@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome