aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/processor_perflib.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/processor_perflib.c')
-rw-r--r--drivers/acpi/processor_perflib.c22
1 files changed, 7 insertions, 15 deletions
diff --git a/drivers/acpi/processor_perflib.c b/drivers/acpi/processor_perflib.c
index 1e9732d809bf..51d7948611da 100644
--- a/drivers/acpi/processor_perflib.c
+++ b/drivers/acpi/processor_perflib.c
@@ -164,17 +164,12 @@ static void acpi_processor_ppc_ost(acpi_handle handle, int status)
164 {.type = ACPI_TYPE_INTEGER,}, 164 {.type = ACPI_TYPE_INTEGER,},
165 }; 165 };
166 struct acpi_object_list arg_list = {2, params}; 166 struct acpi_object_list arg_list = {2, params};
167 acpi_handle temp;
168 167
169 params[0].integer.value = ACPI_PROCESSOR_NOTIFY_PERFORMANCE; 168 if (acpi_has_method(handle, "_OST")) {
170 params[1].integer.value = status; 169 params[0].integer.value = ACPI_PROCESSOR_NOTIFY_PERFORMANCE;
171 170 params[1].integer.value = status;
172 /* when there is no _OST , skip it */ 171 acpi_evaluate_object(handle, "_OST", &arg_list, NULL);
173 if (ACPI_FAILURE(acpi_get_handle(handle, "_OST", &temp))) 172 }
174 return;
175
176 acpi_evaluate_object(handle, "_OST", &arg_list, NULL);
177 return;
178} 173}
179 174
180int acpi_processor_ppc_has_changed(struct acpi_processor *pr, int event_flag) 175int acpi_processor_ppc_has_changed(struct acpi_processor *pr, int event_flag)
@@ -468,14 +463,11 @@ static int acpi_processor_get_performance_states(struct acpi_processor *pr)
468int acpi_processor_get_performance_info(struct acpi_processor *pr) 463int acpi_processor_get_performance_info(struct acpi_processor *pr)
469{ 464{
470 int result = 0; 465 int result = 0;
471 acpi_status status = AE_OK;
472 acpi_handle handle = NULL;
473 466
474 if (!pr || !pr->performance || !pr->handle) 467 if (!pr || !pr->performance || !pr->handle)
475 return -EINVAL; 468 return -EINVAL;
476 469
477 status = acpi_get_handle(pr->handle, "_PCT", &handle); 470 if (!acpi_has_method(pr->handle, "_PCT")) {
478 if (ACPI_FAILURE(status)) {
479 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 471 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
480 "ACPI-based processor performance control unavailable\n")); 472 "ACPI-based processor performance control unavailable\n"));
481 return -ENODEV; 473 return -ENODEV;
@@ -501,7 +493,7 @@ int acpi_processor_get_performance_info(struct acpi_processor *pr)
501 */ 493 */
502 update_bios: 494 update_bios:
503#ifdef CONFIG_X86 495#ifdef CONFIG_X86
504 if (ACPI_SUCCESS(acpi_get_handle(pr->handle, "_PPC", &handle))){ 496 if (acpi_has_method(pr->handle, "_PPC")) {
505 if(boot_cpu_has(X86_FEATURE_EST)) 497 if(boot_cpu_has(X86_FEATURE_EST))
506 printk(KERN_WARNING FW_BUG "BIOS needs update for CPU " 498 printk(KERN_WARNING FW_BUG "BIOS needs update for CPU "
507 "frequency support\n"); 499 "frequency support\n");