drivers/char/agp/via-agp.c
Source file repositories/reference/linux-study-clean/drivers/char/agp/via-agp.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/char/agp/via-agp.c- Extension
.c- Size
- 14000 bytes
- Lines
- 581
- Domain
- Driver Families
- Bucket
- drivers/char
- 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.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/types.hlinux/module.hlinux/pci.hlinux/init.hlinux/agp_backend.hagp.h
Detected Declarations
function via_fetch_sizefunction via_configurefunction via_cleanupfunction via_tlbflushfunction via_fetch_size_agp3function via_configure_agp3function via_cleanup_agp3function via_tlbflush_agp3function check_via_agp3function agp_via_probefunction agp_via_removefunction agp_via_resumefunction agp_via_initfunction agp_via_cleanupmodule init agp_via_init
Annotated Snippet
static struct pci_driver agp_via_pci_driver = {
.name = "agpgart-via",
.id_table = agp_via_pci_table,
.probe = agp_via_probe,
.remove = agp_via_remove,
.driver.pm = &agp_via_pm_ops,
};
static int __init agp_via_init(void)
{
if (agp_off)
return -EINVAL;
return pci_register_driver(&agp_via_pci_driver);
}
static void __exit agp_via_cleanup(void)
{
pci_unregister_driver(&agp_via_pci_driver);
}
module_init(agp_via_init);
module_exit(agp_via_cleanup);
MODULE_DESCRIPTION("VIA AGPGART routines");
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Dave Jones");
Annotation
- Immediate include surface: `linux/types.h`, `linux/module.h`, `linux/pci.h`, `linux/init.h`, `linux/agp_backend.h`, `agp.h`.
- Detected declarations: `function via_fetch_size`, `function via_configure`, `function via_cleanup`, `function via_tlbflush`, `function via_fetch_size_agp3`, `function via_configure_agp3`, `function via_cleanup_agp3`, `function via_tlbflush_agp3`, `function check_via_agp3`, `function agp_via_probe`.
- Atlas domain: Driver Families / drivers/char.
- Implementation status: pattern 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.