arch/alpha/kernel/pci.c
Source file repositories/reference/linux-study-clean/arch/alpha/kernel/pci.c
File Facts
- System
- Linux kernel
- Corpus path
arch/alpha/kernel/pci.c- Extension
.c- Size
- 11803 bytes
- Lines
- 468
- Domain
- Architecture Layer
- Bucket
- arch/alpha
- Inferred role
- Architecture Layer: syscall or user/kernel boundary
- Status
- core implementation candidate
Why This File Exists
CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- Defines or participates in a user/kernel boundary; inspect argument validation, copy_from_user/copy_to_user, credentials, and dispatch target.
- 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/string.hlinux/pci.hlinux/init.hlinux/ioport.hlinux/kernel.hlinux/memblock.hlinux/module.hlinux/cache.hlinux/slab.hlinux/syscalls.hasm/machvec.hproto.hpci_impl.h
Detected Declarations
syscall pciconfig_iobasestruct pdev_srm_saved_conffunction quirk_isa_bridgefunction quirk_cypressfunction rangesfunction pcibios_fixup_finalfunction pcibios_align_resourcefunction pcibios_initfunction pdev_save_srm_configfunction pci_restore_srm_configfunction pcibios_fixup_busfunction list_for_each_entryfunction pcibios_set_masterfunction pcibios_claim_one_busfunction list_for_each_entryfunction pci_dev_for_each_resourcefunction pcibios_claim_console_setupfunction common_init_pcifunction alloc_pci_controllerfunction alloc_resourcefunction pci_iounmapmodule init pcibios_initexport pci_iounmapexport isa_bridge
Annotated Snippet
SYSCALL_DEFINE3(pciconfig_iobase, long, which, unsigned long, bus,
unsigned long, dfn)
{
struct pci_controller *hose;
struct pci_dev *dev;
/* from hose or from bus.devfn */
if (which & IOBASE_FROM_HOSE) {
for(hose = hose_head; hose; hose = hose->next)
if (hose->index == bus) break;
if (!hose) return -ENODEV;
} else {
/* Special hook for ISA access. */
if (bus == 0 && dfn == 0) {
hose = pci_isa_hose;
} else {
dev = pci_get_domain_bus_and_slot(0, bus, dfn);
if (!dev)
return -ENODEV;
hose = dev->sysdata;
pci_dev_put(dev);
}
}
switch (which & ~IOBASE_FROM_HOSE) {
case IOBASE_HOSE:
return hose->index;
case IOBASE_SPARSE_MEM:
return hose->sparse_mem_base;
case IOBASE_DENSE_MEM:
return hose->dense_mem_base;
case IOBASE_SPARSE_IO:
return hose->sparse_io_base;
case IOBASE_DENSE_IO:
return hose->dense_io_base;
case IOBASE_ROOT_BUS:
return hose->bus->number;
}
return -EOPNOTSUPP;
}
/* Destroy an __iomem token. Not copied from lib/iomap.c. */
void pci_iounmap(struct pci_dev *dev, void __iomem * addr)
{
if (__is_mmio(addr))
iounmap(addr);
}
EXPORT_SYMBOL(pci_iounmap);
/* FIXME: Some boxes have multiple ISA bridges! */
struct pci_dev *isa_bridge;
EXPORT_SYMBOL(isa_bridge);
Annotation
- Immediate include surface: `linux/string.h`, `linux/pci.h`, `linux/init.h`, `linux/ioport.h`, `linux/kernel.h`, `linux/memblock.h`, `linux/module.h`, `linux/cache.h`.
- Detected declarations: `syscall pciconfig_iobase`, `struct pdev_srm_saved_conf`, `function quirk_isa_bridge`, `function quirk_cypress`, `function ranges`, `function pcibios_fixup_final`, `function pcibios_align_resource`, `function pcibios_init`, `function pdev_save_srm_config`, `function pci_restore_srm_config`.
- Atlas domain: Architecture Layer / arch/alpha.
- Implementation status: core 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.