Repository navigation
Commit 918229c
x86/intel_pstate: Handle runtime turbo disablement/enablement in frequency invariance
On some platforms such as the Dell XPS 13 laptop the firmware disables turbo
when the machine is disconnected from AC, and viceversa it enables it again
when it's reconnected. In these cases a _PPC ACPI notification is issued.
The scheduler needs to know freq_max for frequency-invariant calculations.
To account for turbo availability to come and go, record freq_max at boot as
if turbo was available and store it in a helper variable. Use a setter
function to swap between freq_base and freq_max every time turbo goes off or on.
Signed-off-by: Giovanni Gherdovich <ggherdovich@suse.cz>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Link: https://lkml.kernel.org/r/20200122151617.531-7-ggherdovich@suse.cz1 parent 298c6f9 commit 918229c
3 files changed
Lines changed: 16 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
211 | 211 | | |
212 | 212 | | |
213 | 213 | | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
214 | 219 | | |
215 | 220 | | |
216 | 221 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1807 | 1807 | | |
1808 | 1808 | | |
1809 | 1809 | | |
| 1810 | + | |
1810 | 1811 | | |
1811 | 1812 | | |
| 1813 | + | |
| 1814 | + | |
| 1815 | + | |
| 1816 | + | |
| 1817 | + | |
| 1818 | + | |
1812 | 1819 | | |
1813 | 1820 | | |
1814 | 1821 | | |
| |||
1956 | 1963 | | |
1957 | 1964 | | |
1958 | 1965 | | |
1959 | | - | |
1960 | | - | |
1961 | | - | |
1962 | | - | |
| 1966 | + | |
1963 | 1967 | | |
1964 | 1968 | | |
1965 | 1969 | | |
| |||
1981 | 1985 | | |
1982 | 1986 | | |
1983 | 1987 | | |
1984 | | - | |
| 1988 | + | |
1985 | 1989 | | |
| 1990 | + | |
1986 | 1991 | | |
1987 | 1992 | | |
1988 | 1993 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
922 | 922 | | |
923 | 923 | | |
924 | 924 | | |
| 925 | + | |
925 | 926 | | |
926 | 927 | | |
927 | 928 | | |
| |||
0 commit comments