drivers/acpi/acpica/evrgnini.c
Source file repositories/reference/linux-study-clean/drivers/acpi/acpica/evrgnini.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/acpi/acpica/evrgnini.c- Extension
.c- Size
- 17902 bytes
- Lines
- 622
- 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.hacevents.hacnamesp.hacinterp.h
Detected Declarations
function Copyrightfunction acpi_ev_io_space_region_setupfunction acpi_ev_pci_config_region_setupfunction acpi_ev_is_pci_root_bridgefunction acpi_ev_pci_bar_region_setupfunction acpi_ev_cmos_region_setupfunction acpi_ev_data_table_region_setupfunction acpi_ev_default_region_setupfunction operation_region
Annotated Snippet
if (*region_context) {
local_region_context =
(struct acpi_mem_space_context *)*region_context;
/* Delete memory mappings if present */
while (local_region_context->first_mm) {
mm = local_region_context->first_mm;
local_region_context->first_mm = mm->next_mm;
acpi_os_unmap_memory(mm->logical_address,
mm->length);
ACPI_FREE(mm);
}
ACPI_FREE(local_region_context);
*region_context = NULL;
}
return_ACPI_STATUS(AE_OK);
}
/* Create a new context */
local_region_context =
ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_mem_space_context));
if (!(local_region_context)) {
return_ACPI_STATUS(AE_NO_MEMORY);
}
/* Save the region length and address for use in the handler */
local_region_context->length = region_desc->region.length;
local_region_context->address = region_desc->region.address;
*region_context = local_region_context;
return_ACPI_STATUS(AE_OK);
}
/*******************************************************************************
*
* FUNCTION: acpi_ev_io_space_region_setup
*
* PARAMETERS: handle - Region we are interested in
* function - Start or stop
* handler_context - Address space handler context
* region_context - Region specific context
*
* RETURN: Status
*
* DESCRIPTION: Setup a IO operation region
*
******************************************************************************/
acpi_status
acpi_ev_io_space_region_setup(acpi_handle handle,
u32 function,
void *handler_context, void **region_context)
{
ACPI_FUNCTION_TRACE(ev_io_space_region_setup);
if (function == ACPI_REGION_DEACTIVATE) {
*region_context = NULL;
} else {
*region_context = handler_context;
}
return_ACPI_STATUS(AE_OK);
}
/*******************************************************************************
*
* FUNCTION: acpi_ev_pci_config_region_setup
*
* PARAMETERS: handle - Region we are interested in
* function - Start or stop
* handler_context - Address space handler context
* region_context - Region specific context
*
* RETURN: Status
*
* DESCRIPTION: Setup a PCI_Config operation region
*
* MUTEX: Assumes namespace is not locked
*
******************************************************************************/
acpi_status
acpi_ev_pci_config_region_setup(acpi_handle handle,
u32 function,
void *handler_context, void **region_context)
{
acpi_status status = AE_OK;
Annotation
- Immediate include surface: `acpi/acpi.h`, `accommon.h`, `acevents.h`, `acnamesp.h`, `acinterp.h`.
- Detected declarations: `function Copyright`, `function acpi_ev_io_space_region_setup`, `function acpi_ev_pci_config_region_setup`, `function acpi_ev_is_pci_root_bridge`, `function acpi_ev_pci_bar_region_setup`, `function acpi_ev_cmos_region_setup`, `function acpi_ev_data_table_region_setup`, `function acpi_ev_default_region_setup`, `function operation_region`.
- 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.