drivers/acpi/acpica/dbexec.c
Source file repositories/reference/linux-study-clean/drivers/acpi/acpica/dbexec.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/acpi/acpica/dbexec.c- Extension
.c- Size
- 24504 bytes
- Lines
- 876
- Domain
- Driver Families
- Bucket
- drivers/acpi
- Inferred role
- Driver Families: implementation source
- Status
- source 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
acpi/acpi.haccommon.hacdebug.hacnamesp.h
Detected Declarations
function acpi_db_delete_objectsfunction acpi_db_execute_methodfunction acpi_db_execute_setupfunction acpi_db_get_cache_infofunction acpi_db_get_outstanding_allocationsfunction acpi_db_execution_walkfunction acpi_db_executefunction acpi_db_method_threadfunction acpi_db_single_execution_threadfunction acpi_db_create_execution_threadfunction acpi_db_create_execution_threads
Annotated Snippet
switch (objects[i].type) {
case ACPI_TYPE_BUFFER:
ACPI_FREE(objects[i].buffer.pointer);
break;
case ACPI_TYPE_PACKAGE:
/* Recursive call to delete package elements */
acpi_db_delete_objects(objects[i].package.count,
objects[i].package.elements);
/* Free the elements array */
ACPI_FREE(objects[i].package.elements);
break;
default:
break;
}
}
}
/*******************************************************************************
*
* FUNCTION: acpi_db_execute_method
*
* PARAMETERS: info - Valid info segment
* return_obj - Where to put return object
*
* RETURN: Status
*
* DESCRIPTION: Execute a control method. Used to evaluate objects via the
* "EXECUTE" or "EVALUATE" commands.
*
******************************************************************************/
static acpi_status
acpi_db_execute_method(struct acpi_db_method_info *info,
struct acpi_buffer *return_obj)
{
acpi_status status;
struct acpi_object_list param_objects;
union acpi_object params[ACPI_DEBUGGER_MAX_ARGS + 1];
u32 i;
ACPI_FUNCTION_TRACE(db_execute_method);
if (acpi_gbl_db_output_to_file && !acpi_dbg_level) {
acpi_os_printf("Warning: debug output is not enabled!\n");
}
param_objects.count = 0;
param_objects.pointer = NULL;
/* Pass through any command-line arguments */
if (info->args && info->args[0]) {
/* Get arguments passed on the command line */
for (i = 0; (info->args[i] && *(info->args[i])); i++) {
/* Convert input string (token) to an actual union acpi_object */
status = acpi_db_convert_to_object(info->types[i],
info->args[i],
¶ms[i]);
if (ACPI_FAILURE(status)) {
ACPI_EXCEPTION((AE_INFO, status,
"While parsing method arguments"));
goto cleanup;
}
}
param_objects.count = i;
param_objects.pointer = params;
}
/* Prepare for a return object of arbitrary size */
return_obj->pointer = acpi_gbl_db_buffer;
return_obj->length = ACPI_DEBUG_BUFFER_SIZE;
/* Do the actual method execution */
acpi_gbl_method_executing = TRUE;
status = acpi_evaluate_object(NULL, info->pathname,
Annotation
- Immediate include surface: `acpi/acpi.h`, `accommon.h`, `acdebug.h`, `acnamesp.h`.
- Detected declarations: `function acpi_db_delete_objects`, `function acpi_db_execute_method`, `function acpi_db_execute_setup`, `function acpi_db_get_cache_info`, `function acpi_db_get_outstanding_allocations`, `function acpi_db_execution_walk`, `function acpi_db_execute`, `function acpi_db_method_thread`, `function acpi_db_single_execution_thread`, `function acpi_db_create_execution_thread`.
- Atlas domain: Driver Families / drivers/acpi.
- Implementation status: source 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.