|
@@ -388,6 +388,20 @@ void flush_kernel_dcache_page_addr(void *addr)
|
|
|
}
|
|
|
EXPORT_SYMBOL(flush_kernel_dcache_page_addr);
|
|
|
|
|
|
+void copy_user_page(void *vto, void *vfrom, unsigned long vaddr,
|
|
|
+ struct page *pg)
|
|
|
+{
|
|
|
+ /* Copy using kernel mapping. No coherency is needed (all in
|
|
|
+ kunmap) for the `to' page. However, the `from' page needs to
|
|
|
+ be flushed through a mapping equivalent to the user mapping
|
|
|
+ before it can be accessed through the kernel mapping. */
|
|
|
+ preempt_disable();
|
|
|
+ flush_dcache_page_asm(__pa(vfrom), vaddr);
|
|
|
+ preempt_enable();
|
|
|
+ copy_page_asm(vto, vfrom);
|
|
|
+}
|
|
|
+EXPORT_SYMBOL(copy_user_page);
|
|
|
+
|
|
|
void purge_tlb_entries(struct mm_struct *mm, unsigned long addr)
|
|
|
{
|
|
|
unsigned long flags;
|