Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1562585

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

From Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Newsgroups linux.kernel
Subject Re: [PATCH v2] platform: x86: Support Turbo Boost Max 3.0 for non HWP systems
Date 2017-01-19 11:50 +0100
Message-ID <t1is1-qM-7@gated-at.bofh.it> (permalink)
References <t13sZ-7Dp-3@gated-at.bofh.it> <t17dh-1CE-39@gated-at.bofh.it>
Organization Intel Finland Oy

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2] platform: x86: Support Turbo Boost Max 3.0 for non HWP systems Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> - 2017-01-18 19:50 +0100
  Re: [PATCH v2] platform: x86: Support Turbo Boost Max 3.0 for non HWP systems Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-01-18 20:20 +0100
  Re: [PATCH v2] platform: x86: Support Turbo Boost Max 3.0 for non  HWP systems Darren Hart <dvhart@infradead.org> - 2017-01-18 21:50 +0100
  Re: [PATCH v2] platform: x86: Support Turbo Boost Max 3.0 for non  HWP systems Tim Chen <tim.c.chen@linux.intel.com> - 2017-01-18 23:50 +0100
    Re: [PATCH v2] platform: x86: Support Turbo Boost Max 3.0 for non  HWP systems Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2017-01-19 11:50 +0100
      Re: [PATCH v2] platform: x86: Support Turbo Boost Max 3.0 for non  HWP systems Tim Chen <tim.c.chen@linux.intel.com> - 2017-01-19 20:50 +0100

csiph-web