drivers/acpi/acpica/nsxfeval.c
Source file repositories/reference/linux-study-clean/drivers/acpi/acpica/nsxfeval.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/acpi/acpica/nsxfeval.c- Extension
.c- Size
- 28367 bytes
- Lines
- 983
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
acpi/acpi.haccommon.hacnamesp.hacinterp.h
Detected Declarations
function validfunction validfunction versionfunction acpi_ns_resolve_referencesfunction acpi_walk_namespacefunction acpi_ns_get_device_callbackfunction functioningfunction startingfunction acpi_attach_datafunction acpi_detach_datafunction acpi_get_data_fullfunction acpi_get_data
Annotated Snippet
if (ACPI_FAILURE(status)) {
return_ACPI_STATUS(status);
}
}
full_pathname = acpi_ns_get_external_pathname(target_handle);
if (!full_pathname) {
return_ACPI_STATUS(AE_NO_MEMORY);
}
/* Evaluate the object */
status = acpi_evaluate_object(target_handle, NULL, external_params,
return_buffer);
if (ACPI_FAILURE(status)) {
goto exit;
}
/* Type ANY means "don't care about return value type" */
if (return_type == ACPI_TYPE_ANY) {
goto exit;
}
if (return_buffer->length == 0) {
/* Error because caller specifically asked for a return value */
ACPI_ERROR((AE_INFO, "%s did not return any object",
full_pathname));
status = AE_NULL_OBJECT;
goto exit;
}
/* Examine the object type returned from evaluate_object */
if (((union acpi_object *)return_buffer->pointer)->type == return_type) {
goto exit;
}
/* Return object type does not match requested type */
ACPI_ERROR((AE_INFO,
"Incorrect return type from %s - received [%s], requested [%s]",
full_pathname,
acpi_ut_get_type_name(((union acpi_object *)return_buffer->
pointer)->type),
acpi_ut_get_type_name(return_type)));
if (free_buffer_on_error) {
/*
* Free a buffer created via ACPI_ALLOCATE_BUFFER.
* Note: We use acpi_os_free here because acpi_os_allocate was used
* to allocate the buffer. This purposefully bypasses the
* (optionally enabled) allocation tracking mechanism since we
* only want to track internal allocations.
*/
acpi_os_free(return_buffer->pointer);
return_buffer->pointer = NULL;
}
return_buffer->length = 0;
status = AE_TYPE;
exit:
ACPI_FREE(full_pathname);
return_ACPI_STATUS(status);
}
ACPI_EXPORT_SYMBOL(acpi_evaluate_object_typed)
/*******************************************************************************
*
* FUNCTION: acpi_evaluate_object
*
* PARAMETERS: handle - Object handle (optional)
* pathname - Object pathname (optional)
* external_params - List of parameters to pass to method,
* terminated by NULL. May be NULL
* if no parameters are being passed.
* return_buffer - Where to put method's return value (if
* any). If NULL, no value is returned.
*
* RETURN: Status
*
* DESCRIPTION: Find and evaluate the given object, passing the given
* parameters if necessary. One of "Handle" or "Pathname" must
* be valid (non-null)
*
******************************************************************************/
Annotation
- Immediate include surface: `acpi/acpi.h`, `accommon.h`, `acnamesp.h`, `acinterp.h`.
- Detected declarations: `function valid`, `function valid`, `function version`, `function acpi_ns_resolve_references`, `function acpi_walk_namespace`, `function acpi_ns_get_device_callback`, `function functioning`, `function starting`, `function acpi_attach_data`, `function acpi_detach_data`.
- 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.