arch/csky/include/asm/mmu_context.h
Source file repositories/reference/linux-study-clean/arch/csky/include/asm/mmu_context.h
File Facts
- System
- Linux kernel
- Corpus path
arch/csky/include/asm/mmu_context.h- Extension
.h- Size
- 959 bytes
- Lines
- 40
- 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
asm-generic/mm_hooks.hasm/setup.hasm/page.hasm/cacheflush.hasm/tlbflush.hlinux/errno.hlinux/sched.habi/ckmmu.hasm-generic/mmu_context.h
Detected Declarations
function switch_mm
Annotated Snippet
#ifndef __ASM_CSKY_MMU_CONTEXT_H
#define __ASM_CSKY_MMU_CONTEXT_H
#include <asm-generic/mm_hooks.h>
#include <asm/setup.h>
#include <asm/page.h>
#include <asm/cacheflush.h>
#include <asm/tlbflush.h>
#include <linux/errno.h>
#include <linux/sched.h>
#include <abi/ckmmu.h>
#define ASID_MASK ((1 << CONFIG_CPU_ASID_BITS) - 1)
#define cpu_asid(mm) (atomic64_read(&mm->context.asid) & ASID_MASK)
#define init_new_context(tsk,mm) ({ atomic64_set(&(mm)->context.asid, 0); 0; })
void check_and_switch_context(struct mm_struct *mm, unsigned int cpu);
static inline void
switch_mm(struct mm_struct *prev, struct mm_struct *next,
struct task_struct *tsk)
{
unsigned int cpu = smp_processor_id();
if (prev != next)
check_and_switch_context(next, cpu);
setup_pgd(next->pgd, next->context.asid.counter);
flush_icache_deferred(next);
}
#include <asm-generic/mmu_context.h>
#endif /* __ASM_CSKY_MMU_CONTEXT_H */
Annotation
- Immediate include surface: `asm-generic/mm_hooks.h`, `asm/setup.h`, `asm/page.h`, `asm/cacheflush.h`, `asm/tlbflush.h`, `linux/errno.h`, `linux/sched.h`, `abi/ckmmu.h`.
- Detected declarations: `function switch_mm`.
- 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.