drivers/acpi/acpica/utosi.c
Source file repositories/reference/linux-study-clean/drivers/acpi/acpica/utosi.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/acpi/acpica/utosi.c- Extension
.c- Size
- 15649 bytes
- Lines
- 466
- 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.h
Detected Declarations
function acpi_ut_initialize_interfacesfunction acpi_ut_interface_terminatefunction acpi_ut_install_interfacefunction acpi_ut_remove_interfacefunction acpi_ut_update_interfacesfunction FALSE
Annotated Snippet
if (next_interface->flags & ACPI_OSI_DYNAMIC) {
/* Only interfaces added at runtime can be freed */
ACPI_FREE(next_interface->name);
ACPI_FREE(next_interface);
} else {
/* Interface is in static list. Reset it to invalid or valid. */
if (next_interface->flags & ACPI_OSI_DEFAULT_INVALID) {
next_interface->flags |= ACPI_OSI_INVALID;
} else {
next_interface->flags &= ~ACPI_OSI_INVALID;
}
}
next_interface = acpi_gbl_supported_interfaces;
}
acpi_os_release_mutex(acpi_gbl_osi_mutex);
return (AE_OK);
}
/*******************************************************************************
*
* FUNCTION: acpi_ut_install_interface
*
* PARAMETERS: interface_name - The interface to install
*
* RETURN: Status
*
* DESCRIPTION: Install the interface into the global interface list.
* Caller MUST hold acpi_gbl_osi_mutex
*
******************************************************************************/
acpi_status acpi_ut_install_interface(acpi_string interface_name)
{
struct acpi_interface_info *interface_info;
/* Allocate info block and space for the name string */
interface_info =
ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_interface_info));
if (!interface_info) {
return (AE_NO_MEMORY);
}
interface_info->name = ACPI_ALLOCATE_ZEROED(strlen(interface_name) + 1);
if (!interface_info->name) {
ACPI_FREE(interface_info);
return (AE_NO_MEMORY);
}
/* Initialize new info and insert at the head of the global list */
strcpy(interface_info->name, interface_name);
interface_info->flags = ACPI_OSI_DYNAMIC;
interface_info->next = acpi_gbl_supported_interfaces;
acpi_gbl_supported_interfaces = interface_info;
return (AE_OK);
}
/*******************************************************************************
*
* FUNCTION: acpi_ut_remove_interface
*
* PARAMETERS: interface_name - The interface to remove
*
* RETURN: Status
*
* DESCRIPTION: Remove the interface from the global interface list.
* Caller MUST hold acpi_gbl_osi_mutex
*
******************************************************************************/
acpi_status acpi_ut_remove_interface(acpi_string interface_name)
{
struct acpi_interface_info *previous_interface;
struct acpi_interface_info *next_interface;
previous_interface = next_interface = acpi_gbl_supported_interfaces;
while (next_interface) {
if (!strcmp(interface_name, next_interface->name)) {
/*
* Found: name is in either the static list
* or was added at runtime
*/
if (next_interface->flags & ACPI_OSI_DYNAMIC) {
Annotation
- Immediate include surface: `acpi/acpi.h`, `accommon.h`.
- Detected declarations: `function acpi_ut_initialize_interfaces`, `function acpi_ut_interface_terminate`, `function acpi_ut_install_interface`, `function acpi_ut_remove_interface`, `function acpi_ut_update_interfaces`, `function FALSE`.
- 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.