drivers/gpu/drm/amd/amdgpu/amdgpu_aca.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/amd/amdgpu/amdgpu_aca.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/amd/amdgpu/amdgpu_aca.c- Extension
.c- Size
- 24588 bytes
- Lines
- 986
- Domain
- Driver Families
- Bucket
- drivers/gpu
- Inferred role
- Driver Families: operation-table or driver-model contract
- Status
- pattern 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 an operation table; this is where Linux turns generic core objects into subsystem-specific behavior.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/list.hamdgpu.hamdgpu_aca.hamdgpu_ras.h
Detected Declarations
struct aca_dump_contextfunction aca_banks_initfunction aca_banks_add_bankfunction aca_banks_releasefunction list_for_each_entry_safefunction aca_smu_get_valid_aca_countfunction aca_smu_bank_dumpfunction aca_bank_hwip_is_matchedfunction aca_smu_get_valid_aca_banksfunction aca_bank_is_validfunction aca_bank_error_removefunction aca_error_cache_log_bank_errorfunction aca_bank_parserfunction handler_aca_log_bank_errorfunction aca_dispatch_bankfunction list_for_each_entryfunction aca_dispatch_banksfunction list_for_each_entryfunction aca_bank_should_updatefunction aca_banks_generate_cperfunction list_for_each_entryfunction aca_banks_updatefunction aca_log_aca_error_datafunction aca_log_aca_errorfunction list_for_each_entry_safefunction __aca_get_error_datafunction aca_handle_is_validfunction amdgpu_aca_get_error_datafunction aca_error_initfunction aca_init_error_cachefunction aca_error_finifunction aca_fini_error_cachefunction add_aca_handlefunction aca_sysfs_readfunction add_aca_sysfsfunction amdgpu_aca_add_handlefunction remove_aca_handlefunction remove_aca_sysfsfunction amdgpu_aca_remove_handlefunction aca_manager_initfunction aca_manager_finifunction amdgpu_aca_is_enabledfunction amdgpu_aca_initfunction amdgpu_aca_finifunction amdgpu_aca_resetfunction amdgpu_aca_set_smu_funcsfunction aca_bank_info_decodefunction aca_bank_get_error_code
Annotated Snippet
static const struct file_operations aca_ce_dump_debug_fops = {
.owner = THIS_MODULE,
.open = aca_dump_ce_open,
.read = seq_read,
.llseek = seq_lseek,
.release = single_release,
};
static int aca_dump_ue_show(struct seq_file *m, void *unused)
{
return aca_dump_show(m, ACA_SMU_TYPE_UE);
}
static int aca_dump_ue_open(struct inode *inode, struct file *file)
{
return single_open(file, aca_dump_ue_show, inode->i_private);
}
static const struct file_operations aca_ue_dump_debug_fops = {
.owner = THIS_MODULE,
.open = aca_dump_ue_open,
.read = seq_read,
.llseek = seq_lseek,
.release = single_release,
};
DEFINE_DEBUGFS_ATTRIBUTE(aca_debug_mode_fops, NULL, amdgpu_aca_smu_debug_mode_set, "%llu\n");
#endif
void amdgpu_aca_smu_debugfs_init(struct amdgpu_device *adev, struct dentry *root)
{
#if defined(CONFIG_DEBUG_FS)
if (!root)
return;
debugfs_create_file("aca_debug_mode", 0200, root, adev, &aca_debug_mode_fops);
debugfs_create_file("aca_ue_dump", 0400, root, adev, &aca_ue_dump_debug_fops);
debugfs_create_file("aca_ce_dump", 0400, root, adev, &aca_ce_dump_debug_fops);
#endif
}
Annotation
- Immediate include surface: `linux/list.h`, `amdgpu.h`, `amdgpu_aca.h`, `amdgpu_ras.h`.
- Detected declarations: `struct aca_dump_context`, `function aca_banks_init`, `function aca_banks_add_bank`, `function aca_banks_release`, `function list_for_each_entry_safe`, `function aca_smu_get_valid_aca_count`, `function aca_smu_bank_dump`, `function aca_bank_hwip_is_matched`, `function aca_smu_get_valid_aca_banks`, `function aca_bank_is_valid`.
- Atlas domain: Driver Families / drivers/gpu.
- Implementation status: pattern implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.