aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mm/copypage-v4mc.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mm/copypage-v4mc.c')
-rw-r--r--arch/arm/mm/copypage-v4mc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/arm/mm/copypage-v4mc.c b/arch/arm/mm/copypage-v4mc.c
index 408b05ae6b9b..ded0e96d069d 100644
--- a/arch/arm/mm/copypage-v4mc.c
+++ b/arch/arm/mm/copypage-v4mc.c
@@ -19,6 +19,7 @@
19#include <asm/page.h> 19#include <asm/page.h>
20#include <asm/pgtable.h> 20#include <asm/pgtable.h>
21#include <asm/tlbflush.h> 21#include <asm/tlbflush.h>
22#include <asm/cacheflush.h>
22 23
23#include "mm.h" 24#include "mm.h"
24 25
@@ -69,6 +70,11 @@ mc_copy_user_page(void *from, void *to)
69 70
70void v4_mc_copy_user_page(void *kto, const void *kfrom, unsigned long vaddr) 71void v4_mc_copy_user_page(void *kto, const void *kfrom, unsigned long vaddr)
71{ 72{
73 struct page *page = virt_to_page(kfrom);
74
75 if (test_and_clear_bit(PG_dcache_dirty, &page->flags))
76 __flush_dcache_page(page_mapping(page), page);
77
72 spin_lock(&minicache_lock); 78 spin_lock(&minicache_lock);
73 79
74 set_pte_ext(TOP_PTE(0xffff8000), pfn_pte(__pa(kfrom) >> PAGE_SHIFT, minicache_pgprot), 0); 80 set_pte_ext(TOP_PTE(0xffff8000), pfn_pte(__pa(kfrom) >> PAGE_SHIFT, minicache_pgprot), 0);