Commit 9795a0dd authored by Rafael J. Wysocki's avatar Rafael J. Wysocki

Merge back cpufreq material for v5.8.

parents 8c539776 33aa46f2
...@@ -62,9 +62,10 @@ on the capabilities of the processor. ...@@ -62,9 +62,10 @@ on the capabilities of the processor.
Active Mode Active Mode
----------- -----------
This is the default operation mode of ``intel_pstate``. If it works in this This is the default operation mode of ``intel_pstate`` for processors with
mode, the ``scaling_driver`` policy attribute in ``sysfs`` for all ``CPUFreq`` hardware-managed P-states (HWP) support. If it works in this mode, the
policies contains the string "intel_pstate". ``scaling_driver`` policy attribute in ``sysfs`` for all ``CPUFreq`` policies
contains the string "intel_pstate".
In this mode the driver bypasses the scaling governors layer of ``CPUFreq`` and In this mode the driver bypasses the scaling governors layer of ``CPUFreq`` and
provides its own scaling algorithms for P-state selection. Those algorithms provides its own scaling algorithms for P-state selection. Those algorithms
...@@ -138,12 +139,13 @@ internal P-state selection logic to be less performance-focused. ...@@ -138,12 +139,13 @@ internal P-state selection logic to be less performance-focused.
Active Mode Without HWP Active Mode Without HWP
~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~
This is the default operation mode for processors that do not support the HWP This operation mode is optional for processors that do not support the HWP
feature. It also is used by default with the ``intel_pstate=no_hwp`` argument feature or when the ``intel_pstate=no_hwp`` argument is passed to the kernel in
in the kernel command line. However, in this mode ``intel_pstate`` may refuse the command line. The active mode is used in those cases if the
to work with the given processor if it does not recognize it. [Note that ``intel_pstate=active`` argument is passed to the kernel in the command line.
``intel_pstate`` will never refuse to work with any processor with the HWP In this mode ``intel_pstate`` may refuse to work with processors that are not
feature enabled.] recognized by it. [Note that ``intel_pstate`` will never refuse to work with
any processor with the HWP feature enabled.]
In this mode ``intel_pstate`` registers utilization update callbacks with the In this mode ``intel_pstate`` registers utilization update callbacks with the
CPU scheduler in order to run a P-state selection algorithm, either CPU scheduler in order to run a P-state selection algorithm, either
...@@ -188,10 +190,14 @@ is not set. ...@@ -188,10 +190,14 @@ is not set.
Passive Mode Passive Mode
------------ ------------
This mode is used if the ``intel_pstate=passive`` argument is passed to the This is the default operation mode of ``intel_pstate`` for processors without
kernel in the command line (it implies the ``intel_pstate=no_hwp`` setting too). hardware-managed P-states (HWP) support. It is always used if the
Like in the active mode without HWP support, in this mode ``intel_pstate`` may ``intel_pstate=passive`` argument is passed to the kernel in the command line
refuse to work with the given processor if it does not recognize it. regardless of whether or not the given processor supports HWP. [Note that the
``intel_pstate=no_hwp`` setting implies ``intel_pstate=passive`` if it is used
without ``intel_pstate=active``.] Like in the active mode without HWP support,
in this mode ``intel_pstate`` may refuse to work with processors that are not
recognized by it.
If the driver works in this mode, the ``scaling_driver`` policy attribute in If the driver works in this mode, the ``scaling_driver`` policy attribute in
``sysfs`` for all ``CPUFreq`` policies contains the string "intel_cpufreq". ``sysfs`` for all ``CPUFreq`` policies contains the string "intel_cpufreq".
......
...@@ -2771,6 +2771,8 @@ static int __init intel_pstate_init(void) ...@@ -2771,6 +2771,8 @@ static int __init intel_pstate_init(void)
pr_info("Invalid MSRs\n"); pr_info("Invalid MSRs\n");
return -ENODEV; return -ENODEV;
} }
/* Without HWP start in the passive mode. */
default_driver = &intel_cpufreq;
hwp_cpu_matched: hwp_cpu_matched:
/* /*
...@@ -2816,7 +2818,6 @@ static int __init intel_pstate_setup(char *str) ...@@ -2816,7 +2818,6 @@ static int __init intel_pstate_setup(char *str)
if (!strcmp(str, "disable")) { if (!strcmp(str, "disable")) {
no_load = 1; no_load = 1;
} else if (!strcmp(str, "passive")) { } else if (!strcmp(str, "passive")) {
pr_info("Passive mode enabled\n");
default_driver = &intel_cpufreq; default_driver = &intel_cpufreq;
no_hwp = 1; no_hwp = 1;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment