X86: Fix cpufreq _psd HW_ALL coordination bug
authorKeir Fraser <keir.fraser@citrix.com>
Fri, 18 Jul 2008 10:23:25 +0000 (11:23 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Fri, 18 Jul 2008 10:23:25 +0000 (11:23 +0100)
Currently xen cpufreq has a bug when handleing _psd HW_ALL,
which will result in system broken when _psd HW_ALL.
This patch fix this bug by handling _psd HW_ALL in same way as
SW_ALL coordiantion, for the seek of safety.

Signed-off-by: Liu Jinsong <jinsong.liu@intel.com>
xen/arch/x86/acpi/cpufreq/cpufreq.c

index b3c02279d08cc928ff63b8be370ab8609500dc05..cabe94ea93fe3d55403a0458767d4103ca426240 100644 (file)
@@ -433,16 +433,13 @@ acpi_cpufreq_cpu_init(struct cpufreq_policy *policy)
     perf = data->acpi_data;
     policy->shared_type = perf->shared_type;
 
-    /*
-     * Will let policy->cpus know about dependency only when software
-     * coordination is required.
+    /* 
+     * Currently the latest linux (kernel version 2.6.26) 
+     * still has issue when handle the situation _psd HW_ALL coordination.
+     * In Xen hypervisor, we handle _psd HW_ALL coordination in same way as
+     * _psd SW_ALL coordination for the seek of safety.
      */
-    if (policy->shared_type == CPUFREQ_SHARED_TYPE_ALL ||
-        policy->shared_type == CPUFREQ_SHARED_TYPE_ANY) {
-        policy->cpus = perf->shared_cpu_map;
-    } else {
-        policy->cpus = cpumask_of_cpu(cpu);    
-    }
+    policy->cpus = perf->shared_cpu_map;
 
     /* capability check */
     if (perf->state_count <= 1) {