ia64/linux-2.6.18-xen.hg

changeset 799:c86e5fde3fb1

ACPI: Backport to get correct throtting info after evaluating _PDC

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>
author Keir Fraser <keir.fraser@citrix.com>
date Mon Mar 02 10:54:26 2009 +0000 (2009-03-02)
parents b02a90bf5bbc
children ae2cf9ef03ac
files drivers/acpi/processor_core.c
line diff
     1.1 --- a/drivers/acpi/processor_core.c	Mon Mar 02 10:53:59 2009 +0000
     1.2 +++ b/drivers/acpi/processor_core.c	Mon Mar 02 10:54:26 2009 +0000
     1.3 @@ -510,21 +510,6 @@ static int acpi_processor_get_info(struc
     1.4  		request_region(pr->throttling.address, 6, "ACPI CPU throttle");
     1.5  	}
     1.6  
     1.7 -#if defined(CONFIG_CPU_FREQ) || defined(CONFIG_PROCESSOR_EXTERNAL_CONTROL)
     1.8 -	acpi_processor_ppc_has_changed(pr);
     1.9 -#endif
    1.10 -
    1.11 -	/* 
    1.12 -	 * pr->id may equal to -1 while processor_cntl_external enabled.
    1.13 -	 * throttle and thermal module don't support this case.
    1.14 -	 * Tx only works when dom0 vcpu == pcpu num by far, as we give 
    1.15 -	 * control to dom0.
    1.16 -	 */
    1.17 -	if (pr->id != -1) {
    1.18 -		acpi_processor_get_throttling_info(pr);
    1.19 -		acpi_processor_get_limit_info(pr);
    1.20 -	}
    1.21 -
    1.22  	return 0;
    1.23  }
    1.24  
    1.25 @@ -588,6 +573,21 @@ static int acpi_processor_start(struct a
    1.26  	arch_acpi_processor_init_pdc(pr);
    1.27  	acpi_processor_set_pdc(pr);
    1.28  
    1.29 +#if defined(CONFIG_CPU_FREQ) || defined(CONFIG_PROCESSOR_EXTERNAL_CONTROL)
    1.30 +	acpi_processor_ppc_has_changed(pr);
    1.31 +#endif
    1.32 +
    1.33 +	/* 
    1.34 +	 * pr->id may equal to -1 while processor_cntl_external enabled.
    1.35 +	 * throttle and thermal module don't support this case.
    1.36 +	 * Tx only works when dom0 vcpu == pcpu num by far, as we give 
    1.37 +	 * control to dom0.
    1.38 +	 */
    1.39 +	if (pr->id != -1) {
    1.40 +		acpi_processor_get_throttling_info(pr);
    1.41 +		acpi_processor_get_limit_info(pr);
    1.42 +	}
    1.43 +
    1.44  	acpi_processor_power_init(pr, device);
    1.45  
    1.46  	result = processor_extcntl_prepare(pr);