diff options
Diffstat (limited to 'drivers/acpi/processor_perflib.c')
-rw-r--r-- | drivers/acpi/processor_perflib.c | 37 |
1 files changed, 15 insertions, 22 deletions
diff --git a/drivers/acpi/processor_perflib.c b/drivers/acpi/processor_perflib.c index 41aaaba74b19..a79b6ef8122a 100644 --- a/drivers/acpi/processor_perflib.c +++ b/drivers/acpi/processor_perflib.c | |||
@@ -123,7 +123,7 @@ static int acpi_processor_get_platform_limit(struct acpi_processor *pr) | |||
123 | acpi_processor_ppc_status |= PPC_IN_USE; | 123 | acpi_processor_ppc_status |= PPC_IN_USE; |
124 | 124 | ||
125 | if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) { | 125 | if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) { |
126 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error evaluating _PPC\n")); | 126 | ACPI_EXCEPTION((AE_INFO, status, "Evaluating _PPC")); |
127 | return_VALUE(-ENODEV); | 127 | return_VALUE(-ENODEV); |
128 | } | 128 | } |
129 | 129 | ||
@@ -172,14 +172,14 @@ static int acpi_processor_get_performance_control(struct acpi_processor *pr) | |||
172 | 172 | ||
173 | status = acpi_evaluate_object(pr->handle, "_PCT", NULL, &buffer); | 173 | status = acpi_evaluate_object(pr->handle, "_PCT", NULL, &buffer); |
174 | if (ACPI_FAILURE(status)) { | 174 | if (ACPI_FAILURE(status)) { |
175 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error evaluating _PCT\n")); | 175 | ACPI_EXCEPTION((AE_INFO, status, "Evaluating _PCT")); |
176 | return_VALUE(-ENODEV); | 176 | return_VALUE(-ENODEV); |
177 | } | 177 | } |
178 | 178 | ||
179 | pct = (union acpi_object *)buffer.pointer; | 179 | pct = (union acpi_object *)buffer.pointer; |
180 | if (!pct || (pct->type != ACPI_TYPE_PACKAGE) | 180 | if (!pct || (pct->type != ACPI_TYPE_PACKAGE) |
181 | || (pct->package.count != 2)) { | 181 | || (pct->package.count != 2)) { |
182 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid _PCT data\n")); | 182 | ACPI_ERROR((AE_INFO, "Invalid _PCT data")); |
183 | result = -EFAULT; | 183 | result = -EFAULT; |
184 | goto end; | 184 | goto end; |
185 | } | 185 | } |
@@ -193,8 +193,7 @@ static int acpi_processor_get_performance_control(struct acpi_processor *pr) | |||
193 | if ((obj.type != ACPI_TYPE_BUFFER) | 193 | if ((obj.type != ACPI_TYPE_BUFFER) |
194 | || (obj.buffer.length < sizeof(struct acpi_pct_register)) | 194 | || (obj.buffer.length < sizeof(struct acpi_pct_register)) |
195 | || (obj.buffer.pointer == NULL)) { | 195 | || (obj.buffer.pointer == NULL)) { |
196 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 196 | ACPI_ERROR((AE_INFO, "Invalid _PCT data (control_register)")); |
197 | "Invalid _PCT data (control_register)\n")); | ||
198 | result = -EFAULT; | 197 | result = -EFAULT; |
199 | goto end; | 198 | goto end; |
200 | } | 199 | } |
@@ -210,8 +209,7 @@ static int acpi_processor_get_performance_control(struct acpi_processor *pr) | |||
210 | if ((obj.type != ACPI_TYPE_BUFFER) | 209 | if ((obj.type != ACPI_TYPE_BUFFER) |
211 | || (obj.buffer.length < sizeof(struct acpi_pct_register)) | 210 | || (obj.buffer.length < sizeof(struct acpi_pct_register)) |
212 | || (obj.buffer.pointer == NULL)) { | 211 | || (obj.buffer.pointer == NULL)) { |
213 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 212 | ACPI_ERROR((AE_INFO, "Invalid _PCT data (status_register)")); |
214 | "Invalid _PCT data (status_register)\n")); | ||
215 | result = -EFAULT; | 213 | result = -EFAULT; |
216 | goto end; | 214 | goto end; |
217 | } | 215 | } |
@@ -239,13 +237,13 @@ static int acpi_processor_get_performance_states(struct acpi_processor *pr) | |||
239 | 237 | ||
240 | status = acpi_evaluate_object(pr->handle, "_PSS", NULL, &buffer); | 238 | status = acpi_evaluate_object(pr->handle, "_PSS", NULL, &buffer); |
241 | if (ACPI_FAILURE(status)) { | 239 | if (ACPI_FAILURE(status)) { |
242 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error evaluating _PSS\n")); | 240 | ACPI_EXCEPTION((AE_INFO, status, "Evaluating _PSS")); |
243 | return_VALUE(-ENODEV); | 241 | return_VALUE(-ENODEV); |
244 | } | 242 | } |
245 | 243 | ||
246 | pss = (union acpi_object *)buffer.pointer; | 244 | pss = (union acpi_object *)buffer.pointer; |
247 | if (!pss || (pss->type != ACPI_TYPE_PACKAGE)) { | 245 | if (!pss || (pss->type != ACPI_TYPE_PACKAGE)) { |
248 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid _PSS data\n")); | 246 | ACPI_ERROR((AE_INFO, "Invalid _PSS data")); |
249 | result = -EFAULT; | 247 | result = -EFAULT; |
250 | goto end; | 248 | goto end; |
251 | } | 249 | } |
@@ -274,8 +272,7 @@ static int acpi_processor_get_performance_states(struct acpi_processor *pr) | |||
274 | status = acpi_extract_package(&(pss->package.elements[i]), | 272 | status = acpi_extract_package(&(pss->package.elements[i]), |
275 | &format, &state); | 273 | &format, &state); |
276 | if (ACPI_FAILURE(status)) { | 274 | if (ACPI_FAILURE(status)) { |
277 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 275 | ACPI_EXCEPTION((AE_INFO, status, "Invalid _PSS data")); |
278 | "Invalid _PSS data\n")); | ||
279 | result = -EFAULT; | 276 | result = -EFAULT; |
280 | kfree(pr->performance->states); | 277 | kfree(pr->performance->states); |
281 | goto end; | 278 | goto end; |
@@ -291,8 +288,8 @@ static int acpi_processor_get_performance_states(struct acpi_processor *pr) | |||
291 | (u32) px->control, (u32) px->status)); | 288 | (u32) px->control, (u32) px->status)); |
292 | 289 | ||
293 | if (!px->core_frequency) { | 290 | if (!px->core_frequency) { |
294 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 291 | ACPI_ERROR((AE_INFO, |
295 | "Invalid _PSS data: freq is zero\n")); | 292 | "Invalid _PSS data: freq is zero")); |
296 | result = -EFAULT; | 293 | result = -EFAULT; |
297 | kfree(pr->performance->states); | 294 | kfree(pr->performance->states); |
298 | goto end; | 295 | goto end; |
@@ -387,10 +384,10 @@ int acpi_processor_notify_smm(struct module *calling_module) | |||
387 | status = acpi_os_write_port(acpi_fadt.smi_cmd, | 384 | status = acpi_os_write_port(acpi_fadt.smi_cmd, |
388 | (u32) acpi_fadt.pstate_cnt, 8); | 385 | (u32) acpi_fadt.pstate_cnt, 8); |
389 | if (ACPI_FAILURE(status)) { | 386 | if (ACPI_FAILURE(status)) { |
390 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 387 | ACPI_EXCEPTION((AE_INFO, status, |
391 | "Failed to write pstate_cnt [0x%x] to " | 388 | "Failed to write pstate_cnt [0x%x] to " |
392 | "smi_cmd [0x%x]\n", acpi_fadt.pstate_cnt, | 389 | "smi_cmd [0x%x]", acpi_fadt.pstate_cnt, |
393 | acpi_fadt.smi_cmd)); | 390 | acpi_fadt.smi_cmd)); |
394 | module_put(calling_module); | 391 | module_put(calling_module); |
395 | return_VALUE(status); | 392 | return_VALUE(status); |
396 | } | 393 | } |
@@ -514,11 +511,7 @@ static void acpi_cpufreq_add_file(struct acpi_processor *pr) | |||
514 | entry = create_proc_entry(ACPI_PROCESSOR_FILE_PERFORMANCE, | 511 | entry = create_proc_entry(ACPI_PROCESSOR_FILE_PERFORMANCE, |
515 | S_IFREG | S_IRUGO | S_IWUSR, | 512 | S_IFREG | S_IRUGO | S_IWUSR, |
516 | acpi_device_dir(device)); | 513 | acpi_device_dir(device)); |
517 | if (!entry) | 514 | if (entry){ |
518 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | ||
519 | "Unable to create '%s' fs entry\n", | ||
520 | ACPI_PROCESSOR_FILE_PERFORMANCE)); | ||
521 | else { | ||
522 | acpi_processor_perf_fops.write = acpi_processor_write_performance; | 515 | acpi_processor_perf_fops.write = acpi_processor_write_performance; |
523 | entry->proc_fops = &acpi_processor_perf_fops; | 516 | entry->proc_fops = &acpi_processor_perf_fops; |
524 | entry->data = acpi_driver_data(device); | 517 | entry->data = acpi_driver_data(device); |