Commit eaff6b6
committed
cpufreq: Pass policy pointer to ->update_limits()
Since cpufreq_update_limits() obtains a cpufreq policy pointer for the
given CPU and reference counts the corresponding policy object, it may
as well pass the policy pointer to the cpufreq driver's ->update_limits()
callback which allows that callback to avoid invoking cpufreq_cpu_get()
for the same CPU.
Accordingly, redefine ->update_limits() to take a policy pointer instead
of a CPU number and update both drivers implementing it, intel_pstate
and amd-pstate, as needed.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Acked-by: Sudeep Holla <sudeep.holla@arm.com>
Tested-by: Sudeep Holla <sudeep.holla@arm.com>
Link: https://patch.msgid.link/8560367.NyiUUSuA9g@rjwysocki.net1 parent 684e185 commit eaff6b6
File tree
4 files changed
+22
-18
lines changed- drivers/cpufreq
- include/linux
4 files changed
+22
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
821 | 821 | | |
822 | 822 | | |
823 | 823 | | |
824 | | - | |
| 824 | + | |
825 | 825 | | |
826 | | - | |
827 | 826 | | |
828 | 827 | | |
829 | 828 | | |
| 829 | + | |
830 | 830 | | |
831 | 831 | | |
832 | 832 | | |
833 | 833 | | |
834 | | - | |
835 | | - | |
836 | | - | |
837 | 834 | | |
838 | 835 | | |
839 | 836 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2769 | 2769 | | |
2770 | 2770 | | |
2771 | 2771 | | |
2772 | | - | |
| 2772 | + | |
2773 | 2773 | | |
2774 | 2774 | | |
2775 | 2775 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1353 | 1353 | | |
1354 | 1354 | | |
1355 | 1355 | | |
1356 | | - | |
| 1356 | + | |
| 1357 | + | |
1357 | 1358 | | |
1358 | | - | |
1359 | | - | |
1360 | | - | |
1361 | | - | |
1362 | | - | |
1363 | | - | |
1364 | 1359 | | |
1365 | 1360 | | |
1366 | 1361 | | |
| |||
1370 | 1365 | | |
1371 | 1366 | | |
1372 | 1367 | | |
| 1368 | + | |
| 1369 | + | |
| 1370 | + | |
| 1371 | + | |
| 1372 | + | |
| 1373 | + | |
| 1374 | + | |
| 1375 | + | |
| 1376 | + | |
| 1377 | + | |
| 1378 | + | |
1373 | 1379 | | |
1374 | 1380 | | |
1375 | 1381 | | |
1376 | 1382 | | |
1377 | | - | |
| 1383 | + | |
1378 | 1384 | | |
1379 | | - | |
| 1385 | + | |
1380 | 1386 | | |
1381 | | - | |
1382 | | - | |
| 1387 | + | |
| 1388 | + | |
| 1389 | + | |
1383 | 1390 | | |
1384 | 1391 | | |
1385 | 1392 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
399 | 399 | | |
400 | 400 | | |
401 | 401 | | |
402 | | - | |
| 402 | + | |
403 | 403 | | |
404 | 404 | | |
405 | 405 | | |
| |||
0 commit comments