arch/powerpc/kernel/pci_32.c
Source file repositories/reference/linux-study-clean/arch/powerpc/kernel/pci_32.c
File Facts
- System
- Linux kernel
- Corpus path
arch/powerpc/kernel/pci_32.c- Extension
.c- Size
- 8701 bytes
- Lines
- 348
- Domain
- Architecture Layer
- Bucket
- arch/powerpc
- 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/kernel.hlinux/pci.hlinux/delay.hlinux/string.hlinux/init.hlinux/capability.hlinux/sched.hlinux/errno.hlinux/memblock.hlinux/syscalls.hlinux/irq.hlinux/list.hlinux/of.hlinux/slab.hlinux/export.hasm/processor.hasm/io.hasm/sections.hasm/pci-bridge.hasm/ppc-pci.hasm/byteorder.hlinux/uaccess.hasm/machdep.h
Detected Declarations
syscall pciconfig_iobasefunction fixup_cpc710_pci64function make_one_node_mapfunction for_each_child_of_nodefunction pcibios_make_OF_bus_mapfunction pci_device_from_OF_nodefunction for_each_pci_devfunction pci_create_OF_bus_mapfunction pcibios_setup_phb_io_spacefunction pcibios_initfunction pci_bus_to_hosemodule init pcibios_initexport isa_io_baseexport pci_dram_offsetexport isa_bridge_pcidevexport pci_device_from_OF_node
Annotated Snippet
SYSCALL_DEFINE3(pciconfig_iobase, long, which,
unsigned long, bus, unsigned long, devfn)
{
struct pci_controller* hose;
long result = -EOPNOTSUPP;
hose = pci_bus_to_hose(bus);
if (!hose)
return -ENODEV;
switch (which) {
case IOBASE_BRIDGE_NUMBER:
return (long)hose->first_busno;
case IOBASE_MEMORY:
return (long)hose->mem_offset[0];
case IOBASE_IO:
return (long)hose->io_base_phys;
case IOBASE_ISA_IO:
return (long)isa_io_base;
case IOBASE_ISA_MEM:
return (long)isa_mem_base;
}
return result;
}
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/pci.h`, `linux/delay.h`, `linux/string.h`, `linux/init.h`, `linux/capability.h`, `linux/sched.h`, `linux/errno.h`.
- Detected declarations: `syscall pciconfig_iobase`, `function fixup_cpc710_pci64`, `function make_one_node_map`, `function for_each_child_of_node`, `function pcibios_make_OF_bus_map`, `function pci_device_from_OF_node`, `function for_each_pci_dev`, `function pci_create_OF_bus_map`, `function pcibios_setup_phb_io_space`, `function pcibios_init`.
- Atlas domain: Architecture Layer / arch/powerpc.
- 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.