arch/sh/mm/nommu.c
Source file repositories/reference/linux-study-clean/arch/sh/mm/nommu.c
File Facts
- System
- Linux kernel
- Corpus path
arch/sh/mm/nommu.c- Extension
.c- Size
- 1672 bytes
- Lines
- 101
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/kernel.hlinux/init.hlinux/string.hlinux/mm.hasm/cacheflush.hasm/tlbflush.hasm/page.hlinux/uaccess.h
Detected Declarations
function Copyrightfunction __copy_userfunction __clear_userfunction local_flush_tlb_allfunction local_flush_tlb_mmfunction local_flush_tlb_rangefunction local_flush_tlb_pagefunction local_flush_tlb_onefunction local_flush_tlb_kernel_rangefunction __flush_tlb_globalfunction kunmap_coherentfunction page_table_range_init
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0-only
/*
* arch/sh/mm/nommu.c
*
* Various helper routines and stubs for MMUless SH.
*
* Copyright (C) 2002 - 2009 Paul Mundt
*/
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/string.h>
#include <linux/mm.h>
#include <asm/cacheflush.h>
#include <asm/tlbflush.h>
#include <asm/page.h>
#include <linux/uaccess.h>
/*
* Nothing too terribly exciting here ..
*/
void copy_page(void *to, void *from)
{
memcpy(to, from, PAGE_SIZE);
}
__kernel_size_t __copy_user(void *to, const void *from, __kernel_size_t n)
{
memcpy(to, from, n);
return 0;
}
__kernel_size_t __clear_user(void __user *to, __kernel_size_t n)
{
memset((__force void *)to, 0, n);
return 0;
}
void local_flush_tlb_all(void)
{
BUG();
}
void local_flush_tlb_mm(struct mm_struct *mm)
{
BUG();
}
void local_flush_tlb_range(struct vm_area_struct *vma, unsigned long start,
unsigned long end)
{
BUG();
}
void local_flush_tlb_page(struct vm_area_struct *vma, unsigned long page)
{
BUG();
}
void local_flush_tlb_one(unsigned long asid, unsigned long page)
{
BUG();
}
void local_flush_tlb_kernel_range(unsigned long start, unsigned long end)
{
BUG();
}
void __flush_tlb_global(void)
{
}
void __update_tlb(struct vm_area_struct *vma, unsigned long address, pte_t pte)
{
}
void __init kmap_coherent_init(void)
{
}
void *kmap_coherent(struct page *page, unsigned long addr)
{
BUG();
return NULL;
}
void kunmap_coherent(void *kvaddr)
{
BUG();
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/init.h`, `linux/string.h`, `linux/mm.h`, `asm/cacheflush.h`, `asm/tlbflush.h`, `asm/page.h`, `linux/uaccess.h`.
- Detected declarations: `function Copyright`, `function __copy_user`, `function __clear_user`, `function local_flush_tlb_all`, `function local_flush_tlb_mm`, `function local_flush_tlb_range`, `function local_flush_tlb_page`, `function local_flush_tlb_one`, `function local_flush_tlb_kernel_range`, `function __flush_tlb_global`.
- 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.