]> xenbits.xensource.com Git - legacy/linux-2.6.18-xen.git/commitdiff
ACPI: Backport to get correct throtting info after evaluating _PDC
authorKeir Fraser <keir.fraser@citrix.com>
Mon, 2 Mar 2009 10:54:26 +0000 (10:54 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Mon, 2 Mar 2009 10:54:26 +0000 (10:54 +0000)
commit 0ac3c571315a53c14d2733564f14ebdb911fe903
Author: Zhao Yakui <yakui.zhao@intel.com>
Date:   Thu Nov 15 17:05:46 2007 +0800

    ACPI: Get throttling info from BIOS only after evaluating _PDC

    Previously _PDC was evaluated later, and thus we'd not get
    the chance to tell the BIOS that we can suport FixedHW registers
    (MSRs)
    and the BIOS would always ask us to use System I/O access
    for throttling.

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Li Shaohua <shaohua.li@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Wei Gang <gang.wei@intel.com>
drivers/acpi/processor_core.c

index 2680e022900f78c04c6b80f438307e4b72526b11..6b9e358a71db473dd149945b721f40d903593436 100644 (file)
@@ -510,21 +510,6 @@ static int acpi_processor_get_info(struct acpi_processor *pr)
                request_region(pr->throttling.address, 6, "ACPI CPU throttle");
        }
 
-#if defined(CONFIG_CPU_FREQ) || defined(CONFIG_PROCESSOR_EXTERNAL_CONTROL)
-       acpi_processor_ppc_has_changed(pr);
-#endif
-
-       /* 
-        * pr->id may equal to -1 while processor_cntl_external enabled.
-        * throttle and thermal module don't support this case.
-        * Tx only works when dom0 vcpu == pcpu num by far, as we give 
-        * control to dom0.
-        */
-       if (pr->id != -1) {
-               acpi_processor_get_throttling_info(pr);
-               acpi_processor_get_limit_info(pr);
-       }
-
        return 0;
 }
 
@@ -588,6 +573,21 @@ static int acpi_processor_start(struct acpi_device *device)
        arch_acpi_processor_init_pdc(pr);
        acpi_processor_set_pdc(pr);
 
+#if defined(CONFIG_CPU_FREQ) || defined(CONFIG_PROCESSOR_EXTERNAL_CONTROL)
+       acpi_processor_ppc_has_changed(pr);
+#endif
+
+       /* 
+        * pr->id may equal to -1 while processor_cntl_external enabled.
+        * throttle and thermal module don't support this case.
+        * Tx only works when dom0 vcpu == pcpu num by far, as we give 
+        * control to dom0.
+        */
+       if (pr->id != -1) {
+               acpi_processor_get_throttling_info(pr);
+               acpi_processor_get_limit_info(pr);
+       }
+
        acpi_processor_power_init(pr, device);
 
        result = processor_extcntl_prepare(pr);