Commit 9558fae
committed
cpufreq: intel_pstate: Read global.no_turbo under READ_ONCE()
Because global.no_turbo is generally not read under intel_pstate_driver_lock
make store_no_turbo() use WRITE_ONCE() for updating it (this is the only
place at which it is updated except for the initialization) and make the
majority of places reading it use READ_ONCE().
Also remove redundant global.turbo_disabled checks from places that
depend on the 'true' value of global.no_turbo because it can only be
'true' if global.turbo_disabled is also 'true'.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>1 parent c626a43 commit 9558fae
1 file changed
+6
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1296 | 1296 | | |
1297 | 1297 | | |
1298 | 1298 | | |
1299 | | - | |
| 1299 | + | |
1300 | 1300 | | |
1301 | 1301 | | |
1302 | 1302 | | |
| |||
1748 | 1748 | | |
1749 | 1749 | | |
1750 | 1750 | | |
1751 | | - | |
| 1751 | + | |
1752 | 1752 | | |
1753 | 1753 | | |
1754 | 1754 | | |
| |||
1913 | 1913 | | |
1914 | 1914 | | |
1915 | 1915 | | |
1916 | | - | |
| 1916 | + | |
1917 | 1917 | | |
1918 | 1918 | | |
1919 | 1919 | | |
| |||
2211 | 2211 | | |
2212 | 2212 | | |
2213 | 2213 | | |
2214 | | - | |
| 2214 | + | |
2215 | 2215 | | |
2216 | 2216 | | |
2217 | 2217 | | |
| |||
2473 | 2473 | | |
2474 | 2474 | | |
2475 | 2475 | | |
2476 | | - | |
| 2476 | + | |
2477 | 2477 | | |
2478 | 2478 | | |
2479 | 2479 | | |
| |||
2610 | 2610 | | |
2611 | 2611 | | |
2612 | 2612 | | |
2613 | | - | |
| 2613 | + | |
2614 | 2614 | | |
2615 | 2615 | | |
2616 | 2616 | | |
| |||
0 commit comments