drivers/acpi/acpica/utdebug.c
Source file repositories/reference/linux-study-clean/drivers/acpi/acpica/utdebug.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/acpi/acpica/utdebug.c- Extension
.c- Size
- 18487 bytes
- Lines
- 622
- Domain
- Driver Families
- Bucket
- drivers/acpi
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
Dependency Surface
acpi/acpi.haccommon.hacinterp.h
Detected Declarations
function acpi_ut_init_stack_ptr_tracefunction acpi_ut_track_stack_ptrfunction acpi_debug_printfunction acpi_debug_print_rawfunction acpi_ut_tracefunction acpi_ut_trace_ptrfunction acpi_ut_trace_strfunction acpi_ut_trace_u32function acpi_ut_exitfunction acpi_ut_status_exitfunction acpi_ut_value_exitfunction acpi_ut_ptr_exitfunction acpi_ut_str_exitfunction acpi_trace_point
Annotated Snippet
if (ACPI_LV_THREADS & acpi_dbg_level) {
acpi_os_printf
("\n**** Context Switch from TID %u to TID %u ****\n\n",
(u32)acpi_gbl_previous_thread_id, (u32)thread_id);
}
acpi_gbl_previous_thread_id = thread_id;
acpi_gbl_nesting_level = 0;
}
/*
* Display the module name, current line number, thread ID (if requested),
* current procedure nesting level, and the current procedure name
*/
acpi_os_printf("%9s-%04d ", module_name, line_number);
#ifdef ACPI_APPLICATION
/*
* For acpi_exec/iASL only, emit the thread ID and nesting level.
* Note: nesting level is really only useful during a single-thread
* execution. Otherwise, multiple threads will keep resetting the
* level.
*/
if (ACPI_LV_THREADS & acpi_dbg_level) {
acpi_os_printf("[%u] ", (u32)thread_id);
}
fill_count = 48 - acpi_gbl_nesting_level -
strlen(acpi_ut_trim_function_name(function_name));
if (fill_count < 0) {
fill_count = 0;
}
acpi_os_printf("[%02d] %*s",
acpi_gbl_nesting_level, acpi_gbl_nesting_level + 1, " ");
acpi_os_printf("%s%*s: ",
acpi_ut_trim_function_name(function_name), fill_count,
" ");
#else
acpi_os_printf("%-22.22s: ", acpi_ut_trim_function_name(function_name));
#endif
va_start(args, format);
acpi_os_vprintf(format, args);
va_end(args);
}
ACPI_EXPORT_SYMBOL(acpi_debug_print)
/*******************************************************************************
*
* FUNCTION: acpi_debug_print_raw
*
* PARAMETERS: requested_debug_level - Requested debug print level
* line_number - Caller's line number
* function_name - Caller's procedure name
* module_name - Caller's module name
* component_id - Caller's component ID
* format - Printf format field
* ... - Optional printf arguments
*
* RETURN: None
*
* DESCRIPTION: Print message with no headers. Has same interface as
* debug_print so that the same macros can be used.
*
******************************************************************************/
void ACPI_INTERNAL_VAR_XFACE
acpi_debug_print_raw(u32 requested_debug_level,
u32 line_number,
const char *function_name,
const char *module_name,
u32 component_id, const char *format, ...)
{
va_list args;
/* Check if debug output enabled */
if (!ACPI_IS_DEBUG_ENABLED(requested_debug_level, component_id)) {
return;
}
va_start(args, format);
acpi_os_vprintf(format, args);
va_end(args);
}
ACPI_EXPORT_SYMBOL(acpi_debug_print_raw)
Annotation
- Immediate include surface: `acpi/acpi.h`, `accommon.h`, `acinterp.h`.
- Detected declarations: `function acpi_ut_init_stack_ptr_trace`, `function acpi_ut_track_stack_ptr`, `function acpi_debug_print`, `function acpi_debug_print_raw`, `function acpi_ut_trace`, `function acpi_ut_trace_ptr`, `function acpi_ut_trace_str`, `function acpi_ut_trace_u32`, `function acpi_ut_exit`, `function acpi_ut_status_exit`.
- Atlas domain: Driver Families / drivers/acpi.
- Implementation status: integration implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.