git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
net/axgbe: toggle PLL settings during rate change
[dpdk.git]
/
lib
/
power
/
power_cppc_cpufreq.c
diff --git
a/lib/power/power_cppc_cpufreq.c
b/lib/power/power_cppc_cpufreq.c
index
e92973a
..
25185a7
100644
(file)
--- a/
lib/power/power_cppc_cpufreq.c
+++ b/
lib/power/power_cppc_cpufreq.c
@@
-246,6
+246,11
@@
power_get_available_freqs(struct cppc_power_info *pi)
pi->nominal_perf * UNIT_DIFF : pi->nominal_perf;
num_freqs = (nominal_perf - scaling_min_freq) / BUS_FREQ + 1 +
pi->turbo_available;
pi->nominal_perf * UNIT_DIFF : pi->nominal_perf;
num_freqs = (nominal_perf - scaling_min_freq) / BUS_FREQ + 1 +
pi->turbo_available;
+ if (num_freqs >= RTE_MAX_LCORE_FREQS) {
+ RTE_LOG(ERR, POWER, "Too many available frequencies: %d\n",
+ num_freqs);
+ goto out;
+ }
/* Generate the freq bucket array. */
for (i = 0, pi->nb_freqs = 0; i < num_freqs; i++) {
/* Generate the freq bucket array. */
for (i = 0, pi->nb_freqs = 0; i < num_freqs; i++) {
@@
-616,7
+621,7
@@
power_cppc_enable_turbo(unsigned int lcore_id)
return -1;
}
return -1;
}
- /* TODO: must set to max once enbling Turbo? Considering add condition:
+ /* TODO: must set to max once en
a
bling Turbo? Considering add condition:
* if ((pi->turbo_available) && (pi->curr_idx <= 1))
*/
/* Max may have changed, so call to max function */
* if ((pi->turbo_available) && (pi->curr_idx <= 1))
*/
/* Max may have changed, so call to max function */