From 5a344a505093dd65f82f338ffdb7208321b3630e Mon Sep 17 00:00:00 2001 From: Zhao Yakui Date: Mon, 10 Jan 2011 16:35:45 +0800 Subject: ACPI: Reevaluate whether the T-state is supported or not after cpu is online/offline After one CPU is offlined, it is unnecessary to switch T-state for it. So it will be better that the throttling is disabled after the cpu is offline. At the same time after one cpu is online, we should check whether the T-state is supported and then set the corresponding T-state flag. Signed-off-by: Zhao Yakui Signed-off-by: Len Brown --- drivers/acpi/processor_driver.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'drivers/acpi/processor_driver.c') diff --git a/drivers/acpi/processor_driver.c b/drivers/acpi/processor_driver.c index 85e4804..c8a0ca2 100644 --- a/drivers/acpi/processor_driver.c +++ b/drivers/acpi/processor_driver.c @@ -478,8 +478,13 @@ static int acpi_cpu_soft_notify(struct notifier_block *nfb, if (action == CPU_ONLINE && pr) { acpi_processor_ppc_has_changed(pr, 0); acpi_processor_cst_has_changed(pr); + acpi_processor_reevaluate_tstate(pr, action); acpi_processor_tstate_has_changed(pr); } + if (action == CPU_DEAD && pr) { + /* invalidate the flag.throttling after one CPU is offline */ + acpi_processor_reevaluate_tstate(pr, action); + } return NOTIFY_OK; } -- cgit v1.1