arch/riscv/kernel/setup.c
Source file repositories/reference/linux-study-clean/arch/riscv/kernel/setup.c
File Facts
- System
- Linux kernel
- Corpus path
arch/riscv/kernel/setup.c- Extension
.c- Size
- 10336 bytes
- Lines
- 408
- Domain
- Architecture Layer
- Bucket
- arch/riscv
- Inferred role
- Architecture Layer: exported/initcall integration point
- Status
- integration 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.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/acpi.hlinux/cpu.hlinux/init.hlinux/mm.hlinux/memblock.hlinux/sched.hlinux/console.hlinux/of_fdt.hlinux/sched/task.hlinux/smp.hlinux/efi.hlinux/crash_dump.hlinux/panic_notifier.hlinux/jump_label.hlinux/gcd.hasm/acpi.hasm/alternative.hasm/cacheflush.hasm/cpufeature.hasm/early_ioremap.hasm/pgtable.hasm/setup.hasm/set_memory.hasm/sections.hasm/sbi.hasm/tlbflush.hasm/thread_info.hasm/kasan.hasm/efi.hhead.h
Detected Declarations
function add_resourcefunction add_kernel_resourcesfunction init_resourcesfunction for_each_reserved_mem_regionfunction reserve_memblock_reserved_regionsfunction for_each_reserved_mem_rangefunction parse_dtbfunction riscv_spinlock_initfunction setup_archfunction arch_cpu_is_hotpluggablefunction free_initmemfunction dump_kernel_offsetfunction register_kernel_offset_dumpermodule init register_kernel_offset_dumperexport boot_cpu_hartidexport qspinlock_key
Annotated Snippet
device_initcall(register_kernel_offset_dumper);
Annotation
- Immediate include surface: `linux/acpi.h`, `linux/cpu.h`, `linux/init.h`, `linux/mm.h`, `linux/memblock.h`, `linux/sched.h`, `linux/console.h`, `linux/of_fdt.h`.
- Detected declarations: `function add_resource`, `function add_kernel_resources`, `function init_resources`, `function for_each_reserved_mem_region`, `function reserve_memblock_reserved_regions`, `function for_each_reserved_mem_range`, `function parse_dtb`, `function riscv_spinlock_init`, `function setup_arch`, `function arch_cpu_is_hotpluggable`.
- Atlas domain: Architecture Layer / arch/riscv.
- Implementation status: integration implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.