| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* | 
|  | 2 | * arch/sh/mm/pg-nommu.c | 
|  | 3 | * | 
|  | 4 | * clear_page()/copy_page() implementation for MMUless SH. | 
|  | 5 | * | 
|  | 6 | * Copyright (C) 2003  Paul Mundt | 
|  | 7 | * | 
|  | 8 | * This file is subject to the terms and conditions of the GNU General Public | 
|  | 9 | * License.  See the file "COPYING" in the main directory of this archive | 
|  | 10 | * for more details. | 
|  | 11 | */ | 
|  | 12 | #include <linux/init.h> | 
|  | 13 | #include <linux/kernel.h> | 
|  | 14 | #include <linux/string.h> | 
|  | 15 | #include <asm/page.h> | 
|  | 16 |  | 
| Paul Mundt | 379a95d | 2007-11-20 16:51:28 +0900 | [diff] [blame] | 17 | void copy_page(void *to, void *from) | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 18 | { | 
|  | 19 | memcpy(to, from, PAGE_SIZE); | 
|  | 20 | } | 
|  | 21 |  | 
| Paul Mundt | 379a95d | 2007-11-20 16:51:28 +0900 | [diff] [blame] | 22 | void clear_page(void *to) | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 23 | { | 
|  | 24 | memset(to, 0, PAGE_SIZE); | 
|  | 25 | } | 
|  | 26 |  | 
| Yoshinori Sato | e96636c | 2006-09-27 17:21:02 +0900 | [diff] [blame] | 27 | __kernel_size_t __copy_user(void *to, const void *from, __kernel_size_t n) | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 28 | { | 
| Yoshinori Sato | e96636c | 2006-09-27 17:21:02 +0900 | [diff] [blame] | 29 | memcpy(to, from, n); | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 30 | return 0; | 
|  | 31 | } | 
|  | 32 |  | 
| Yoshinori Sato | e96636c | 2006-09-27 17:21:02 +0900 | [diff] [blame] | 33 | __kernel_size_t __clear_user(void *to, __kernel_size_t n) | 
|  | 34 | { | 
|  | 35 | memset(to, 0, n); | 
|  | 36 | return 0; | 
|  | 37 | } |