Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ACPI: processor: Get rid of ACPICA message printing

The ACPI_DEBUG_PRINT() and ACPI_EXCEPTION() macros are used for
message printing in the ACPICA code and they should not be used
elsewhere. Special configuration (either kernel command line or
sysfs-based) is needed to see the messages printed by them and
the format of those messages is also special and convoluted.

For this reason, replace all of the ACPI_DEBUG_PRINT() and
ACPI_EXCEPTION() instances in the ACPI processor driver with
corresponding dev_*(), acpi_handle_*() and pr_*() calls depending
on the context in which they appear.

Also drop the ACPI_PROCESSOR_COMPONENT definition that is not going
to be necessary any more.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Hanjun Guo <guohanjun@huawei.com>

+108 -126
-1
Documentation/firmware-guide/acpi/debug.rst
··· 58 58 ACPI_CONTAINER_COMPONENT 0x01000000 59 59 ACPI_SYSTEM_COMPONENT 0x02000000 60 60 ACPI_MEMORY_DEVICE_COMPONENT 0x08000000 61 - ACPI_PROCESSOR_COMPONENT 0x20000000 62 61 63 62 debug_level 64 63 ===========
+12 -21
drivers/acpi/acpi_processor.c
··· 22 22 23 23 #include "internal.h" 24 24 25 - #define _COMPONENT ACPI_PROCESSOR_COMPONENT 26 - 27 - ACPI_MODULE_NAME("processor"); 28 - 29 25 DEFINE_PER_CPU(struct acpi_processor *, processors); 30 26 EXPORT_PER_CPU_SYMBOL(processors); 31 27 ··· 47 51 48 52 switch (dev->revision) { 49 53 case 0: 50 - ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Found PIIX4 A-step\n")); 54 + dev_dbg(&dev->dev, "Found PIIX4 A-step\n"); 51 55 break; 52 56 case 1: 53 - ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Found PIIX4 B-step\n")); 57 + dev_dbg(&dev->dev, "Found PIIX4 B-step\n"); 54 58 break; 55 59 case 2: 56 - ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Found PIIX4E\n")); 60 + dev_dbg(&dev->dev, "Found PIIX4E\n"); 57 61 break; 58 62 case 3: 59 - ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Found PIIX4M\n")); 63 + dev_dbg(&dev->dev, "Found PIIX4M\n"); 60 64 break; 61 65 default: 62 - ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Found unknown PIIX4\n")); 66 + dev_dbg(&dev->dev, "Found unknown PIIX4\n"); 63 67 break; 64 68 } 65 69 ··· 125 129 } 126 130 127 131 if (errata.piix4.bmisx) 128 - ACPI_DEBUG_PRINT((ACPI_DB_INFO, 129 - "Bus master activity detection (BM-IDE) erratum enabled\n")); 132 + dev_dbg(&dev->dev, "Bus master activity detection (BM-IDE) erratum enabled\n"); 130 133 if (errata.piix4.fdma) 131 - ACPI_DEBUG_PRINT((ACPI_DB_INFO, 132 - "Type-F DMA livelock erratum (C3 disabled)\n")); 134 + dev_dbg(&dev->dev, "Type-F DMA livelock erratum (C3 disabled)\n"); 133 135 134 136 return 0; 135 137 } ··· 238 244 */ 239 245 if (acpi_gbl_FADT.pm2_control_block && acpi_gbl_FADT.pm2_control_length) { 240 246 pr->flags.bm_control = 1; 241 - ACPI_DEBUG_PRINT((ACPI_DB_INFO, 242 - "Bus mastering arbitration control present\n")); 247 + dev_dbg(&device->dev, "Bus mastering arbitration control present\n"); 243 248 } else 244 - ACPI_DEBUG_PRINT((ACPI_DB_INFO, 245 - "No bus mastering arbitration control\n")); 249 + dev_dbg(&device->dev, "No bus mastering arbitration control\n"); 246 250 247 251 if (!strcmp(acpi_device_hid(device), ACPI_PROCESSOR_OBJECT_HID)) { 248 252 /* Declared with "Processor" statement; match ProcessorID */ ··· 283 291 pr->phys_id = acpi_get_phys_id(pr->handle, device_declaration, 284 292 pr->acpi_id); 285 293 if (invalid_phys_cpuid(pr->phys_id)) 286 - acpi_handle_debug(pr->handle, "failed to get CPU physical ID.\n"); 294 + dev_dbg(&device->dev, "Failed to get CPU physical ID.\n"); 287 295 288 296 pr->id = acpi_map_cpuid(pr->phys_id, pr->acpi_id); 289 297 if (!cpu0_initialized && !acpi_has_cpu_in_madt()) { ··· 320 328 * CPU+CPU ID. 321 329 */ 322 330 sprintf(acpi_device_bid(device), "CPU%X", pr->id); 323 - ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Processor [%d:%d]\n", pr->id, 324 - pr->acpi_id)); 331 + dev_dbg(&device->dev, "Processor [%d:%d]\n", pr->id, pr->acpi_id); 325 332 326 333 if (!object.processor.pblk_address) 327 - ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No PBLK (NULL address)\n")); 334 + dev_dbg(&device->dev, "No PBLK (NULL address)\n"); 328 335 else if (object.processor.pblk_length != 6) 329 336 dev_err(&device->dev, "Invalid PBLK length [%d]\n", 330 337 object.processor.pblk_length);
+1 -5
drivers/acpi/processor_driver.c
··· 28 28 #define ACPI_PROCESSOR_NOTIFY_POWER 0x81 29 29 #define ACPI_PROCESSOR_NOTIFY_THROTTLING 0x82 30 30 31 - #define _COMPONENT ACPI_PROCESSOR_COMPONENT 32 - ACPI_MODULE_NAME("processor_driver"); 33 - 34 31 MODULE_AUTHOR("Paul Diefenbaugh"); 35 32 MODULE_DESCRIPTION("ACPI Processor Driver"); 36 33 MODULE_LICENSE("GPL"); ··· 84 87 dev_name(&device->dev), event, 0); 85 88 break; 86 89 default: 87 - ACPI_DEBUG_PRINT((ACPI_DB_INFO, 88 - "Unsupported event [0x%x]\n", event)); 90 + acpi_handle_debug(handle, "Unsupported event [0x%x]\n", event); 89 91 break; 90 92 } 91 93
+15 -19
drivers/acpi/processor_idle.c
··· 31 31 #include <asm/apic.h> 32 32 #endif 33 33 34 - #define _COMPONENT ACPI_PROCESSOR_COMPONENT 35 - ACPI_MODULE_NAME("processor_idle"); 36 - 37 34 #define ACPI_IDLE_STATE_START (IS_ENABLED(CONFIG_ARCH_HAS_CPU_RELAX) ? 1 : 0) 38 35 39 36 static unsigned int max_cstate __read_mostly = ACPI_PROCESSOR_MAX_POWER; ··· 236 239 * 100 microseconds. 237 240 */ 238 241 if (acpi_gbl_FADT.c2_latency > ACPI_PROCESSOR_MAX_C2_LATENCY) { 239 - ACPI_DEBUG_PRINT((ACPI_DB_INFO, 240 - "C2 latency too large [%d]\n", acpi_gbl_FADT.c2_latency)); 242 + acpi_handle_debug(pr->handle, "C2 latency too large [%d]\n", 243 + acpi_gbl_FADT.c2_latency); 241 244 /* invalidate C2 */ 242 245 pr->power.states[ACPI_STATE_C2].address = 0; 243 246 } ··· 247 250 * 1000 microseconds. 248 251 */ 249 252 if (acpi_gbl_FADT.c3_latency > ACPI_PROCESSOR_MAX_C3_LATENCY) { 250 - ACPI_DEBUG_PRINT((ACPI_DB_INFO, 251 - "C3 latency too large [%d]\n", acpi_gbl_FADT.c3_latency)); 253 + acpi_handle_debug(pr->handle, "C3 latency too large [%d]\n", 254 + acpi_gbl_FADT.c3_latency); 252 255 /* invalidate C3 */ 253 256 pr->power.states[ACPI_STATE_C3].address = 0; 254 257 } 255 258 256 - ACPI_DEBUG_PRINT((ACPI_DB_INFO, 257 - "lvl2[0x%08x] lvl3[0x%08x]\n", 259 + acpi_handle_debug(pr->handle, "lvl2[0x%08x] lvl3[0x%08x]\n", 258 260 pr->power.states[ACPI_STATE_C2].address, 259 - pr->power.states[ACPI_STATE_C3].address)); 261 + pr->power.states[ACPI_STATE_C3].address); 260 262 261 263 snprintf(pr->power.states[ACPI_STATE_C2].desc, 262 264 ACPI_CX_DESC_LEN, "ACPI P_LVL2 IOPORT 0x%x", ··· 320 324 * devices thus we take the conservative approach. 321 325 */ 322 326 else if (errata.piix4.fdma) { 323 - ACPI_DEBUG_PRINT((ACPI_DB_INFO, 324 - "C3 not supported on PIIX4 with Type-F DMA\n")); 327 + acpi_handle_debug(pr->handle, 328 + "C3 not supported on PIIX4 with Type-F DMA\n"); 325 329 return; 326 330 } 327 331 ··· 340 344 if (!pr->flags.bm_control) { 341 345 if (pr->flags.has_cst != 1) { 342 346 /* bus mastering control is necessary */ 343 - ACPI_DEBUG_PRINT((ACPI_DB_INFO, 344 - "C3 support requires BM control\n")); 347 + acpi_handle_debug(pr->handle, 348 + "C3 support requires BM control\n"); 345 349 return; 346 350 } else { 347 351 /* Here we enter C3 without bus mastering */ 348 - ACPI_DEBUG_PRINT((ACPI_DB_INFO, 349 - "C3 support without BM control\n")); 352 + acpi_handle_debug(pr->handle, 353 + "C3 support without BM control\n"); 350 354 } 351 355 } 352 356 } else { ··· 355 359 * supported on when bm_check is not required. 356 360 */ 357 361 if (!(acpi_gbl_FADT.flags & ACPI_FADT_WBINVD)) { 358 - ACPI_DEBUG_PRINT((ACPI_DB_INFO, 362 + acpi_handle_debug(pr->handle, 359 363 "Cache invalidation should work properly" 360 - " for C3 to be enabled on SMP systems\n")); 364 + " for C3 to be enabled on SMP systems\n"); 361 365 return; 362 366 } 363 367 } ··· 839 843 840 844 status = acpi_evaluate_object(handle, "_LPI", NULL, &buffer); 841 845 if (ACPI_FAILURE(status)) { 842 - ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No _LPI, giving up\n")); 846 + acpi_handle_debug(handle, "No _LPI, giving up\n"); 843 847 return -ENODEV; 844 848 } 845 849
+2 -5
drivers/acpi/processor_pdc.c
··· 16 16 17 17 #include "internal.h" 18 18 19 - #define _COMPONENT ACPI_PROCESSOR_COMPONENT 20 - ACPI_MODULE_NAME("processor_pdc"); 21 - 22 19 static bool __init processor_physically_present(acpi_handle handle) 23 20 { 24 21 int cpuid, type; ··· 129 132 status = acpi_evaluate_object(handle, "_PDC", pdc_in, NULL); 130 133 131 134 if (ACPI_FAILURE(status)) 132 - ACPI_DEBUG_PRINT((ACPI_DB_INFO, 133 - "Could not evaluate _PDC, using legacy perf. control.\n")); 135 + acpi_handle_debug(handle, 136 + "Could not evaluate _PDC, using legacy perf control\n"); 134 137 135 138 return status; 136 139 }
+21 -20
drivers/acpi/processor_perflib.c
··· 23 23 #define PREFIX "ACPI: " 24 24 25 25 #define ACPI_PROCESSOR_FILE_PERFORMANCE "performance" 26 - #define _COMPONENT ACPI_PROCESSOR_COMPONENT 27 - ACPI_MODULE_NAME("processor_perflib"); 28 26 29 27 static DEFINE_MUTEX(performance_mutex); 30 28 ··· 68 70 acpi_processor_ppc_in_use = true; 69 71 70 72 if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) { 71 - ACPI_EXCEPTION((AE_INFO, status, "Evaluating _PPC")); 73 + acpi_handle_warn(pr->handle, "_PPC evaluation failed: %s\n", 74 + acpi_format_exception(status)); 72 75 return -ENODEV; 73 76 } 74 77 ··· 198 199 199 200 status = acpi_evaluate_object(pr->handle, "_PCT", NULL, &buffer); 200 201 if (ACPI_FAILURE(status)) { 201 - ACPI_EXCEPTION((AE_INFO, status, "Evaluating _PCT")); 202 + acpi_handle_warn(pr->handle, "_PCT evaluation failed: %s\n", 203 + acpi_format_exception(status)); 202 204 return -ENODEV; 203 205 } 204 206 ··· 299 299 300 300 status = acpi_evaluate_object(pr->handle, "_PSS", NULL, &buffer); 301 301 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)); 303 304 return -ENODEV; 304 305 } 305 306 ··· 311 310 goto end; 312 311 } 313 312 314 - ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Found %d performance states\n", 315 - pss->package.count)); 313 + acpi_handle_debug(pr->handle, "Found %d performance states\n", 314 + pss->package.count); 316 315 317 316 pr->performance->state_count = pss->package.count; 318 317 pr->performance->states = ··· 331 330 state.length = sizeof(struct acpi_processor_px); 332 331 state.pointer = px; 333 332 334 - ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Extracting state %d\n", i)); 333 + acpi_handle_debug(pr->handle, "Extracting state %d\n", i); 335 334 336 335 status = acpi_extract_package(&(pss->package.elements[i]), 337 336 &format, &state); 338 337 if (ACPI_FAILURE(status)) { 339 - ACPI_EXCEPTION((AE_INFO, status, "Invalid _PSS data")); 338 + acpi_handle_warn(pr->handle, "Invalid _PSS data: %s\n", 339 + acpi_format_exception(status)); 340 340 result = -EFAULT; 341 341 kfree(pr->performance->states); 342 342 goto end; ··· 345 343 346 344 amd_fixup_frequency(px, i); 347 345 348 - ACPI_DEBUG_PRINT((ACPI_DB_INFO, 346 + acpi_handle_debug(pr->handle, 349 347 "State [%d]: core_frequency[%d] power[%d] transition_latency[%d] bus_master_latency[%d] control[0x%x] status[0x%x]\n", 350 348 i, 351 349 (u32) px->core_frequency, 352 350 (u32) px->power, 353 351 (u32) px->transition_latency, 354 352 (u32) px->bus_master_latency, 355 - (u32) px->control, (u32) px->status)); 353 + (u32) px->control, (u32) px->status); 356 354 357 355 /* 358 356 * Check that ACPI's u64 MHz will be valid as u32 KHz in cpufreq ··· 402 400 return -EINVAL; 403 401 404 402 if (!acpi_has_method(pr->handle, "_PCT")) { 405 - ACPI_DEBUG_PRINT((ACPI_DB_INFO, 406 - "ACPI-based processor performance control unavailable\n")); 403 + acpi_handle_debug(pr->handle, 404 + "ACPI-based processor performance control unavailable\n"); 407 405 return -ENODEV; 408 406 } 409 407 ··· 444 442 if (!acpi_gbl_FADT.smi_command || !acpi_gbl_FADT.pstate_control) 445 443 return 0; 446 444 447 - ACPI_DEBUG_PRINT((ACPI_DB_INFO, 448 - "Writing pstate_control [0x%x] to smi_command [0x%x]\n", 449 - acpi_gbl_FADT.pstate_control, acpi_gbl_FADT.smi_command)); 445 + pr_debug("Writing pstate_control [0x%x] to smi_command [0x%x]\n", 446 + acpi_gbl_FADT.pstate_control, acpi_gbl_FADT.smi_command); 450 447 451 448 status = acpi_os_write_port(acpi_gbl_FADT.smi_command, 452 449 (u32)acpi_gbl_FADT.pstate_control, 8); 453 450 if (ACPI_SUCCESS(status)) 454 451 return 1; 455 452 456 - ACPI_EXCEPTION((AE_INFO, status, 457 - "Failed to write pstate_control [0x%x] to smi_command [0x%x]", 458 - acpi_gbl_FADT.pstate_control, acpi_gbl_FADT.smi_command)); 453 + pr_warn("Failed to write pstate_control [0x%x] to smi_command [0x%x]: %s\n", 454 + acpi_gbl_FADT.pstate_control, acpi_gbl_FADT.smi_command, 455 + acpi_format_exception(status)); 459 456 return -EIO; 460 457 } 461 458 ··· 486 485 487 486 result = acpi_processor_pstate_control(); 488 487 if (!result) { 489 - ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No SMI port or pstate_control\n")); 488 + pr_debug("No SMI port or pstate_control\n"); 490 489 module_put(calling_module); 491 490 return 0; 492 491 }
+57 -53
drivers/acpi/processor_throttling.c
··· 22 22 23 23 #define PREFIX "ACPI: " 24 24 25 - #define _COMPONENT ACPI_PROCESSOR_COMPONENT 26 - ACPI_MODULE_NAME("processor_throttling"); 27 - 28 25 /* ignore_tpc: 29 26 * 0 -> acpi processor driver doesn't ignore _TPC values 30 27 * 1 -> acpi processor driver ignores _TPC values ··· 193 196 */ 194 197 void acpi_processor_throttling_init(void) 195 198 { 196 - if (acpi_processor_update_tsd_coord()) { 197 - ACPI_DEBUG_PRINT((ACPI_DB_INFO, 198 - "Assume no T-state coordination\n")); 199 - } 199 + if (acpi_processor_update_tsd_coord()) 200 + pr_debug("Assume no T-state coordination\n"); 200 201 201 202 return; 202 203 } ··· 211 216 cpu = p_tstate->cpu; 212 217 pr = per_cpu(processors, cpu); 213 218 if (!pr) { 214 - ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Invalid pr pointer\n")); 219 + pr_debug("Invalid pr pointer\n"); 215 220 return 0; 216 221 } 217 222 if (!pr->flags.throttling) { 218 - ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Throttling control is " 219 - "unsupported on CPU %d\n", cpu)); 223 + acpi_handle_debug(pr->handle, 224 + "Throttling control unsupported on CPU %d\n", 225 + cpu); 220 226 return 0; 221 227 } 222 228 target_state = p_tstate->target_state; ··· 241 245 target_state = p_throttling->state_count - 1; 242 246 } 243 247 p_tstate->target_state = target_state; 244 - ACPI_DEBUG_PRINT((ACPI_DB_INFO, "PreChange Event:" 245 - "target T-state of CPU %d is T%d\n", 246 - cpu, target_state)); 248 + acpi_handle_debug(pr->handle, 249 + "PreChange Event: target T-state of CPU %d is T%d\n", 250 + cpu, target_state); 247 251 break; 248 252 case THROTTLING_POSTCHANGE: 249 253 /* ··· 251 255 * T-state flag of acpi_processor_throttling. 252 256 */ 253 257 p_throttling->state = target_state; 254 - ACPI_DEBUG_PRINT((ACPI_DB_INFO, "PostChange Event:" 255 - "CPU %d is switched to T%d\n", 256 - cpu, target_state)); 258 + acpi_handle_debug(pr->handle, 259 + "PostChange Event: CPU %d is switched to T%d\n", 260 + cpu, target_state); 257 261 break; 258 262 default: 259 263 printk(KERN_WARNING ··· 280 284 281 285 status = acpi_evaluate_integer(pr->handle, "_TPC", NULL, &tpc); 282 286 if (ACPI_FAILURE(status)) { 283 - if (status != AE_NOT_FOUND) { 284 - ACPI_EXCEPTION((AE_INFO, status, "Evaluating _TPC")); 285 - } 287 + if (status != AE_NOT_FOUND) 288 + acpi_handle_warn(pr->handle, 289 + "_TPC evaluation failed: %s\n", 290 + acpi_format_exception(status)); 291 + 286 292 return -ENODEV; 287 293 } 288 294 ··· 415 417 416 418 status = acpi_evaluate_object(pr->handle, "_PTC", NULL, &buffer); 417 419 if (ACPI_FAILURE(status)) { 418 - if (status != AE_NOT_FOUND) { 419 - ACPI_EXCEPTION((AE_INFO, status, "Evaluating _PTC")); 420 - } 420 + if (status != AE_NOT_FOUND) 421 + acpi_handle_warn(pr->handle, 422 + "_PTC evaluation failed: %s\n", 423 + acpi_format_exception(status)); 424 + 421 425 return -ENODEV; 422 426 } 423 427 ··· 502 502 503 503 status = acpi_evaluate_object(pr->handle, "_TSS", NULL, &buffer); 504 504 if (ACPI_FAILURE(status)) { 505 - if (status != AE_NOT_FOUND) { 506 - ACPI_EXCEPTION((AE_INFO, status, "Evaluating _TSS")); 507 - } 505 + if (status != AE_NOT_FOUND) 506 + acpi_handle_warn(pr->handle, 507 + "_TSS evaluation failed: %s\n", 508 + acpi_format_exception(status)); 509 + 508 510 return -ENODEV; 509 511 } 510 512 ··· 517 515 goto end; 518 516 } 519 517 520 - ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Found %d throttling states\n", 521 - tss->package.count)); 518 + acpi_handle_debug(pr->handle, "Found %d throttling states\n", 519 + tss->package.count); 522 520 523 521 pr->throttling.state_count = tss->package.count; 524 522 pr->throttling.states_tss = ··· 539 537 state.length = sizeof(struct acpi_processor_tx_tss); 540 538 state.pointer = tx; 541 539 542 - ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Extracting state %d\n", i)); 540 + acpi_handle_debug(pr->handle, "Extracting state %d\n", i); 543 541 544 542 status = acpi_extract_package(&(tss->package.elements[i]), 545 543 &format, &state); 546 544 if (ACPI_FAILURE(status)) { 547 - ACPI_EXCEPTION((AE_INFO, status, "Invalid _TSS data")); 545 + acpi_handle_warn(pr->handle, "Invalid _TSS data: %s\n", 546 + acpi_format_exception(status)); 548 547 result = -EFAULT; 549 548 kfree(pr->throttling.states_tss); 550 549 goto end; ··· 585 582 586 583 status = acpi_evaluate_object(pr->handle, "_TSD", NULL, &buffer); 587 584 if (ACPI_FAILURE(status)) { 588 - if (status != AE_NOT_FOUND) { 589 - ACPI_EXCEPTION((AE_INFO, status, "Evaluating _TSD")); 590 - } 585 + if (status != AE_NOT_FOUND) 586 + acpi_handle_warn(pr->handle, 587 + "_TSD evaluation failed: %s\n", 588 + acpi_format_exception(status)); 589 + 591 590 return -ENODEV; 592 591 } 593 592 ··· 703 698 704 699 local_irq_enable(); 705 700 706 - ACPI_DEBUG_PRINT((ACPI_DB_INFO, 701 + acpi_handle_debug(pr->handle, 707 702 "Throttling state is T%d (%d%% throttling applied)\n", 708 - state, pr->throttling.states[state].performance)); 703 + state, pr->throttling.states[state].performance); 709 704 710 705 return 0; 711 706 } ··· 880 875 if (ret >= 0) { 881 876 state = acpi_get_throttling_state(pr, value); 882 877 if (state == -1) { 883 - ACPI_DEBUG_PRINT((ACPI_DB_INFO, 884 - "Invalid throttling state, reset\n")); 878 + acpi_handle_debug(pr->handle, 879 + "Invalid throttling state, reset\n"); 885 880 state = 0; 886 881 ret = __acpi_processor_set_throttling(pr, state, true, 887 882 true); ··· 926 921 int i, step; 927 922 928 923 if (!pr->throttling.address) { 929 - ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No throttling register\n")); 924 + acpi_handle_debug(pr->handle, "No throttling register\n"); 930 925 return -EINVAL; 931 926 } else if (!pr->throttling.duty_width) { 932 - ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No throttling states\n")); 927 + acpi_handle_debug(pr->handle, "No throttling states\n"); 933 928 return -EINVAL; 934 929 } 935 930 /* TBD: Support duty_cycle values that span bit 4. */ ··· 1020 1015 1021 1016 local_irq_enable(); 1022 1017 1023 - ACPI_DEBUG_PRINT((ACPI_DB_INFO, 1018 + acpi_handle_debug(pr->handle, 1024 1019 "Throttling state set to T%d (%d%%)\n", state, 1025 1020 (pr->throttling.states[state].performance ? pr-> 1026 - throttling.states[state].performance / 10 : 0))); 1021 + throttling.states[state].performance / 10 : 0)); 1027 1022 1028 1023 return 0; 1029 1024 } ··· 1134 1129 * error message and continue. 1135 1130 */ 1136 1131 if (!match_pr) { 1137 - ACPI_DEBUG_PRINT((ACPI_DB_INFO, 1138 - "Invalid Pointer for CPU %d\n", i)); 1132 + acpi_handle_debug(pr->handle, 1133 + "Invalid Pointer for CPU %d\n", i); 1139 1134 continue; 1140 1135 } 1141 1136 /* ··· 1143 1138 * we will report the error message and continue. 1144 1139 */ 1145 1140 if (!match_pr->flags.throttling) { 1146 - ACPI_DEBUG_PRINT((ACPI_DB_INFO, 1147 - "Throttling Control is unsupported " 1148 - "on CPU %d\n", i)); 1141 + acpi_handle_debug(pr->handle, 1142 + "Throttling Control unsupported on CPU %d\n", i); 1149 1143 continue; 1150 1144 } 1151 1145 ··· 1181 1177 int result = 0; 1182 1178 struct acpi_processor_throttling *pthrottling; 1183 1179 1184 - ACPI_DEBUG_PRINT((ACPI_DB_INFO, 1180 + acpi_handle_debug(pr->handle, 1185 1181 "pblk_address[0x%08x] duty_offset[%d] duty_width[%d]\n", 1186 1182 pr->throttling.address, 1187 1183 pr->throttling.duty_offset, 1188 - pr->throttling.duty_width)); 1184 + pr->throttling.duty_width); 1189 1185 1190 1186 /* 1191 1187 * Evaluate _PTC, _TSS and _TPC ··· 1225 1221 * used this part. 1226 1222 */ 1227 1223 if (errata.piix4.throttle) { 1228 - ACPI_DEBUG_PRINT((ACPI_DB_INFO, 1229 - "Throttling not supported on PIIX4 A- or B-step\n")); 1224 + acpi_handle_debug(pr->handle, 1225 + "Throttling not supported on PIIX4 A- or B-step\n"); 1230 1226 return 0; 1231 1227 } 1232 1228 1233 - ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Found %d throttling states\n", 1234 - pr->throttling.state_count)); 1229 + acpi_handle_debug(pr->handle, "Found %d throttling states\n", 1230 + pr->throttling.state_count); 1235 1231 1236 1232 pr->flags.throttling = 1; 1237 1233 ··· 1246 1242 goto end; 1247 1243 1248 1244 if (pr->throttling.state) { 1249 - ACPI_DEBUG_PRINT((ACPI_DB_INFO, 1245 + acpi_handle_debug(pr->handle, 1250 1246 "Disabling throttling (was T%d)\n", 1251 - pr->throttling.state)); 1247 + pr->throttling.state); 1252 1248 result = acpi_processor_set_throttling(pr, 0, false); 1253 1249 if (result) 1254 1250 goto end;
-1
drivers/acpi/sysfs.c
··· 58 58 ACPI_DEBUG_INIT(ACPI_CONTAINER_COMPONENT), 59 59 ACPI_DEBUG_INIT(ACPI_SYSTEM_COMPONENT), 60 60 ACPI_DEBUG_INIT(ACPI_MEMORY_DEVICE_COMPONENT), 61 - ACPI_DEBUG_INIT(ACPI_PROCESSOR_COMPONENT), 62 61 }; 63 62 64 63 static const struct acpi_dlevel acpi_debug_levels[] = {
-1
include/acpi/acpi_drivers.h
··· 21 21 #define ACPI_CONTAINER_COMPONENT 0x01000000 22 22 #define ACPI_SYSTEM_COMPONENT 0x02000000 23 23 #define ACPI_MEMORY_DEVICE_COMPONENT 0x08000000 24 - #define ACPI_PROCESSOR_COMPONENT 0x20000000 25 24 26 25 /* 27 26 * _HID definitions