Skip to content

Commit

Permalink
Pull bugzilla-5737 into release branch
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Renninger authored and Len Brown committed Jun 27, 2006
2 parents 6468463 + 46f18e3 commit d7fa258
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 8 deletions.
8 changes: 7 additions & 1 deletion arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -418,8 +418,14 @@ acpi_cpufreq_cpu_init (
goto err_free;

perf = data->acpi_data;
policy->cpus = perf->shared_cpu_map;
policy->shared_type = perf->shared_type;
/*
* Will let policy->cpus know about dependency only when software
* coordination is required.
*/
if (policy->shared_type == CPUFREQ_SHARED_TYPE_ALL ||
policy->shared_type == CPUFREQ_SHARED_TYPE_ANY)
policy->cpus = perf->shared_cpu_map;

if (cpu_has(c, X86_FEATURE_CONSTANT_TSC)) {
acpi_cpufreq_driver.flags |= CPUFREQ_CONST_LOOPS;
Expand Down
8 changes: 7 additions & 1 deletion arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c
Original file line number Diff line number Diff line change
Expand Up @@ -399,8 +399,14 @@ static int centrino_cpu_init_acpi(struct cpufreq_policy *policy)
dprintk(PFX "obtaining ACPI data failed\n");
return -EIO;
}
policy->cpus = p->shared_cpu_map;
policy->shared_type = p->shared_type;
/*
* Will let policy->cpus know about dependency only when software
* coordination is required.
*/
if (policy->shared_type == CPUFREQ_SHARED_TYPE_ALL ||
policy->shared_type == CPUFREQ_SHARED_TYPE_ANY)
policy->cpus = p->shared_cpu_map;

/* verify the acpi_data */
if (p->state_count <= 1) {
Expand Down
8 changes: 4 additions & 4 deletions drivers/acpi/processor_perflib.c
Original file line number Diff line number Diff line change
Expand Up @@ -691,12 +691,12 @@ int acpi_processor_preregister_performance(
/* Validate the Domain info */
count_target = pdomain->num_processors;
count = 1;
if (pdomain->coord_type == DOMAIN_COORD_TYPE_SW_ALL ||
pdomain->coord_type == DOMAIN_COORD_TYPE_HW_ALL) {
if (pdomain->coord_type == DOMAIN_COORD_TYPE_SW_ALL)
pr->performance->shared_type = CPUFREQ_SHARED_TYPE_ALL;
} else if (pdomain->coord_type == DOMAIN_COORD_TYPE_SW_ANY) {
else if (pdomain->coord_type == DOMAIN_COORD_TYPE_HW_ALL)
pr->performance->shared_type = CPUFREQ_SHARED_TYPE_HW;
else if (pdomain->coord_type == DOMAIN_COORD_TYPE_SW_ANY)
pr->performance->shared_type = CPUFREQ_SHARED_TYPE_ANY;
}

for_each_possible_cpu(j) {
if (i == j)
Expand Down
6 changes: 4 additions & 2 deletions include/linux/cpufreq.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,10 @@ struct cpufreq_policy {
#define CPUFREQ_INCOMPATIBLE (1)
#define CPUFREQ_NOTIFY (2)

#define CPUFREQ_SHARED_TYPE_ALL (0) /* All dependent CPUs should set freq */
#define CPUFREQ_SHARED_TYPE_ANY (1) /* Freq can be set from any dependent CPU */
#define CPUFREQ_SHARED_TYPE_NONE (0) /* None */
#define CPUFREQ_SHARED_TYPE_HW (1) /* HW does needed coordination */
#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*/

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

Expand Down

0 comments on commit d7fa258

Please sign in to comment.