arch/csky/kernel/entry.S
Source file repositories/reference/linux-study-clean/arch/csky/kernel/entry.S
File Facts
- System
- Linux kernel
- Corpus path
arch/csky/kernel/entry.S- Extension
.S- Size
- 5019 bytes
- Lines
- 275
- Domain
- Architecture Layer
- Bucket
- arch/csky
- Inferred role
- Architecture Layer: arch/csky
- 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/linkage.habi/entry.habi/pgtable-bits.hasm/errno.hasm/setup.hasm/unistd.hasm/asm-offsets.hlinux/threads.hasm/page.hasm/thread_info.h
Detected Declarations
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
// Copyright (C) 2018 Hangzhou C-SKY Microsystems co.,ltd.
#include <linux/linkage.h>
#include <abi/entry.h>
#include <abi/pgtable-bits.h>
#include <asm/errno.h>
#include <asm/setup.h>
#include <asm/unistd.h>
#include <asm/asm-offsets.h>
#include <linux/threads.h>
#include <asm/page.h>
#include <asm/thread_info.h>
.macro zero_fp
#ifdef CONFIG_STACKTRACE
movi r8, 0
#endif
.endm
.macro context_tracking
#ifdef CONFIG_CONTEXT_TRACKING_USER
mfcr a0, epsr
btsti a0, 31
bt 1f
jbsr user_exit_callable
ldw a0, (sp, LSAVE_A0)
ldw a1, (sp, LSAVE_A1)
ldw a2, (sp, LSAVE_A2)
ldw a3, (sp, LSAVE_A3)
#if defined(__CSKYABIV1__)
ldw r6, (sp, LSAVE_A4)
ldw r7, (sp, LSAVE_A5)
#endif
1:
#endif
.endm
.text
ENTRY(csky_pagefault)
SAVE_ALL 0
zero_fp
context_tracking
psrset ee
mov a0, sp
jbsr do_page_fault
jmpi ret_from_exception
ENTRY(csky_systemcall)
SAVE_ALL TRAP0_SIZE
zero_fp
context_tracking
psrset ee, ie
lrw r9, __NR_syscalls
cmphs syscallid, r9 /* Check nr of syscall */
bt ret_from_exception
lrw r9, sys_call_table
ixw r9, syscallid
ldw syscallid, (r9)
cmpnei syscallid, 0
bf ret_from_exception
mov r9, sp
bmaski r10, THREAD_SHIFT
andn r9, r10
ldw r10, (r9, TINFO_FLAGS)
lrw r9, _TIF_SYSCALL_WORK
and r10, r9
cmpnei r10, 0
Annotation
- Immediate include surface: `linux/linkage.h`, `abi/entry.h`, `abi/pgtable-bits.h`, `asm/errno.h`, `asm/setup.h`, `asm/unistd.h`, `asm/asm-offsets.h`, `linux/threads.h`.
- Atlas domain: Architecture Layer / arch/csky.
- 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.