arch/csky/include/asm/switch_to.h
Source file repositories/reference/linux-study-clean/arch/csky/include/asm/switch_to.h
File Facts
- System
- Linux kernel
- Corpus path
arch/csky/include/asm/switch_to.h- Extension
.h- Size
- 923 bytes
- Lines
- 36
- 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/thread_info.habi/fpu.h
Detected Declarations
function __switch_to_fpufunction __switch_to_fpu
Annotated Snippet
#ifndef __ASM_CSKY_SWITCH_TO_H
#define __ASM_CSKY_SWITCH_TO_H
#include <linux/thread_info.h>
#ifdef CONFIG_CPU_HAS_FPU
#include <abi/fpu.h>
static inline void __switch_to_fpu(struct task_struct *prev,
struct task_struct *next)
{
save_to_user_fp(&prev->thread.user_fp);
restore_from_user_fp(&next->thread.user_fp);
}
#else
static inline void __switch_to_fpu(struct task_struct *prev,
struct task_struct *next)
{}
#endif
/*
* Context switching is now performed out-of-line in switch_to.S
*/
extern struct task_struct *__switch_to(struct task_struct *,
struct task_struct *);
#define switch_to(prev, next, last) \
do { \
struct task_struct *__prev = (prev); \
struct task_struct *__next = (next); \
__switch_to_fpu(__prev, __next); \
((last) = __switch_to((prev), (next))); \
} while (0)
#endif /* __ASM_CSKY_SWITCH_TO_H */
Annotation
- Immediate include surface: `linux/thread_info.h`, `abi/fpu.h`.
- Detected declarations: `function __switch_to_fpu`, `function __switch_to_fpu`.
- 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.