Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 77440647 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki
Browse files

Merge branch 'pm-cpufreq'

* pm-cpufreq: (40 commits)
  thermal: exynos: boost: Automatic enable/disable of BOOST feature (at Exynos4412)
  cpufreq: exynos4x12: Change L0 driver data to CPUFREQ_BOOST_FREQ
  Documentation: cpufreq / boost: Update BOOST documentation
  cpufreq: exynos: Extend Exynos cpufreq driver to support boost
  cpufreq / boost: Kconfig: Support for software-managed BOOST
  acpi-cpufreq: Adjust the code to use the common boost attribute
  cpufreq: Add boost frequency support in core
  intel_pstate: Add trace point to report internal state.
  cpufreq: introduce cpufreq_generic_get() routine
  ARM: SA1100: Create dummy clk_get_rate() to avoid build failures
  cpufreq: stats: create sysfs entries when cpufreq_stats is a module
  cpufreq: stats: free table and remove sysfs entry in a single routine
  cpufreq: stats: remove hotplug notifiers
  cpufreq: stats: handle cpufreq_unregister_driver() and suspend/resume properly
  cpufreq: speedstep: remove unused speedstep_get_state
  powernow-k6: reorder frequencies
  powernow-k6: correctly initialize default parameters
  powernow-k6: disable cache when changing frequency
  Documentation: add ABI entry for intel_pstate
  cpufreq: exynos: Convert exynos-cpufreq to platform driver
  ...
parents df34ca72 4f11b85a
Loading
Loading
Loading
Loading
+24 −0
Original line number Diff line number Diff line
@@ -200,3 +200,27 @@ Description: address and size of the percpu note.
		note of cpu#.

		crash_notes_size: size of the note of cpu#.


What:		/sys/devices/system/cpu/intel_pstate/max_perf_pct
		/sys/devices/system/cpu/intel_pstate/min_perf_pct
		/sys/devices/system/cpu/intel_pstate/no_turbo
Date:		February 2013
Contact:	linux-pm@vger.kernel.org
Description:	Parameters for the Intel P-state driver

		Logic for selecting the current P-state in Intel
		Sandybridge+ processors. The three knobs control
		limits for the P-state that will be requested by the
		driver.

		max_perf_pct: limits the maximum P state that will be requested by
		the driver stated as a percentage of the available performance.

		min_perf_pct: limits the minimum P state that will be requested by
		the driver stated as a percentage of the available performance.

		no_turbo: limits the driver to selecting P states below the turbo
		frequency range.

		More details can be found in Documentation/cpu-freq/intel-pstate.txt
+13 −13
Original line number Diff line number Diff line
@@ -17,8 +17,8 @@ Introduction
Some CPUs support a functionality to raise the operating frequency of
some cores in a multi-core package if certain conditions apply, mostly
if the whole chip is not fully utilized and below it's intended thermal
budget. This is done without operating system control by a combination
of hardware and firmware.
budget. The decision about boost disable/enable is made either at hardware
(e.g. x86) or software (e.g ARM).
On Intel CPUs this is called "Turbo Boost", AMD calls it "Turbo-Core",
in technical documentation "Core performance boost". In Linux we use
the term "boost" for convenience.
@@ -48,24 +48,24 @@ be desirable:
User controlled switch
----------------------

To allow the user to toggle the boosting functionality, the acpi-cpufreq
driver exports a sysfs knob to disable it. There is a file:
To allow the user to toggle the boosting functionality, the cpufreq core
driver exports a sysfs knob to enable or disable it. There is a file:
/sys/devices/system/cpu/cpufreq/boost
which can either read "0" (boosting disabled) or "1" (boosting enabled).
Reading the file is always supported, even if the processor does not
support boosting. In this case the file will be read-only and always
reads as "0". Explicitly changing the permissions and writing to that
file anyway will return EINVAL.
The file is exported only when cpufreq driver supports boosting.
Explicitly changing the permissions and writing to that file anyway will
return EINVAL.

On supported CPUs one can write either a "0" or a "1" into this file.
This will either disable the boost functionality on all cores in the
whole system (0) or will allow the hardware to boost at will (1).
whole system (0) or will allow the software or hardware to boost at will
(1).

Writing a "1" does not explicitly boost the system, but just allows the
CPU (and the firmware) to boost at their discretion. Some implementations
take external factors like the chip's temperature into account, so
boosting once does not necessarily mean that it will occur every time
even using the exact same software setup.
CPU to boost at their discretion. Some implementations take external
factors like the chip's temperature into account, so boosting once does
not necessarily mean that it will occur every time even using the exact
same software setup.


AMD legacy cpb switch
+40 −0
Original line number Diff line number Diff line
Intel P-state driver
--------------------

This driver implements a scaling driver with an internal governor for
Intel Core processors.  The driver follows the same model as the
Transmeta scaling driver (longrun.c) and implements the setpolicy()
instead of target().  Scaling drivers that implement setpolicy() are
assumed to implement internal governors by the cpufreq core. All the
logic for selecting the current P state is contained within the
driver; no external governor is used by the cpufreq core.

Intel SandyBridge+ processors are supported.

New sysfs files for controlling P state selection have been added to
/sys/devices/system/cpu/intel_pstate/

      max_perf_pct: limits the maximum P state that will be requested by
      the driver stated as a percentage of the available performance.

      min_perf_pct: limits the minimum P state that will be  requested by
      the driver stated as a percentage of the available performance.

      no_turbo: limits the driver to selecting P states below the turbo
      frequency range.

For contemporary Intel processors, the frequency is controlled by the
processor itself and the P-states exposed to software are related to
performance levels.  The idea that frequency can be set to a single
frequency is fiction for Intel Core processors. Even if the scaling
driver selects a single P state the actual frequency the processor
will run at is selected by the processor itself.

New debugfs files have also been added to /sys/kernel/debug/pstate_snb/

      deadband
      d_gain_pct
      i_gain_pct
      p_gain_pct
      sample_rate_ms
      setpoint
+5 −0
Original line number Diff line number Diff line
@@ -303,6 +303,11 @@ void __init exynos_cpuidle_init(void)
	platform_device_register(&exynos_cpuidle);
}

void __init exynos_cpufreq_init(void)
{
	platform_device_register_simple("exynos-cpufreq", -1, NULL, 0);
}

void __init exynos_init_late(void)
{
	if (of_machine_is_compatible("samsung,exynos5440"))
+1 −0
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ void exynos_init_io(void);
void exynos4_restart(enum reboot_mode mode, const char *cmd);
void exynos5_restart(enum reboot_mode mode, const char *cmd);
void exynos_cpuidle_init(void);
void exynos_cpufreq_init(void);
void exynos_init_late(void);

void exynos_firmware_init(void);
Loading