drivers/acpi/acpica/rsio.c
Source file repositories/reference/linux-study-clean/drivers/acpi/acpica/rsio.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/acpi/acpica/rsio.c- Extension
.c- Size
- 7383 bytes
- Lines
- 255
- 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.hacresrc.h
Detected Declarations
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
// SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0
/*******************************************************************************
*
* Module Name: rsio - IO and DMA resource descriptors
*
******************************************************************************/
#include <acpi/acpi.h>
#include "accommon.h"
#include "acresrc.h"
#define _COMPONENT ACPI_RESOURCES
ACPI_MODULE_NAME("rsio")
/*******************************************************************************
*
* acpi_rs_convert_io
*
******************************************************************************/
struct acpi_rsconvert_info acpi_rs_convert_io[5] = {
{ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_IO,
ACPI_RS_SIZE(struct acpi_resource_io),
ACPI_RSC_TABLE_SIZE(acpi_rs_convert_io)},
{ACPI_RSC_INITSET, ACPI_RESOURCE_NAME_IO,
sizeof(struct aml_resource_io),
0},
/* Decode flag */
{ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.io.io_decode),
AML_OFFSET(io.flags),
0},
/*
* These fields are contiguous in both the source and destination:
* Address Alignment
* Length
* Minimum Base Address
* Maximum Base Address
*/
{ACPI_RSC_MOVE8, ACPI_RS_OFFSET(data.io.alignment),
AML_OFFSET(io.alignment),
2},
{ACPI_RSC_MOVE16, ACPI_RS_OFFSET(data.io.minimum),
AML_OFFSET(io.minimum),
2}
};
/*******************************************************************************
*
* acpi_rs_convert_fixed_io
*
******************************************************************************/
struct acpi_rsconvert_info acpi_rs_convert_fixed_io[4] = {
{ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_FIXED_IO,
ACPI_RS_SIZE(struct acpi_resource_fixed_io),
ACPI_RSC_TABLE_SIZE(acpi_rs_convert_fixed_io)},
{ACPI_RSC_INITSET, ACPI_RESOURCE_NAME_FIXED_IO,
sizeof(struct aml_resource_fixed_io),
0},
/*
* These fields are contiguous in both the source and destination:
* Base Address
* Length
*/
{ACPI_RSC_MOVE8, ACPI_RS_OFFSET(data.fixed_io.address_length),
AML_OFFSET(fixed_io.address_length),
1},
{ACPI_RSC_MOVE16, ACPI_RS_OFFSET(data.fixed_io.address),
AML_OFFSET(fixed_io.address),
1}
};
/*******************************************************************************
*
* acpi_rs_convert_generic_reg
*
******************************************************************************/
struct acpi_rsconvert_info acpi_rs_convert_generic_reg[4] = {
{ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_GENERIC_REGISTER,
ACPI_RS_SIZE(struct acpi_resource_generic_register),
ACPI_RSC_TABLE_SIZE(acpi_rs_convert_generic_reg)},
{ACPI_RSC_INITSET, ACPI_RESOURCE_NAME_GENERIC_REGISTER,
sizeof(struct aml_resource_generic_register),
Annotation
- Immediate include surface: `acpi/acpi.h`, `accommon.h`, `acresrc.h`.
- 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.