Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 351032
b: refs/heads/master
c: 2624f90
h: refs/heads/master
v: v3
  • Loading branch information
Fabio Baltieri authored and Rafael J. Wysocki committed Feb 1, 2013
1 parent e2d72f5 commit 42e36a5
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 14 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: 6f35a65fbb570086428596d907df6300abffd948
refs/heads/master: 2624f90c16413990ecb0414400174a066319a9f5
2 changes: 1 addition & 1 deletion trunk/drivers/cpufreq/acpi-cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,7 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy)

#ifdef CONFIG_SMP
dmi_check_system(sw_any_bug_dmi_table);
if (bios_with_sw_any_bug && cpumask_weight(policy->cpus) == 1) {
if (bios_with_sw_any_bug && !policy_is_shared(policy)) {
policy->shared_type = CPUFREQ_SHARED_TYPE_ALL;
cpumask_copy(policy->cpus, cpu_core_mask(cpu));
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/cpufreq/cpufreq_conservative.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ static void cs_dbs_timer(struct work_struct *work)
struct cs_cpu_dbs_info_s *dbs_info = container_of(work,
struct cs_cpu_dbs_info_s, cdbs.work.work);

if (dbs_sw_coordinated_cpus(&dbs_info->cdbs)) {
if (policy_is_shared(dbs_info->cdbs.cur_policy)) {
cs_timer_coordinated(dbs_info, dw);
} else {
mutex_lock(&dbs_info->cdbs.timer_mutex);
Expand Down
8 changes: 0 additions & 8 deletions trunk/drivers/cpufreq/cpufreq_governor.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,14 +161,6 @@ void dbs_check_cpu(struct dbs_data *dbs_data, int cpu)
}
EXPORT_SYMBOL_GPL(dbs_check_cpu);

bool dbs_sw_coordinated_cpus(struct cpu_dbs_common_info *cdbs)
{
struct cpufreq_policy *policy = cdbs->cur_policy;

return cpumask_weight(policy->cpus) > 1;
}
EXPORT_SYMBOL_GPL(dbs_sw_coordinated_cpus);

static inline void dbs_timer_init(struct dbs_data *dbs_data, int cpu,
unsigned int sampling_rate)
{
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/cpufreq/cpufreq_governor.h
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,6 @@ static inline int delay_for_sampling_rate(unsigned int sampling_rate)

u64 get_cpu_idle_time(unsigned int cpu, u64 *wall);
void dbs_check_cpu(struct dbs_data *dbs_data, int cpu);
bool dbs_sw_coordinated_cpus(struct cpu_dbs_common_info *cdbs);
int cpufreq_governor_dbs(struct dbs_data *dbs_data,
struct cpufreq_policy *policy, unsigned int event);
#endif /* _CPUFREQ_GOVERNER_H */
2 changes: 1 addition & 1 deletion trunk/drivers/cpufreq/cpufreq_ondemand.c
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ static void od_dbs_timer(struct work_struct *work)
struct od_cpu_dbs_info_s *dbs_info =
container_of(work, struct od_cpu_dbs_info_s, cdbs.work.work);

if (dbs_sw_coordinated_cpus(&dbs_info->cdbs)) {
if (policy_is_shared(dbs_info->cdbs.cur_policy)) {
od_timer_coordinated(dbs_info, dw);
} else {
mutex_lock(&dbs_info->cdbs.timer_mutex);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/cpufreq/cpufreq_stats.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ static void cpufreq_stats_free_table(unsigned int cpu)
static void cpufreq_stats_free_sysfs(unsigned int cpu)
{
struct cpufreq_policy *policy = cpufreq_cpu_get(cpu);
if (policy && (cpumask_weight(policy->cpus) == 1)) {
if (policy && !policy_is_shared(policy)) {
pr_debug("%s: Free sysfs stat\n", __func__);
sysfs_remove_group(&policy->kobj, &stats_attr_group);
}
Expand Down
5 changes: 5 additions & 0 deletions trunk/include/linux/cpufreq.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,11 @@ struct cpufreq_policy {
#define CPUFREQ_SHARED_TYPE_ALL (2) /* All dependent CPUs should set freq */
#define CPUFREQ_SHARED_TYPE_ANY (3) /* Freq can be set from any dependent CPU*/

static inline bool policy_is_shared(struct cpufreq_policy *policy)
{
return cpumask_weight(policy->cpus) > 1;
}

/******************** cpufreq transition notifiers *******************/

#define CPUFREQ_PRECHANGE (0)
Expand Down

0 comments on commit 42e36a5

Please sign in to comment.