2005-04-17 06:20:36 +08: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>
|
|
|
|
|
2006-09-27 16:21:02 +08:00
|
|
|
void copy_page_nommu(void *to, void *from)
|
2005-04-17 06:20:36 +08:00
|
|
|
{
|
|
|
|
memcpy(to, from, PAGE_SIZE);
|
|
|
|
}
|
|
|
|
|
2006-09-27 16:21:02 +08:00
|
|
|
void clear_page_nommu(void *to)
|
2005-04-17 06:20:36 +08:00
|
|
|
{
|
|
|
|
memset(to, 0, PAGE_SIZE);
|
|
|
|
}
|
|
|
|
|
2006-09-27 16:21:02 +08:00
|
|
|
__kernel_size_t __copy_user(void *to, const void *from, __kernel_size_t n)
|
2005-04-17 06:20:36 +08:00
|
|
|
{
|
2006-09-27 16:21:02 +08:00
|
|
|
memcpy(to, from, n);
|
2005-04-17 06:20:36 +08:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2006-09-27 16:21:02 +08:00
|
|
|
__kernel_size_t __clear_user(void *to, __kernel_size_t n)
|
|
|
|
{
|
|
|
|
memset(to, 0, n);
|
|
|
|
return 0;
|
|
|
|
}
|