Re: [PATCH v2] platform: x86: Support Turbo Boost Max 3.0 for non HWP systems

From: Andy Shevchenko
Date: Thu Jan 19 2017 - 05:40:25 EST


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@xxxxxxxxxxxxxxx>
Intel Finland Oy