diff options
Diffstat (limited to 'drivers/cpufreq')
-rw-r--r-- | drivers/cpufreq/cpufreq_conservative.c | 12 | ||||
-rw-r--r-- | drivers/cpufreq/cpufreq_ondemand.c | 15 |
2 files changed, 14 insertions, 13 deletions
diff --git a/drivers/cpufreq/cpufreq_conservative.c b/drivers/cpufreq/cpufreq_conservative.c index bdea7e2f94ba..bc33ddc9c97c 100644 --- a/drivers/cpufreq/cpufreq_conservative.c +++ b/drivers/cpufreq/cpufreq_conservative.c | |||
@@ -71,7 +71,7 @@ struct cpu_dbs_info_s { | |||
71 | */ | 71 | */ |
72 | struct mutex timer_mutex; | 72 | struct mutex timer_mutex; |
73 | }; | 73 | }; |
74 | static DEFINE_PER_CPU(struct cpu_dbs_info_s, cpu_dbs_info); | 74 | static DEFINE_PER_CPU(struct cpu_dbs_info_s, cs_cpu_dbs_info); |
75 | 75 | ||
76 | static unsigned int dbs_enable; /* number of CPUs using this policy */ | 76 | static unsigned int dbs_enable; /* number of CPUs using this policy */ |
77 | 77 | ||
@@ -137,7 +137,7 @@ dbs_cpufreq_notifier(struct notifier_block *nb, unsigned long val, | |||
137 | void *data) | 137 | void *data) |
138 | { | 138 | { |
139 | struct cpufreq_freqs *freq = data; | 139 | struct cpufreq_freqs *freq = data; |
140 | struct cpu_dbs_info_s *this_dbs_info = &per_cpu(cpu_dbs_info, | 140 | struct cpu_dbs_info_s *this_dbs_info = &per_cpu(cs_cpu_dbs_info, |
141 | freq->cpu); | 141 | freq->cpu); |
142 | 142 | ||
143 | struct cpufreq_policy *policy; | 143 | struct cpufreq_policy *policy; |
@@ -297,7 +297,7 @@ static ssize_t store_ignore_nice_load(struct cpufreq_policy *policy, | |||
297 | /* we need to re-evaluate prev_cpu_idle */ | 297 | /* we need to re-evaluate prev_cpu_idle */ |
298 | for_each_online_cpu(j) { | 298 | for_each_online_cpu(j) { |
299 | struct cpu_dbs_info_s *dbs_info; | 299 | struct cpu_dbs_info_s *dbs_info; |
300 | dbs_info = &per_cpu(cpu_dbs_info, j); | 300 | dbs_info = &per_cpu(cs_cpu_dbs_info, j); |
301 | dbs_info->prev_cpu_idle = get_cpu_idle_time(j, | 301 | dbs_info->prev_cpu_idle = get_cpu_idle_time(j, |
302 | &dbs_info->prev_cpu_wall); | 302 | &dbs_info->prev_cpu_wall); |
303 | if (dbs_tuners_ins.ignore_nice) | 303 | if (dbs_tuners_ins.ignore_nice) |
@@ -387,7 +387,7 @@ static void dbs_check_cpu(struct cpu_dbs_info_s *this_dbs_info) | |||
387 | cputime64_t cur_wall_time, cur_idle_time; | 387 | cputime64_t cur_wall_time, cur_idle_time; |
388 | unsigned int idle_time, wall_time; | 388 | unsigned int idle_time, wall_time; |
389 | 389 | ||
390 | j_dbs_info = &per_cpu(cpu_dbs_info, j); | 390 | j_dbs_info = &per_cpu(cs_cpu_dbs_info, j); |
391 | 391 | ||
392 | cur_idle_time = get_cpu_idle_time(j, &cur_wall_time); | 392 | cur_idle_time = get_cpu_idle_time(j, &cur_wall_time); |
393 | 393 | ||
@@ -521,7 +521,7 @@ static int cpufreq_governor_dbs(struct cpufreq_policy *policy, | |||
521 | unsigned int j; | 521 | unsigned int j; |
522 | int rc; | 522 | int rc; |
523 | 523 | ||
524 | this_dbs_info = &per_cpu(cpu_dbs_info, cpu); | 524 | this_dbs_info = &per_cpu(cs_cpu_dbs_info, cpu); |
525 | 525 | ||
526 | switch (event) { | 526 | switch (event) { |
527 | case CPUFREQ_GOV_START: | 527 | case CPUFREQ_GOV_START: |
@@ -538,7 +538,7 @@ static int cpufreq_governor_dbs(struct cpufreq_policy *policy, | |||
538 | 538 | ||
539 | for_each_cpu(j, policy->cpus) { | 539 | for_each_cpu(j, policy->cpus) { |
540 | struct cpu_dbs_info_s *j_dbs_info; | 540 | struct cpu_dbs_info_s *j_dbs_info; |
541 | j_dbs_info = &per_cpu(cpu_dbs_info, j); | 541 | j_dbs_info = &per_cpu(cs_cpu_dbs_info, j); |
542 | j_dbs_info->cur_policy = policy; | 542 | j_dbs_info->cur_policy = policy; |
543 | 543 | ||
544 | j_dbs_info->prev_cpu_idle = get_cpu_idle_time(j, | 544 | j_dbs_info->prev_cpu_idle = get_cpu_idle_time(j, |
diff --git a/drivers/cpufreq/cpufreq_ondemand.c b/drivers/cpufreq/cpufreq_ondemand.c index d6ba14276bb1..d7a528c80de8 100644 --- a/drivers/cpufreq/cpufreq_ondemand.c +++ b/drivers/cpufreq/cpufreq_ondemand.c | |||
@@ -78,7 +78,7 @@ struct cpu_dbs_info_s { | |||
78 | */ | 78 | */ |
79 | struct mutex timer_mutex; | 79 | struct mutex timer_mutex; |
80 | }; | 80 | }; |
81 | static DEFINE_PER_CPU(struct cpu_dbs_info_s, cpu_dbs_info); | 81 | static DEFINE_PER_CPU(struct cpu_dbs_info_s, od_cpu_dbs_info); |
82 | 82 | ||
83 | static unsigned int dbs_enable; /* number of CPUs using this policy */ | 83 | static unsigned int dbs_enable; /* number of CPUs using this policy */ |
84 | 84 | ||
@@ -149,7 +149,8 @@ static unsigned int powersave_bias_target(struct cpufreq_policy *policy, | |||
149 | unsigned int freq_hi, freq_lo; | 149 | unsigned int freq_hi, freq_lo; |
150 | unsigned int index = 0; | 150 | unsigned int index = 0; |
151 | unsigned int jiffies_total, jiffies_hi, jiffies_lo; | 151 | unsigned int jiffies_total, jiffies_hi, jiffies_lo; |
152 | struct cpu_dbs_info_s *dbs_info = &per_cpu(cpu_dbs_info, policy->cpu); | 152 | struct cpu_dbs_info_s *dbs_info = &per_cpu(od_cpu_dbs_info, |
153 | policy->cpu); | ||
153 | 154 | ||
154 | if (!dbs_info->freq_table) { | 155 | if (!dbs_info->freq_table) { |
155 | dbs_info->freq_lo = 0; | 156 | dbs_info->freq_lo = 0; |
@@ -192,7 +193,7 @@ static unsigned int powersave_bias_target(struct cpufreq_policy *policy, | |||
192 | 193 | ||
193 | static void ondemand_powersave_bias_init_cpu(int cpu) | 194 | static void ondemand_powersave_bias_init_cpu(int cpu) |
194 | { | 195 | { |
195 | struct cpu_dbs_info_s *dbs_info = &per_cpu(cpu_dbs_info, cpu); | 196 | struct cpu_dbs_info_s *dbs_info = &per_cpu(od_cpu_dbs_info, cpu); |
196 | dbs_info->freq_table = cpufreq_frequency_get_table(cpu); | 197 | dbs_info->freq_table = cpufreq_frequency_get_table(cpu); |
197 | dbs_info->freq_lo = 0; | 198 | dbs_info->freq_lo = 0; |
198 | } | 199 | } |
@@ -297,7 +298,7 @@ static ssize_t store_ignore_nice_load(struct cpufreq_policy *policy, | |||
297 | /* we need to re-evaluate prev_cpu_idle */ | 298 | /* we need to re-evaluate prev_cpu_idle */ |
298 | for_each_online_cpu(j) { | 299 | for_each_online_cpu(j) { |
299 | struct cpu_dbs_info_s *dbs_info; | 300 | struct cpu_dbs_info_s *dbs_info; |
300 | dbs_info = &per_cpu(cpu_dbs_info, j); | 301 | dbs_info = &per_cpu(od_cpu_dbs_info, j); |
301 | dbs_info->prev_cpu_idle = get_cpu_idle_time(j, | 302 | dbs_info->prev_cpu_idle = get_cpu_idle_time(j, |
302 | &dbs_info->prev_cpu_wall); | 303 | &dbs_info->prev_cpu_wall); |
303 | if (dbs_tuners_ins.ignore_nice) | 304 | if (dbs_tuners_ins.ignore_nice) |
@@ -388,7 +389,7 @@ static void dbs_check_cpu(struct cpu_dbs_info_s *this_dbs_info) | |||
388 | unsigned int load, load_freq; | 389 | unsigned int load, load_freq; |
389 | int freq_avg; | 390 | int freq_avg; |
390 | 391 | ||
391 | j_dbs_info = &per_cpu(cpu_dbs_info, j); | 392 | j_dbs_info = &per_cpu(od_cpu_dbs_info, j); |
392 | 393 | ||
393 | cur_idle_time = get_cpu_idle_time(j, &cur_wall_time); | 394 | cur_idle_time = get_cpu_idle_time(j, &cur_wall_time); |
394 | 395 | ||
@@ -535,7 +536,7 @@ static int cpufreq_governor_dbs(struct cpufreq_policy *policy, | |||
535 | unsigned int j; | 536 | unsigned int j; |
536 | int rc; | 537 | int rc; |
537 | 538 | ||
538 | this_dbs_info = &per_cpu(cpu_dbs_info, cpu); | 539 | this_dbs_info = &per_cpu(od_cpu_dbs_info, cpu); |
539 | 540 | ||
540 | switch (event) { | 541 | switch (event) { |
541 | case CPUFREQ_GOV_START: | 542 | case CPUFREQ_GOV_START: |
@@ -553,7 +554,7 @@ static int cpufreq_governor_dbs(struct cpufreq_policy *policy, | |||
553 | dbs_enable++; | 554 | dbs_enable++; |
554 | for_each_cpu(j, policy->cpus) { | 555 | for_each_cpu(j, policy->cpus) { |
555 | struct cpu_dbs_info_s *j_dbs_info; | 556 | struct cpu_dbs_info_s *j_dbs_info; |
556 | j_dbs_info = &per_cpu(cpu_dbs_info, j); | 557 | j_dbs_info = &per_cpu(od_cpu_dbs_info, j); |
557 | j_dbs_info->cur_policy = policy; | 558 | j_dbs_info->cur_policy = policy; |
558 | 559 | ||
559 | j_dbs_info->prev_cpu_idle = get_cpu_idle_time(j, | 560 | j_dbs_info->prev_cpu_idle = get_cpu_idle_time(j, |