arch/parisc/kernel/topology.c
Source file repositories/reference/linux-study-clean/arch/parisc/kernel/topology.c
File Facts
- System
- Linux kernel
- Corpus path
arch/parisc/kernel/topology.c- Extension
.c- Size
- 2252 bytes
- Lines
- 88
- Domain
- Architecture Layer
- Bucket
- arch/parisc
- Inferred role
- Architecture Layer: implementation source
- Status
- source 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 uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/percpu.hlinux/sched.hlinux/sched/topology.hlinux/cpu.hasm/topology.hasm/sections.h
Detected Declarations
function store_cpu_topologyfunction init_cpu_topology
Annotated Snippet
if (cpuinfo->cpu_loc == p->cpu_loc) {
cpuid_topo->core_id = cpu_topology[cpu].core_id;
if (p->cpu_loc) {
cpuid_topo->core_id++;
cpuid_topo->package_id = cpu_topology[cpu].package_id;
continue;
}
}
if (cpuid_topo->package_id == -1)
max_socket = max(max_socket, cpu_topology[cpu].package_id);
}
if (cpuid_topo->package_id == -1)
cpuid_topo->package_id = max_socket + 1;
update_siblings_masks(cpuid);
pr_info("CPU%u: cpu core %d of socket %d\n",
cpuid,
cpu_topology[cpuid].core_id,
cpu_topology[cpuid].package_id);
}
/*
* init_cpu_topology is called at boot when only one cpu is running
* which prevent simultaneous write access to cpu_topology array
*/
void __init init_cpu_topology(void)
{
reset_cpu_topology();
}
Annotation
- Immediate include surface: `linux/percpu.h`, `linux/sched.h`, `linux/sched/topology.h`, `linux/cpu.h`, `asm/topology.h`, `asm/sections.h`.
- Detected declarations: `function store_cpu_topology`, `function init_cpu_topology`.
- Atlas domain: Architecture Layer / arch/parisc.
- Implementation status: source 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.