blob: ac16c05917eff3c09b1788203fa1fb687001146f [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
Paul Mundtaae4d142009-08-15 09:57:57 +09002 * arch/sh/mm/nommu.c
Linus Torvalds1da177e2005-04-16 15:20:36 -07003 *
Paul Mundtaae4d142009-08-15 09:57:57 +09004 * Various helper routines and stubs for MMUless SH.
Linus Torvalds1da177e2005-04-16 15:20:36 -07005 *
Paul Mundtaae4d142009-08-15 09:57:57 +09006 * Copyright (C) 2002 - 2009 Paul Mundt
Linus Torvalds1da177e2005-04-16 15:20:36 -07007 *
8 * Released under the terms of the GNU GPL v2.0.
9 */
10#include <linux/kernel.h>
Paul Mundtaae4d142009-08-15 09:57:57 +090011#include <linux/init.h>
12#include <linux/string.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070013#include <linux/mm.h>
Paul Mundt9acb98f2007-12-17 10:52:11 +090014#include <asm/pgtable.h>
Paul Mundtfa439722008-09-04 18:53:58 +090015#include <asm/tlbflush.h>
Paul Mundtaae4d142009-08-15 09:57:57 +090016#include <asm/page.h>
17#include <asm/uaccess.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070018
19/*
20 * Nothing too terribly exciting here ..
21 */
Paul Mundtaae4d142009-08-15 09:57:57 +090022void copy_page(void *to, void *from)
23{
24 memcpy(to, from, PAGE_SIZE);
25}
26
27__kernel_size_t __copy_user(void *to, const void *from, __kernel_size_t n)
28{
29 memcpy(to, from, n);
30 return 0;
31}
32
33__kernel_size_t __clear_user(void *to, __kernel_size_t n)
34{
35 memset(to, 0, n);
36 return 0;
37}
38
Paul Mundtea9af692006-12-25 19:28:54 +090039void local_flush_tlb_all(void)
Linus Torvalds1da177e2005-04-16 15:20:36 -070040{
41 BUG();
42}
43
Paul Mundtea9af692006-12-25 19:28:54 +090044void local_flush_tlb_mm(struct mm_struct *mm)
Linus Torvalds1da177e2005-04-16 15:20:36 -070045{
46 BUG();
47}
48
Paul Mundtea9af692006-12-25 19:28:54 +090049void local_flush_tlb_range(struct vm_area_struct *vma, unsigned long start,
Linus Torvalds1da177e2005-04-16 15:20:36 -070050 unsigned long end)
51{
52 BUG();
53}
54
Paul Mundtea9af692006-12-25 19:28:54 +090055void local_flush_tlb_page(struct vm_area_struct *vma, unsigned long page)
Linus Torvalds1da177e2005-04-16 15:20:36 -070056{
57 BUG();
58}
59
Paul Mundtea9af692006-12-25 19:28:54 +090060void local_flush_tlb_one(unsigned long asid, unsigned long page)
Linus Torvalds1da177e2005-04-16 15:20:36 -070061{
62 BUG();
63}
64
Paul Mundtea9af692006-12-25 19:28:54 +090065void local_flush_tlb_kernel_range(unsigned long start, unsigned long end)
Linus Torvalds1da177e2005-04-16 15:20:36 -070066{
67 BUG();
68}
69
Paul Mundt9cef7492009-07-29 00:12:17 +090070void __update_tlb(struct vm_area_struct *vma, unsigned long address, pte_t pte)
Linus Torvalds1da177e2005-04-16 15:20:36 -070071{
Paul Mundt9cef7492009-07-29 00:12:17 +090072}
73
Paul Mundt27397422009-08-15 09:19:19 +090074void __init kmap_coherent_init(void)
75{
76}
77
78void *kmap_coherent(struct page *page, unsigned long addr)
79{
80 BUG();
81 return NULL;
82}
83
Paul Mundt0906a3a2009-09-03 17:21:10 +090084void kunmap_coherent(void *kvaddr)
Paul Mundt27397422009-08-15 09:19:19 +090085{
86 BUG();
87}
88
Paul Mundt9acb98f2007-12-17 10:52:11 +090089void __init page_table_range_init(unsigned long start, unsigned long end,
90 pgd_t *pgd_base)
91{
92}
Paul Mundt52e8b112007-12-18 09:43:35 +090093
94void __set_fixmap(enum fixed_addresses idx, unsigned long phys, pgprot_t prot)
95{
96}