2323#define PREFIX "ACPI: "
2424
2525#define ACPI_PROCESSOR_FILE_PERFORMANCE "performance"
26- #define _COMPONENT ACPI_PROCESSOR_COMPONENT
27- ACPI_MODULE_NAME ("processor_perflib" );
2826
2927static DEFINE_MUTEX (performance_mutex );
3028
@@ -70,7 +68,8 @@ static int acpi_processor_get_platform_limit(struct acpi_processor *pr)
7068 acpi_processor_ppc_in_use = true;
7169
7270 if (ACPI_FAILURE (status ) && status != AE_NOT_FOUND ) {
73- ACPI_EXCEPTION ((AE_INFO , status , "Evaluating _PPC" ));
71+ acpi_handle_warn (pr -> handle , "_PPC evaluation failed: %s\n" ,
72+ acpi_format_exception (status ));
7473 return - ENODEV ;
7574 }
7675
@@ -199,7 +198,8 @@ static int acpi_processor_get_performance_control(struct acpi_processor *pr)
199198
200199 status = acpi_evaluate_object (pr -> handle , "_PCT" , NULL , & buffer );
201200 if (ACPI_FAILURE (status )) {
202- ACPI_EXCEPTION ((AE_INFO , status , "Evaluating _PCT" ));
201+ acpi_handle_warn (pr -> handle , "_PCT evaluation failed: %s\n" ,
202+ acpi_format_exception (status ));
203203 return - ENODEV ;
204204 }
205205
@@ -299,7 +299,8 @@ static int acpi_processor_get_performance_states(struct acpi_processor *pr)
299299
300300 status = acpi_evaluate_object (pr -> handle , "_PSS" , NULL , & buffer );
301301 if (ACPI_FAILURE (status )) {
302- ACPI_EXCEPTION ((AE_INFO , status , "Evaluating _PSS" ));
302+ acpi_handle_warn (pr -> handle , "_PSS evaluation failed: %s\n" ,
303+ acpi_format_exception (status ));
303304 return - ENODEV ;
304305 }
305306
@@ -310,8 +311,8 @@ static int acpi_processor_get_performance_states(struct acpi_processor *pr)
310311 goto end ;
311312 }
312313
313- ACPI_DEBUG_PRINT (( ACPI_DB_INFO , "Found %d performance states\n" ,
314- pss -> package .count )) ;
314+ acpi_handle_debug ( pr -> handle , "Found %d performance states\n" ,
315+ pss -> package .count );
315316
316317 pr -> performance -> state_count = pss -> package .count ;
317318 pr -> performance -> states =
@@ -330,27 +331,28 @@ static int acpi_processor_get_performance_states(struct acpi_processor *pr)
330331 state .length = sizeof (struct acpi_processor_px );
331332 state .pointer = px ;
332333
333- ACPI_DEBUG_PRINT (( ACPI_DB_INFO , "Extracting state %d\n" , i ) );
334+ acpi_handle_debug ( pr -> handle , "Extracting state %d\n" , i );
334335
335336 status = acpi_extract_package (& (pss -> package .elements [i ]),
336337 & format , & state );
337338 if (ACPI_FAILURE (status )) {
338- ACPI_EXCEPTION ((AE_INFO , status , "Invalid _PSS data" ));
339+ acpi_handle_warn (pr -> handle , "Invalid _PSS data: %s\n" ,
340+ acpi_format_exception (status ));
339341 result = - EFAULT ;
340342 kfree (pr -> performance -> states );
341343 goto end ;
342344 }
343345
344346 amd_fixup_frequency (px , i );
345347
346- ACPI_DEBUG_PRINT (( ACPI_DB_INFO ,
348+ acpi_handle_debug ( pr -> handle ,
347349 "State [%d]: core_frequency[%d] power[%d] transition_latency[%d] bus_master_latency[%d] control[0x%x] status[0x%x]\n" ,
348350 i ,
349351 (u32 ) px -> core_frequency ,
350352 (u32 ) px -> power ,
351353 (u32 ) px -> transition_latency ,
352354 (u32 ) px -> bus_master_latency ,
353- (u32 ) px -> control , (u32 ) px -> status )) ;
355+ (u32 ) px -> control , (u32 ) px -> status );
354356
355357 /*
356358 * Check that ACPI's u64 MHz will be valid as u32 KHz in cpufreq
@@ -400,8 +402,8 @@ int acpi_processor_get_performance_info(struct acpi_processor *pr)
400402 return - EINVAL ;
401403
402404 if (!acpi_has_method (pr -> handle , "_PCT" )) {
403- ACPI_DEBUG_PRINT (( ACPI_DB_INFO ,
404- "ACPI-based processor performance control unavailable\n" )) ;
405+ acpi_handle_debug ( pr -> handle ,
406+ "ACPI-based processor performance control unavailable\n" );
405407 return - ENODEV ;
406408 }
407409
@@ -442,18 +444,17 @@ int acpi_processor_pstate_control(void)
442444 if (!acpi_gbl_FADT .smi_command || !acpi_gbl_FADT .pstate_control )
443445 return 0 ;
444446
445- ACPI_DEBUG_PRINT ((ACPI_DB_INFO ,
446- "Writing pstate_control [0x%x] to smi_command [0x%x]\n" ,
447- acpi_gbl_FADT .pstate_control , acpi_gbl_FADT .smi_command ));
447+ pr_debug ("Writing pstate_control [0x%x] to smi_command [0x%x]\n" ,
448+ acpi_gbl_FADT .pstate_control , acpi_gbl_FADT .smi_command );
448449
449450 status = acpi_os_write_port (acpi_gbl_FADT .smi_command ,
450451 (u32 )acpi_gbl_FADT .pstate_control , 8 );
451452 if (ACPI_SUCCESS (status ))
452453 return 1 ;
453454
454- ACPI_EXCEPTION (( AE_INFO , status ,
455- "Failed to write pstate_control [0x%x] to smi_command [0x%x]" ,
456- acpi_gbl_FADT . pstate_control , acpi_gbl_FADT . smi_command ));
455+ pr_warn ( "Failed to write pstate_control [0x%x] to smi_command [0x%x]: %s\n" ,
456+ acpi_gbl_FADT . pstate_control , acpi_gbl_FADT . smi_command ,
457+ acpi_format_exception ( status ));
457458 return - EIO ;
458459}
459460
@@ -485,7 +486,7 @@ int acpi_processor_notify_smm(struct module *calling_module)
485486
486487 result = acpi_processor_pstate_control ();
487488 if (!result ) {
488- ACPI_DEBUG_PRINT (( ACPI_DB_INFO , "No SMI port or pstate_control\n" ) );
489+ pr_debug ( "No SMI port or pstate_control\n" );
489490 module_put (calling_module );
490491 return 0 ;
491492 }
0 commit comments