Pull bugzilla-5737 into release branch
authorThomas Renninger <trenn@suse.de>
Tue, 27 Jun 2006 04:06:37 +0000 (00:06 -0400)
committerLen Brown <len.brown@intel.com>
Tue, 27 Jun 2006 04:06:37 +0000 (00:06 -0400)
arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c
arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c
drivers/acpi/processor_perflib.c
include/linux/cpufreq.h

index 5fd65325b81afd2467efb5e5602edc4e4dc3ebee..cf0ddc9ee0cd1bb21af6da6eb0d3dc82b49a46d3 100644 (file)
@@ -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;
index f7e4356f68202f472d4a94aa0684d05244792e1a..8d765509ef593bc9070f346f038b32529ede8210 100644 (file)
@@ -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) {
index 8bd7500c6121dda5ec58074d809bff3b212291ea..5c24ac45717c5a04a870760e3e1f726b41c9d852 100644 (file)
@@ -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)
index 466fbe9e489983bc74fcbc64affcf7f1b717be9a..35e137636b0b4c6dc44cdfc04ef53ec787ffadfd 100644 (file)
@@ -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 *******************/