merge linus into release branch
[pandora-kernel.git] / arch / i386 / kernel / cpu / cpufreq / speedstep-centrino.c
index 31c3a5b..8d76550 100644 (file)
@@ -361,11 +361,11 @@ static int centrino_cpu_early_init_acpi(void)
        unsigned int    i, j;
        struct acpi_processor_performance       *data;
 
-       for_each_cpu(i) {
+       for_each_possible_cpu(i) {
                data = kzalloc(sizeof(struct acpi_processor_performance), 
                                GFP_KERNEL);
                if (!data) {
-                       for_each_cpu(j) {
+                       for_each_possible_cpu(j) {
                                kfree(acpi_perf_data[j]);
                                acpi_perf_data[j] = NULL;
                        }
@@ -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) {
@@ -805,7 +811,7 @@ static void __exit centrino_exit(void)
        cpufreq_unregister_driver(&centrino_driver);
 
 #ifdef CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI
-       for_each_cpu(j) {
+       for_each_possible_cpu(j) {
                kfree(acpi_perf_data[j]);
                acpi_perf_data[j] = NULL;
        }