Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 110795
b: refs/heads/master
c: bf0b90e
h: refs/heads/master
i:
  110793: 44d08e4
  110791: 4dc0c11
v: v3
  • Loading branch information
venkatesh.pallipadi@intel.com authored and Dave Jones committed Oct 9, 2008
1 parent f21aa80 commit e355a31
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8217e4f4c93e5fb59bb3cd1e6135213889349f86
refs/heads/master: bf0b90e357c883e8efd72954432efe652de74c76
5 changes: 3 additions & 2 deletions trunk/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,8 @@ static u32 get_cur_val(const cpumask_t *mask)
* Only IA32_APERF/IA32_MPERF ratio is architecturally defined and
* no meaning should be associated with absolute values of these MSRs.
*/
static unsigned int get_measured_perf(unsigned int cpu)
static unsigned int get_measured_perf(struct cpufreq_policy *policy,
unsigned int cpu)
{
union {
struct {
Expand Down Expand Up @@ -326,7 +327,7 @@ static unsigned int get_measured_perf(unsigned int cpu)

#endif

retval = per_cpu(drv_data, cpu)->max_freq * perf_percent / 100;
retval = per_cpu(drv_data, policy->cpu)->max_freq * perf_percent / 100;

put_cpu();
set_cpus_allowed_ptr(current, &saved_mask);
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/cpufreq/cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -1487,16 +1487,16 @@ int cpufreq_driver_target(struct cpufreq_policy *policy,
}
EXPORT_SYMBOL_GPL(cpufreq_driver_target);

int __cpufreq_driver_getavg(struct cpufreq_policy *policy)
int __cpufreq_driver_getavg(struct cpufreq_policy *policy, unsigned int cpu)
{
int ret = 0;

policy = cpufreq_cpu_get(policy->cpu);
if (!policy)
return -EINVAL;

if (cpu_online(policy->cpu) && cpufreq_driver->getavg)
ret = cpufreq_driver->getavg(policy->cpu);
if (cpu_online(cpu) && cpufreq_driver->getavg)
ret = cpufreq_driver->getavg(policy, cpu);

cpufreq_cpu_put(policy);
return ret;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/cpufreq/cpufreq_ondemand.c
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ static void dbs_check_cpu(struct cpu_dbs_info_s *this_dbs_info)
if (load < (dbs_tuners_ins.up_threshold - 10)) {
unsigned int freq_next, freq_cur;

freq_cur = __cpufreq_driver_getavg(policy);
freq_cur = __cpufreq_driver_getavg(policy, policy->cpu);
if (!freq_cur)
freq_cur = policy->cur;

Expand Down
7 changes: 5 additions & 2 deletions trunk/include/linux/cpufreq.h
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,8 @@ extern int __cpufreq_driver_target(struct cpufreq_policy *policy,
unsigned int relation);


extern int __cpufreq_driver_getavg(struct cpufreq_policy *policy);
extern int __cpufreq_driver_getavg(struct cpufreq_policy *policy,
unsigned int cpu);

int cpufreq_register_governor(struct cpufreq_governor *governor);
void cpufreq_unregister_governor(struct cpufreq_governor *governor);
Expand Down Expand Up @@ -226,7 +227,9 @@ struct cpufreq_driver {
unsigned int (*get) (unsigned int cpu);

/* optional */
unsigned int (*getavg) (unsigned int cpu);
unsigned int (*getavg) (struct cpufreq_policy *policy,
unsigned int cpu);

int (*exit) (struct cpufreq_policy *policy);
int (*suspend) (struct cpufreq_policy *policy, pm_message_t pmsg);
int (*resume) (struct cpufreq_policy *policy);
Expand Down

0 comments on commit e355a31

Please sign in to comment.