drivers/acpi/acpica/dbstats.c
Source file repositories/reference/linux-study-clean/drivers/acpi/acpica/dbstats.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/acpi/acpica/dbstats.c- Extension
.c- Size
- 14754 bytes
- Lines
- 510
- 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.hacdebug.hacnamesp.h
Detected Declarations
function acpi_db_list_infofunction acpi_db_enumerate_objectfunction acpi_db_classify_one_objectfunction acpi_db_count_namespace_objectsfunction acpi_db_display_statistics
Annotated Snippet
if (acpi_ns_get_secondary_object(obj_desc)) {
acpi_gbl_obj_type_count[ACPI_TYPE_BUFFER_FIELD]++;
}
break;
case ACPI_TYPE_REGION:
acpi_gbl_obj_type_count[ACPI_TYPE_LOCAL_REGION_FIELD]++;
acpi_db_enumerate_object(obj_desc->region.handler);
break;
case ACPI_TYPE_POWER:
acpi_db_enumerate_object(obj_desc->power_resource.
notify_list[0]);
acpi_db_enumerate_object(obj_desc->power_resource.
notify_list[1]);
break;
case ACPI_TYPE_PROCESSOR:
acpi_db_enumerate_object(obj_desc->processor.notify_list[0]);
acpi_db_enumerate_object(obj_desc->processor.notify_list[1]);
acpi_db_enumerate_object(obj_desc->processor.handler);
break;
case ACPI_TYPE_THERMAL:
acpi_db_enumerate_object(obj_desc->thermal_zone.notify_list[0]);
acpi_db_enumerate_object(obj_desc->thermal_zone.notify_list[1]);
acpi_db_enumerate_object(obj_desc->thermal_zone.handler);
break;
default:
break;
}
}
/*******************************************************************************
*
* FUNCTION: acpi_db_classify_one_object
*
* PARAMETERS: Callback for walk_namespace
*
* RETURN: Status
*
* DESCRIPTION: Enumerate both the object descriptor (including subobjects) and
* the parent namespace node.
*
******************************************************************************/
static acpi_status
acpi_db_classify_one_object(acpi_handle obj_handle,
u32 nesting_level,
void *context, void **return_value)
{
struct acpi_namespace_node *node;
union acpi_operand_object *obj_desc;
u32 type;
acpi_gbl_num_nodes++;
node = (struct acpi_namespace_node *)obj_handle;
obj_desc = acpi_ns_get_attached_object(node);
acpi_db_enumerate_object(obj_desc);
type = node->type;
if (type > ACPI_TYPE_NS_NODE_MAX) {
acpi_gbl_node_type_count_misc++;
} else {
acpi_gbl_node_type_count[type]++;
}
return (AE_OK);
#ifdef ACPI_FUTURE_IMPLEMENTATION
/* TBD: These need to be counted during the initial parsing phase */
if (acpi_ps_is_named_op(op->opcode)) {
num_nodes++;
}
if (is_method) {
num_method_elements++;
}
num_grammar_elements++;
Annotation
- Immediate include surface: `acpi/acpi.h`, `accommon.h`, `acdebug.h`, `acnamesp.h`.
- Detected declarations: `function acpi_db_list_info`, `function acpi_db_enumerate_object`, `function acpi_db_classify_one_object`, `function acpi_db_count_namespace_objects`, `function acpi_db_display_statistics`.
- 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.