arch/loongarch/kernel/head.S
Source file repositories/reference/linux-study-clean/arch/loongarch/kernel/head.S
File Facts
- System
- Linux kernel
- Corpus path
arch/loongarch/kernel/head.S- Extension
.S- Size
- 2908 bytes
- Lines
- 139
- Domain
- Architecture Layer
- Bucket
- arch/loongarch
- Inferred role
- Architecture Layer: arch/loongarch
- Status
- atlas-only
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.
Dependency Surface
linux/init.hlinux/threads.hasm/addrspace.hasm/asm.hasm/asmmacro.hasm/bug.hasm/regdef.hasm/loongarch.hasm/stackframe.hefi-header.S
Detected Declarations
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
bl start_kernel
ASM_BUG()
SYM_CODE_END(kernel_entry)
#ifdef CONFIG_SMP
/*
* SMP slave cpus entry point. Board specific code for bootstrap calls this
* function after setting up the stack and tp registers.
*/
SYM_CODE_START(smpboot_entry)
UNWIND_HINT_END_OF_STACK
SETUP_TWINS
SETUP_MODES t0
JUMP_VIRT_ADDR t0, t1
SETUP_DMWINS t0
#ifdef CONFIG_PAGE_SIZE_4KB
LONG_LI t0, 0
LONG_LI t1, CSR_STFILL
csrxchg t0, t1, LOONGARCH_CSR_IMPCTL1
#endif
la.pcrel t0, cpuboot_data
ld.d sp, t0, CPU_BOOT_STACK
ld.d tp, t0, CPU_BOOT_TINFO
bl start_secondary
ASM_BUG()
SYM_CODE_END(smpboot_entry)
#endif /* CONFIG_SMP */
Annotation
- Immediate include surface: `linux/init.h`, `linux/threads.h`, `asm/addrspace.h`, `asm/asm.h`, `asm/asmmacro.h`, `asm/bug.h`, `asm/regdef.h`, `asm/loongarch.h`.
- Atlas domain: Architecture Layer / arch/loongarch.
- Implementation status: atlas-only.
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.