drivers/acpi/acpica/dsmthdat.c
Source file repositories/reference/linux-study-clean/drivers/acpi/acpica/dsmthdat.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/acpi/acpica/dsmthdat.c- Extension
.c- Size
- 19772 bytes
- Lines
- 683
- 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.hacdispat.hacnamesp.hacinterp.h
Detected Declarations
function ACPI_ALLOCATE_ZEROEDfunction acpi_ds_method_data_delete_allfunction acpi_ds_method_data_init_argsfunction acpi_ds_method_data_get_nodefunction acpi_ds_method_data_set_valuefunction acpi_ex_resolve_to_valuefunction acpi_ds_method_data_delete_valuefunction acpi_ds_store_object_to_localfunction referencefunction acpi_ds_method_data_get_type
Annotated Snippet
if (walk_state->local_variables[index].object) {
ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "Deleting Local%u=%p\n",
index,
walk_state->local_variables[index].
object));
/* Detach object (if present) and remove a reference */
acpi_ns_detach_object(&walk_state->
local_variables[index]);
}
}
/* Detach the arguments */
for (index = 0; index < ACPI_METHOD_NUM_ARGS; index++) {
if (walk_state->arguments[index].object) {
ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "Deleting Arg%u=%p\n",
index,
walk_state->arguments[index].object));
/* Detach object (if present) and remove a reference */
acpi_ns_detach_object(&walk_state->arguments[index]);
}
}
return_VOID;
}
/*******************************************************************************
*
* FUNCTION: acpi_ds_method_data_init_args
*
* PARAMETERS: *params - Pointer to a parameter list for the method
* max_param_count - The arg count for this method
* walk_state - Current walk state object
*
* RETURN: Status
*
* DESCRIPTION: Initialize arguments for a method. The parameter list is a list
* of ACPI operand objects, either null terminated or whose length
* is defined by max_param_count.
*
******************************************************************************/
acpi_status
acpi_ds_method_data_init_args(union acpi_operand_object **params,
u32 max_param_count,
struct acpi_walk_state *walk_state)
{
acpi_status status;
u32 index = 0;
ACPI_FUNCTION_TRACE_PTR(ds_method_data_init_args, params);
if (!params) {
ACPI_DEBUG_PRINT((ACPI_DB_EXEC,
"No parameter list passed to method\n"));
return_ACPI_STATUS(AE_OK);
}
/* Copy passed parameters into the new method stack frame */
while ((index < ACPI_METHOD_NUM_ARGS) &&
(index < max_param_count) && params[index]) {
/*
* A valid parameter.
* Store the argument in the method/walk descriptor.
* Do not copy the arg in order to implement call by reference
*/
status =
acpi_ds_method_data_set_value(ACPI_REFCLASS_ARG, index,
params[index], walk_state);
if (ACPI_FAILURE(status)) {
return_ACPI_STATUS(status);
}
index++;
}
acpi_ex_trace_args(params, index);
ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "%u args passed to method\n", index));
return_ACPI_STATUS(AE_OK);
}
/*******************************************************************************
*
* FUNCTION: acpi_ds_method_data_get_node
*
Annotation
- Immediate include surface: `acpi/acpi.h`, `accommon.h`, `acdispat.h`, `acnamesp.h`, `acinterp.h`.
- Detected declarations: `function ACPI_ALLOCATE_ZEROED`, `function acpi_ds_method_data_delete_all`, `function acpi_ds_method_data_init_args`, `function acpi_ds_method_data_get_node`, `function acpi_ds_method_data_set_value`, `function acpi_ex_resolve_to_value`, `function acpi_ds_method_data_delete_value`, `function acpi_ds_store_object_to_local`, `function reference`, `function acpi_ds_method_data_get_type`.
- 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.