arch/riscv/kernel/vector.c
Source file repositories/reference/linux-study-clean/arch/riscv/kernel/vector.c
File Facts
- System
- Linux kernel
- Corpus path
arch/riscv/kernel/vector.c- Extension
.c- Size
- 8065 bytes
- Lines
- 333
- 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.
- Touches user memory; correctness depends on fault-safe copying and privilege boundary handling.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/export.hlinux/sched/signal.hlinux/types.hlinux/slab.hlinux/sched.hlinux/uaccess.hlinux/prctl.hasm/thread_info.hasm/processor.hasm/insn.hasm/vector.hasm/csr.hasm/elf.hasm/ptrace.hasm/bug.h
Detected Declarations
function riscv_v_setup_vsizefunction riscv_v_setup_ctx_cachefunction insn_is_vectorfunction riscv_v_thread_ctx_allocfunction riscv_v_thread_allocfunction riscv_v_thread_freefunction riscv_v_ctrl_get_curfunction riscv_v_ctrl_get_nextfunction riscv_v_ctrl_test_inheritfunction riscv_v_ctrl_setfunction riscv_v_vstate_ctrl_user_allowedfunction riscv_v_first_use_handlerfunction riscv_v_vstate_ctrl_initfunction riscv_v_vstate_ctrl_get_currentfunction riscv_v_vstate_ctrl_set_currentfunction riscv_v_sysctl_initfunction riscv_v_sysctl_initfunction riscv_v_initmodule init riscv_v_initexport riscv_v_vsizeexport riscv_v_vstate_ctrl_user_allowed
Annotated Snippet
core_initcall(riscv_v_init);
Annotation
- Immediate include surface: `linux/export.h`, `linux/sched/signal.h`, `linux/types.h`, `linux/slab.h`, `linux/sched.h`, `linux/uaccess.h`, `linux/prctl.h`, `asm/thread_info.h`.
- Detected declarations: `function riscv_v_setup_vsize`, `function riscv_v_setup_ctx_cache`, `function insn_is_vector`, `function riscv_v_thread_ctx_alloc`, `function riscv_v_thread_alloc`, `function riscv_v_thread_free`, `function riscv_v_ctrl_get_cur`, `function riscv_v_ctrl_get_next`, `function riscv_v_ctrl_test_inherit`, `function riscv_v_ctrl_set`.
- Atlas domain: Architecture Layer / arch/riscv.
- Implementation status: integration implementation candidate.
- This snippet crosses the user/kernel memory boundary; validate fault handling and access checks before translating the pattern.
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.