1. 04 8月, 2017 1 次提交
  2. 27 7月, 2017 1 次提交
  3. 26 7月, 2017 5 次提交
  4. 22 7月, 2017 4 次提交
  5. 16 7月, 2017 2 次提交
  6. 12 7月, 2017 1 次提交
    • S
      cpufreq: intel_pstate: Fix ratio setting for min_perf_pct · d4436c0d
      Srinivas Pandruvada 提交于
      When the minimum performance limit percentage is set to the power-up
      default, it is possible that minimum performance ratio is off by one.
      
      In the set_policy() callback the minimum ratio is calculated by
      applying global.min_perf_pct to turbo_ratio and rounding up, but the
      power-up default global.min_perf_pct is already rounded up to the
      next percent in min_perf_pct_min().  That results in two round up
      operations, so for the default min_perf_pct one of them is not
      required.
      
      It is better to remove rounding up in min_perf_pct_min() as this
      matches the displayed min_perf_pct prior to commit c5a2ee7d
      (cpufreq: intel_pstate: Active mode P-state limits rework) in 4.12.
      
      For example on a platform with max turbo ratio of 37 and minimum
      ratio of 10, the min_perf_pct resulted in 28 with the above commit.
      Before this commit it was 27 and it will be the same after this
      change.
      
      Fixes: 1a4fe38a (cpufreq: intel_pstate: Remove max/min fractions to limit performance)
      Reported-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
      Signed-off-by: NSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      d4436c0d
  7. 05 7月, 2017 2 次提交
  8. 30 6月, 2017 1 次提交
  9. 27 6月, 2017 4 次提交
    • P
      cpufreq / CPPC: Initialize policy->min to lowest nonlinear performance · 73808d0f
      Prakash, Prashanth 提交于
      Description of Lowest Perfomance in ACPI 6.1 specification states:
      "Lowest Performance is the absolute lowest performance level of
      the platform. Selecting a performance level lower than the lowest
      nonlinear performance level may actually cause an efficiency penalty,
      but should reduce the instantaneous power consumption of the processor.
      In traditional terms, this represents the T-state range of performance
      levels."
      
      Set the default value of policy->min to Lowest Nonlinear Performance
      to avoid any potential efficiency penalty.
      Signed-off-by: NPrashanth Prakash <pprakash@codeaurora.org>
      Acked-by: NViresh Kumar <viresh.kumar@linaro.org>
      Acked-by: NAlexey Klimov <alexey.klimov@arm.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      73808d0f
    • L
      intel_pstate: skip scheduler hook when in "performance" mode · 82b4e03e
      Len Brown 提交于
      When the governor is set to "performance", intel_pstate does not
      need the scheduler hook for doing any calculations.  Under these
      conditions, its only purpose is to continue to maintain
      cpufreq/scaling_cur_freq.
      
      The cpufreq/scaling_cur_freq sysfs attribute is now provided by
      shared x86 cpufreq code on modern x86 systems, including
      all systems supported by the intel_pstate driver.
      
      So in "performance" governor mode, the scheduler hook can be skipped.
      This applies to both in Software and Hardware P-state control modes.
      Suggested-by: NSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      82b4e03e
    • L
      intel_pstate: delete scheduler hook in HWP mode · 62611cb9
      Len Brown 提交于
      The cpufreq/scaling_cur_freq sysfs attribute is now provided by
      shared x86 cpufreq code on modern x86 systems, including
      all systems supported by the intel_pstate driver.
      
      In HWP mode, maintaining that value was the sole purpose of
      the scheduler hook, intel_pstate_update_util_hwp(),
      so it can now be removed.
      Signed-off-by: NLen Brown <len.brown@intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      62611cb9
    • L
      x86: use common aperfmperf_khz_on_cpu() to calculate KHz using APERF/MPERF · f8475cef
      Len Brown 提交于
      The goal of this change is to give users a uniform and meaningful
      result when they read /sys/...cpufreq/scaling_cur_freq
      on modern x86 hardware, as compared to what they get today.
      
      Modern x86 processors include the hardware needed
      to accurately calculate frequency over an interval --
      APERF, MPERF, and the TSC.
      
      Here we provide an x86 routine to make this calculation
      on supported hardware, and use it in preference to any
      driver driver-specific cpufreq_driver.get() routine.
      
      MHz is computed like so:
      
      MHz = base_MHz * delta_APERF / delta_MPERF
      
      MHz is the average frequency of the busy processor
      over a measurement interval.  The interval is
      defined to be the time between successive invocations
      of aperfmperf_khz_on_cpu(), which are expected to to
      happen on-demand when users read sysfs attribute
      cpufreq/scaling_cur_freq.
      
      As with previous methods of calculating MHz,
      idle time is excluded.
      
      base_MHz above is from TSC calibration global "cpu_khz".
      
      This x86 native method to calculate MHz returns a meaningful result
      no matter if P-states are controlled by hardware or firmware
      and/or if the Linux cpufreq sub-system is or is-not installed.
      
      When this routine is invoked more frequently, the measurement
      interval becomes shorter.  However, the code limits re-computation
      to 10ms intervals so that average frequency remains meaningful.
      
      Discerning users are encouraged to take advantage of
      the turbostat(8) utility, which can gracefully handle
      concurrent measurement intervals of arbitrary length.
      Signed-off-by: NLen Brown <len.brown@intel.com>
      Reviewed-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      f8475cef
  10. 24 6月, 2017 5 次提交
  11. 12 6月, 2017 1 次提交
  12. 05 6月, 2017 2 次提交
  13. 30 5月, 2017 2 次提交
  14. 28 5月, 2017 2 次提交
  15. 26 5月, 2017 1 次提交
  16. 23 5月, 2017 1 次提交
  17. 14 5月, 2017 1 次提交
  18. 12 5月, 2017 1 次提交
    • L
      intel_pstate: use updated msr-index.h HWP.EPP values · 3cedbc5a
      Len Brown 提交于
      intel_pstate exports sysfs attributes for setting and observing HWP.EPP.
      These attributes use strings to describe 4 operating states, and
      inside the driver, these strings are mapped to numerical register
      values.
      
      The authorative mapping between the strings and numerical HWP.EPP values
      are now globally defined in msr-index.h, replacing the out-dated
      mapping that were open-coded into intel_pstate.c
      
      new old string
      --- --- ------
        0   0 performance
      128  64 balance_performance
      192 128 balance_power
      255 192 power
      
      Note that the HW and BIOS default value on most system is 128,
      which intel_pstate will now call "balance_performance"
      while it used to call it "balance_power".
      Signed-off-by: NLen Brown <len.brown@intel.com>
      3cedbc5a
  19. 09 5月, 2017 2 次提交
    • K
      format-security: move static strings to const · 06324664
      Kees Cook 提交于
      While examining output from trial builds with -Wformat-security enabled,
      many strings were found that should be defined as "const", or as a char
      array instead of char pointer.  This makes some static analysis easier,
      by producing fewer false positives.
      
      As these are all trivial changes, it seemed best to put them all in a
      single patch rather than chopping them up per maintainer.
      
      Link: http://lkml.kernel.org/r/20170405214711.GA5711@beastSigned-off-by: NKees Cook <keescook@chromium.org>
      Acked-by: Jes Sorensen <jes@trained-monkey.org>	[runner.c]
      Cc: Tony Lindgren <tony@atomide.com>
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: "Maciej W. Rozycki" <macro@linux-mips.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
      Cc: Viresh Kumar <viresh.kumar@linaro.org>
      Cc: Daniel Vetter <daniel.vetter@intel.com>
      Cc: Jani Nikula <jani.nikula@linux.intel.com>
      Cc: Sean Paul <seanpaul@chromium.org>
      Cc: David Airlie <airlied@linux.ie>
      Cc: Yisen Zhuang <yisen.zhuang@huawei.com>
      Cc: Salil Mehta <salil.mehta@huawei.com>
      Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
      Cc: Jiri Slaby <jslaby@suse.com>
      Cc: Patrice Chotard <patrice.chotard@st.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: Paul Burton <paul.burton@imgtec.com>
      Cc: Matt Redfearn <matt.redfearn@imgtec.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
      Cc: Mugunthan V N <mugunthanvnm@ti.com>
      Cc: Felipe Balbi <felipe.balbi@linux.intel.com>
      Cc: Jarod Wilson <jarod@redhat.com>
      Cc: Florian Westphal <fw@strlen.de>
      Cc: Antonio Quartulli <a@unstable.cc>
      Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
      Cc: Kejian Yan <yankejian@huawei.com>
      Cc: Daode Huang <huangdaode@hisilicon.com>
      Cc: Qianqian Xie <xieqianqian@huawei.com>
      Cc: Philippe Reynes <tremyfr@gmail.com>
      Cc: Colin Ian King <colin.king@canonical.com>
      Cc: Eric Dumazet <edumazet@google.com>
      Cc: Christian Gromm <christian.gromm@microchip.com>
      Cc: Andrey Shvetsov <andrey.shvetsov@k2l.de>
      Cc: Jason Litzinger <jlitzingerdev@gmail.com>
      Cc: WANG Cong <xiyou.wangcong@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      06324664
    • S
      scripts/spelling.txt: add regsiter -> register spelling mistake · ad61dd30
      Stephen Boyd 提交于
      This typo is quite common.  Fix it and add it to the spelling file so
      that checkpatch catches it earlier.
      
      Link: http://lkml.kernel.org/r/20170317011131.6881-2-sboyd@codeaurora.orgSigned-off-by: NStephen Boyd <sboyd@codeaurora.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      ad61dd30
  20. 20 4月, 2017 1 次提交
    • D
      Annotate hardware config module parameters in drivers/cpufreq/ · 40059ec6
      David Howells 提交于
      When the kernel is running in secure boot mode, we lock down the kernel to
      prevent userspace from modifying the running kernel image.  Whilst this
      includes prohibiting access to things like /dev/mem, it must also prevent
      access by means of configuring driver modules in such a way as to cause a
      device to access or modify the kernel image.
      
      To this end, annotate module_param* statements that refer to hardware
      configuration and indicate for future reference what type of parameter they
      specify.  The parameter parser in the core sees this information and can
      skip such parameters with an error message if the kernel is locked down.
      The module initialisation then runs as normal, but just sees whatever the
      default values for those parameters is.
      
      Note that we do still need to do the module initialisation because some
      drivers have viable defaults set in case parameters aren't specified and
      some drivers support automatic configuration (e.g. PNP or PCI) in addition
      to manually coded parameters.
      
      This patch annotates drivers in drivers/cpufreq/.
      Suggested-by: NAlan Cox <gnomes@lxorguk.ukuu.org.uk>
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Acked-by: N"Rafael J. Wysocki" <rjw@rjwysocki.net>
      Acked-by: NViresh Kumar <viresh.kumar@linaro.org>
      cc: linux-pm@vger.kernel.org
      40059ec6