2005-04-17 02:20:36 +04:00
|
|
|
/*
|
|
|
|
* arch/sh/mm/pg-nommu.c
|
|
|
|
*
|
|
|
|
* clear_page()/copy_page() implementation for MMUless SH.
|
|
|
|
*
|
|
|
|
* Copyright (C) 2003 Paul Mundt
|
|
|
|
*
|
|
|
|
* This file is subject to the terms and conditions of the GNU General Public
|
|
|
|
* License. See the file "COPYING" in the main directory of this archive
|
|
|
|
* for more details.
|
|
|
|
*/
|
|
|
|
#include <linux/init.h>
|
|
|
|
#include <linux/kernel.h>
|
|
|
|
#include <linux/string.h>
|
|
|
|
#include <asm/page.h>
|
|
|
|
|
2007-11-20 10:51:28 +03:00
|
|
|
void copy_page(void *to, void *from)
|
2005-04-17 02:20:36 +04:00
|
|
|
{
|
|
|
|
memcpy(to, from, PAGE_SIZE);
|
|
|
|
}
|
|
|
|
|
2007-11-20 10:51:28 +03:00
|
|
|
void clear_page(void *to)
|
2005-04-17 02:20:36 +04:00
|
|
|
{
|
|
|
|
memset(to, 0, PAGE_SIZE);
|
|
|
|
}
|
|
|
|
|
2006-09-27 12:21:02 +04:00
|
|
|
__kernel_size_t __copy_user(void *to, const void *from, __kernel_size_t n)
|
2005-04-17 02:20:36 +04:00
|
|
|
{
|
2006-09-27 12:21:02 +04:00
|
|
|
memcpy(to, from, n);
|
2005-04-17 02:20:36 +04:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2006-09-27 12:21:02 +04:00
|
|
|
__kernel_size_t __clear_user(void *to, __kernel_size_t n)
|
|
|
|
{
|
|
|
|
memset(to, 0, n);
|
|
|
|
return 0;
|
|
|
|
}
|