drivers/char/agp/nvidia-agp.c
Source file repositories/reference/linux-study-clean/drivers/char/agp/nvidia-agp.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/char/agp/nvidia-agp.c- Extension
.c- Size
- 12755 bytes
- Lines
- 470
- 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/module.hlinux/pci.hlinux/init.hlinux/agp_backend.hlinux/page-flags.hlinux/mm.hlinux/jiffies.hasm/msr.hagp.h
Detected Declarations
function nvidia_fetch_sizefunction nvidia_init_iorrfunction nvidia_configurefunction nvidia_cleanupfunction nvidia_insert_memoryfunction nvidia_remove_memoryfunction nvidia_tlbflushfunction agp_nvidia_probefunction agp_nvidia_removefunction agp_nvidia_resumefunction agp_nvidia_initfunction agp_nvidia_cleanupmodule init agp_nvidia_init
Annotated Snippet
static struct pci_driver agp_nvidia_pci_driver = {
.name = "agpgart-nvidia",
.id_table = agp_nvidia_pci_table,
.probe = agp_nvidia_probe,
.remove = agp_nvidia_remove,
.driver.pm = &agp_nvidia_pm_ops,
};
static int __init agp_nvidia_init(void)
{
if (agp_off)
return -EINVAL;
return pci_register_driver(&agp_nvidia_pci_driver);
}
static void __exit agp_nvidia_cleanup(void)
{
pci_unregister_driver(&agp_nvidia_pci_driver);
pci_dev_put(nvidia_private.dev_1);
pci_dev_put(nvidia_private.dev_2);
pci_dev_put(nvidia_private.dev_3);
}
module_init(agp_nvidia_init);
module_exit(agp_nvidia_cleanup);
MODULE_DESCRIPTION("Nvidia AGPGART routines");
MODULE_LICENSE("GPL and additional rights");
MODULE_AUTHOR("NVIDIA Corporation");
Annotation
- Immediate include surface: `linux/module.h`, `linux/pci.h`, `linux/init.h`, `linux/agp_backend.h`, `linux/page-flags.h`, `linux/mm.h`, `linux/jiffies.h`, `asm/msr.h`.
- Detected declarations: `function nvidia_fetch_size`, `function nvidia_init_iorr`, `function nvidia_configure`, `function nvidia_cleanup`, `function nvidia_insert_memory`, `function nvidia_remove_memory`, `function nvidia_tlbflush`, `function agp_nvidia_probe`, `function agp_nvidia_remove`, `function agp_nvidia_resume`.
- 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.