arch/csky/kernel/cpu-probe.c
Source file repositories/reference/linux-study-clean/arch/csky/kernel/cpu-probe.c
File Facts
- System
- Linux kernel
- Corpus path
arch/csky/kernel/cpu-probe.c- Extension
.c- Size
- 1709 bytes
- Lines
- 80
- Domain
- Architecture Layer
- Bucket
- arch/csky
- 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/of.hlinux/init.hlinux/seq_file.hlinux/memblock.habi/reg_ops.h
Detected Declarations
function percpu_printfunction c_showfunction c_stop
Annotated Snippet
if (!(next >> 28)) {
while ((mfcr("cr13") >> 28) != i);
break;
}
}
/* CPU feature regs, setup by bootloader or gdbinit */
seq_printf(m, "hint (CPU funcs): 0x%08x\n", mfcr_hint());
seq_printf(m, "ccr (L1C & MMU): 0x%08x\n", mfcr("cr18"));
seq_printf(m, "ccr2 (L2C) : 0x%08x\n", mfcr_ccr2());
seq_printf(m, "\n");
}
static int c_show(struct seq_file *m, void *v)
{
int cpu;
for_each_online_cpu(cpu)
smp_call_function_single(cpu, percpu_print, m, true);
#ifdef CSKY_ARCH_VERSION
seq_printf(m, "arch-version : %s\n", CSKY_ARCH_VERSION);
seq_printf(m, "\n");
#endif
return 0;
}
static void *c_start(struct seq_file *m, loff_t *pos)
{
return *pos < 1 ? (void *)1 : NULL;
}
static void *c_next(struct seq_file *m, void *v, loff_t *pos)
{
++*pos;
return NULL;
}
static void c_stop(struct seq_file *m, void *v) {}
const struct seq_operations cpuinfo_op = {
.start = c_start,
.next = c_next,
.stop = c_stop,
.show = c_show,
};
Annotation
- Immediate include surface: `linux/of.h`, `linux/init.h`, `linux/seq_file.h`, `linux/memblock.h`, `abi/reg_ops.h`.
- Detected declarations: `function percpu_print`, `function c_show`, `function c_stop`.
- Atlas domain: Architecture Layer / arch/csky.
- 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.