arch/sh/mm/fault.c
Source file repositories/reference/linux-study-clean/arch/sh/mm/fault.c
File Facts
- System
- Linux kernel
- Corpus path
arch/sh/mm/fault.c- Extension
.c- Size
- 10938 bytes
- Lines
- 492
- Domain
- Architecture Layer
- Bucket
- arch/sh
- 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/kernel.hlinux/mm.hlinux/sched/signal.hlinux/hardirq.hlinux/kprobes.hlinux/perf_event.hlinux/kdebug.hlinux/uaccess.hasm/io_trapped.hasm/mmu_context.hasm/tlbflush.hasm/traps.h
Detected Declarations
function Copyrightfunction show_ptefunction vmalloc_faultfunction show_fault_oopsfunction no_contextfunction __bad_area_nosemaphorefunction bad_area_nosemaphorefunction __bad_areafunction bad_areafunction bad_area_access_errorfunction do_sigbusfunction mm_fault_errorfunction access_errorfunction fault_in_kernel_spacefunction do_page_fault
Annotated Snippet
fault = handle_mm_fault(vma, address, flags, regs);
if (unlikely(fault & (VM_FAULT_RETRY | VM_FAULT_ERROR)))
if (mm_fault_error(regs, error_code, address, fault))
return;
/* The fault is fully completed (including releasing mmap lock) */
if (fault & VM_FAULT_COMPLETED)
return;
if (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);
}
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/mm.h`, `linux/sched/signal.h`, `linux/hardirq.h`, `linux/kprobes.h`, `linux/perf_event.h`, `linux/kdebug.h`, `linux/uaccess.h`.
- Detected declarations: `function Copyright`, `function show_pte`, `function vmalloc_fault`, `function show_fault_oops`, `function no_context`, `function __bad_area_nosemaphore`, `function bad_area_nosemaphore`, `function __bad_area`, `function bad_area`, `function bad_area_access_error`.
- Atlas domain: Architecture Layer / arch/sh.
- 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.