arch/csky/mm/fault.c
Source file repositories/reference/linux-study-clean/arch/csky/mm/fault.c
File Facts
- System
- Linux kernel
- Corpus path
arch/csky/mm/fault.c- Extension
.c- Size
- 6768 bytes
- Lines
- 299
- 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.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/extable.hlinux/kprobes.hlinux/mmu_context.hlinux/perf_event.h
Detected Declarations
function fixup_exceptionfunction is_writefunction csky_cmpxchg_fixupfunction csky_cmpxchg_fixupfunction no_contextfunction mm_fault_errorfunction bad_area_nosemaphorefunction vmalloc_faultfunction access_errorfunction do_page_fault
Annotated Snippet
fault = handle_mm_fault(vma, addr, flags, regs);
/*
* If we need to retry but a fatal signal is pending, handle the
* signal first. We do not need to release the mmap_lock because it
* would already be released in __lock_page_or_retry in mm/filemap.c.
*/
if (fault_signal_pending(fault, regs)) {
if (!user_mode(regs))
no_context(regs, addr);
return;
}
/* The fault is fully completed (including releasing mmap lock) */
if (fault & VM_FAULT_COMPLETED)
return;
if (unlikely(fault & VM_FAULT_RETRY)) {
flags |= FAULT_FLAG_TRIED;
/*
* No need to mmap_read_unlock(mm) as we would
* have already released it in __lock_page_or_retry
* in mm/filemap.c.
*/
goto retry;
}
mmap_read_unlock(mm);
if (unlikely(fault & VM_FAULT_ERROR)) {
mm_fault_error(regs, addr, fault);
return;
}
return;
}
Annotation
- Immediate include surface: `linux/extable.h`, `linux/kprobes.h`, `linux/mmu_context.h`, `linux/perf_event.h`.
- Detected declarations: `function fixup_exception`, `function is_write`, `function csky_cmpxchg_fixup`, `function csky_cmpxchg_fixup`, `function no_context`, `function mm_fault_error`, `function bad_area_nosemaphore`, `function vmalloc_fault`, `function access_error`, `function do_page_fault`.
- 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.