1 // SPDX-License-Identifier: GPL-2.0-only
5 * Various helper routines and stubs for MMUless SH.
7 * Copyright (C) 2002 - 2009 Paul Mundt
9 #include <linux/kernel.h>
10 #include <linux/init.h>
11 #include <linux/string.h>
13 #include <asm/pgtable.h>
14 #include <asm/tlbflush.h>
16 #include <linux/uaccess.h>
19 * Nothing too terribly exciting here ..
21 void copy_page(void *to, void *from)
23 memcpy(to, from, PAGE_SIZE);
26 __kernel_size_t __copy_user(void *to, const void *from, __kernel_size_t n)
32 __kernel_size_t __clear_user(void *to, __kernel_size_t n)
38 void local_flush_tlb_all(void)
43 void local_flush_tlb_mm(struct mm_struct *mm)
48 void local_flush_tlb_range(struct vm_area_struct *vma, unsigned long start,
54 void local_flush_tlb_page(struct vm_area_struct *vma, unsigned long page)
59 void local_flush_tlb_one(unsigned long asid, unsigned long page)
64 void local_flush_tlb_kernel_range(unsigned long start, unsigned long end)
69 void __flush_tlb_global(void)
73 void __update_tlb(struct vm_area_struct *vma, unsigned long address, pte_t pte)
77 void __init kmap_coherent_init(void)
81 void *kmap_coherent(struct page *page, unsigned long addr)
87 void kunmap_coherent(void *kvaddr)
92 void __init page_table_range_init(unsigned long start, unsigned long end,
97 void __set_fixmap(enum fixed_addresses idx, unsigned long phys, pgprot_t prot)
101 void pgtable_cache_init(void)