2019-06-03 13:44:50 +08:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-only
|
2012-03-05 19:49:27 +08:00
|
|
|
/*
|
|
|
|
* Based on arch/arm/mm/copypage.c
|
|
|
|
*
|
|
|
|
* Copyright (C) 2002 Deep Blue Solutions Ltd, All Rights Reserved.
|
|
|
|
* Copyright (C) 2012 ARM Ltd.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <linux/mm.h>
|
|
|
|
|
|
|
|
#include <asm/page.h>
|
|
|
|
#include <asm/cacheflush.h>
|
|
|
|
|
|
|
|
void __cpu_copy_user_page(void *kto, const void *kfrom, unsigned long vaddr)
|
|
|
|
{
|
2015-12-17 17:38:31 +08:00
|
|
|
struct page *page = virt_to_page(kto);
|
2012-03-05 19:49:27 +08:00
|
|
|
copy_page(kto, kfrom);
|
2015-12-17 17:38:31 +08:00
|
|
|
flush_dcache_page(page);
|
2012-03-05 19:49:27 +08:00
|
|
|
}
|
2014-06-18 01:14:26 +08:00
|
|
|
EXPORT_SYMBOL_GPL(__cpu_copy_user_page);
|
2012-03-05 19:49:27 +08:00
|
|
|
|
|
|
|
void __cpu_clear_user_page(void *kaddr, unsigned long vaddr)
|
|
|
|
{
|
|
|
|
clear_page(kaddr);
|
|
|
|
}
|
2014-06-18 01:14:26 +08:00
|
|
|
EXPORT_SYMBOL_GPL(__cpu_clear_user_page);
|