blob: 8b4504413c5f6b6672843dca5cf75c6c7593363b [file] [log] [blame]
Thomas Gleixnerc456cfc2019-05-28 10:10:14 -07001// SPDX-License-Identifier: GPL-2.0-only
Linus Torvalds1da177e2005-04-16 15:20:36 -07002/*
Paul Mundtaae4d142009-08-15 09:57:57 +09003 * arch/sh/mm/nommu.c
Linus Torvalds1da177e2005-04-16 15:20:36 -07004 *
Paul Mundtaae4d142009-08-15 09:57:57 +09005 * Various helper routines and stubs for MMUless SH.
Linus Torvalds1da177e2005-04-16 15:20:36 -07006 *
Paul Mundtaae4d142009-08-15 09:57:57 +09007 * Copyright (C) 2002 - 2009 Paul Mundt
Linus Torvalds1da177e2005-04-16 15:20:36 -07008 */
9#include <linux/kernel.h>
Paul Mundtaae4d142009-08-15 09:57:57 +090010#include <linux/init.h>
11#include <linux/string.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070012#include <linux/mm.h>
Paul Mundtfa439722008-09-04 18:53:58 +090013#include <asm/tlbflush.h>
Paul Mundtaae4d142009-08-15 09:57:57 +090014#include <asm/page.h>
Linus Torvalds7c0f6ba2016-12-24 11:46:01 -080015#include <linux/uaccess.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070016
17/*
18 * Nothing too terribly exciting here ..
19 */
Paul Mundtaae4d142009-08-15 09:57:57 +090020void copy_page(void *to, void *from)
21{
22 memcpy(to, from, PAGE_SIZE);
23}
24
25__kernel_size_t __copy_user(void *to, const void *from, __kernel_size_t n)
26{
27 memcpy(to, from, n);
28 return 0;
29}
30
31__kernel_size_t __clear_user(void *to, __kernel_size_t n)
32{
33 memset(to, 0, n);
34 return 0;
35}
36
Paul Mundtea9af692006-12-25 19:28:54 +090037void local_flush_tlb_all(void)
Linus Torvalds1da177e2005-04-16 15:20:36 -070038{
39 BUG();
40}
41
Paul Mundtea9af692006-12-25 19:28:54 +090042void local_flush_tlb_mm(struct mm_struct *mm)
Linus Torvalds1da177e2005-04-16 15:20:36 -070043{
44 BUG();
45}
46
Paul Mundtea9af692006-12-25 19:28:54 +090047void local_flush_tlb_range(struct vm_area_struct *vma, unsigned long start,
Linus Torvalds1da177e2005-04-16 15:20:36 -070048 unsigned long end)
49{
50 BUG();
51}
52
Paul Mundtea9af692006-12-25 19:28:54 +090053void local_flush_tlb_page(struct vm_area_struct *vma, unsigned long page)
Linus Torvalds1da177e2005-04-16 15:20:36 -070054{
55 BUG();
56}
57
Paul Mundtea9af692006-12-25 19:28:54 +090058void local_flush_tlb_one(unsigned long asid, unsigned long page)
Linus Torvalds1da177e2005-04-16 15:20:36 -070059{
60 BUG();
61}
62
Paul Mundtea9af692006-12-25 19:28:54 +090063void local_flush_tlb_kernel_range(unsigned long start, unsigned long end)
Linus Torvalds1da177e2005-04-16 15:20:36 -070064{
65 BUG();
66}
67
Paul Mundta8dc49b2010-08-16 14:53:01 +090068void __flush_tlb_global(void)
69{
70}
71
Paul Mundt9cef7492009-07-29 00:12:17 +090072void __update_tlb(struct vm_area_struct *vma, unsigned long address, pte_t pte)
Linus Torvalds1da177e2005-04-16 15:20:36 -070073{
Paul Mundt9cef7492009-07-29 00:12:17 +090074}
75
Paul Mundt27397422009-08-15 09:19:19 +090076void __init kmap_coherent_init(void)
77{
78}
79
80void *kmap_coherent(struct page *page, unsigned long addr)
81{
82 BUG();
83 return NULL;
84}
85
Paul Mundt0906a3a2009-09-03 17:21:10 +090086void kunmap_coherent(void *kvaddr)
Paul Mundt27397422009-08-15 09:19:19 +090087{
88 BUG();
89}
90
Paul Mundt9acb98f2007-12-17 10:52:11 +090091void __init page_table_range_init(unsigned long start, unsigned long end,
92 pgd_t *pgd_base)
93{
94}
Paul Mundt52e8b112007-12-18 09:43:35 +090095
96void __set_fixmap(enum fixed_addresses idx, unsigned long phys, pgprot_t prot)
97{
98}