2019-06-03 12:44:50 +07:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-only
|
2012-03-05 18:49:27 +07: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 16:38:31 +07:00
|
|
|
struct page *page = virt_to_page(kto);
|
2012-03-05 18:49:27 +07:00
|
|
|
copy_page(kto, kfrom);
|
2015-12-17 16:38:31 +07:00
|
|
|
flush_dcache_page(page);
|
2012-03-05 18:49:27 +07:00
|
|
|
}
|
2014-06-18 00:14:26 +07:00
|
|
|
EXPORT_SYMBOL_GPL(__cpu_copy_user_page);
|
2012-03-05 18:49:27 +07:00
|
|
|
|
|
|
|
void __cpu_clear_user_page(void *kaddr, unsigned long vaddr)
|
|
|
|
{
|
|
|
|
clear_page(kaddr);
|
|
|
|
}
|
2014-06-18 00:14:26 +07:00
|
|
|
EXPORT_SYMBOL_GPL(__cpu_clear_user_page);
|