drivers/acpi/acpica/utcopy.c
Source file repositories/reference/linux-study-clean/drivers/acpi/acpica/utcopy.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/acpi/acpica/utcopy.c- Extension
.c- Size
- 27055 bytes
- Lines
- 978
- 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.hacnamesp.h
Detected Declarations
function acpi_ut_copy_isimple_to_esimplefunction acpi_ut_copy_ielement_to_eelementfunction acpi_ut_copy_ipackage_to_epackagefunction acpi_ut_copy_iobject_to_eobjectfunction acpi_ut_copy_esimple_to_isimplefunction acpi_ut_copy_epackage_to_ipackagefunction acpi_ut_copy_eobject_to_iobjectfunction acpi_ut_copy_simple_objectfunction referencefunction acpi_ut_copy_ielement_to_ielementfunction acpi_ut_copy_ipackage_to_ipackagefunction acpi_ut_copy_iobject_to_iobject
Annotated Snippet
switch (internal_object->reference.class) {
case ACPI_REFCLASS_NAME:
/*
* For namepath, return the object handle ("reference")
* We are referring to the namespace node
*/
external_object->reference.handle =
internal_object->reference.node;
external_object->reference.actual_type =
acpi_ns_get_type(internal_object->reference.node);
break;
default:
/* All other reference types are unsupported */
return_ACPI_STATUS(AE_TYPE);
}
break;
case ACPI_TYPE_PROCESSOR:
external_object->processor.proc_id =
internal_object->processor.proc_id;
external_object->processor.pblk_address =
internal_object->processor.address;
external_object->processor.pblk_length =
internal_object->processor.length;
break;
case ACPI_TYPE_POWER:
external_object->power_resource.system_level =
internal_object->power_resource.system_level;
external_object->power_resource.resource_order =
internal_object->power_resource.resource_order;
break;
default:
/*
* There is no corresponding external object type
*/
ACPI_ERROR((AE_INFO,
"Unsupported object type, cannot convert to external object: %s",
acpi_ut_get_type_name(internal_object->common.
type)));
return_ACPI_STATUS(AE_SUPPORT);
}
return_ACPI_STATUS(status);
}
/*******************************************************************************
*
* FUNCTION: acpi_ut_copy_ielement_to_eelement
*
* PARAMETERS: acpi_pkg_callback
*
* RETURN: Status
*
* DESCRIPTION: Copy one package element to another package element
*
******************************************************************************/
static acpi_status
acpi_ut_copy_ielement_to_eelement(u8 object_type,
union acpi_operand_object *source_object,
union acpi_generic_state *state,
void *context)
{
acpi_status status = AE_OK;
struct acpi_pkg_info *info = (struct acpi_pkg_info *)context;
acpi_size object_space;
u32 this_index;
union acpi_object *target_object;
ACPI_FUNCTION_ENTRY();
this_index = state->pkg.index;
target_object = (union acpi_object *)&((union acpi_object *)
(state->pkg.dest_object))->
package.elements[this_index];
switch (object_type) {
case ACPI_COPY_TYPE_SIMPLE:
/*
* This is a simple or null object
*/
Annotation
- Immediate include surface: `acpi/acpi.h`, `accommon.h`, `acnamesp.h`.
- Detected declarations: `function acpi_ut_copy_isimple_to_esimple`, `function acpi_ut_copy_ielement_to_eelement`, `function acpi_ut_copy_ipackage_to_epackage`, `function acpi_ut_copy_iobject_to_eobject`, `function acpi_ut_copy_esimple_to_isimple`, `function acpi_ut_copy_epackage_to_ipackage`, `function acpi_ut_copy_eobject_to_iobject`, `function acpi_ut_copy_simple_object`, `function reference`, `function acpi_ut_copy_ielement_to_ielement`.
- 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.