From cd0c61ff695bd173178317022d25e05a298a5c21 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Tue, 11 Sep 2007 18:05:33 +0100 Subject: [PATCH] --- yaml --- r: 64855 b: refs/heads/master c: b868868ae0f7272228c95cc760338ffe35bb739d h: refs/heads/master i: 64853: c8d583737a52a24f6d35f7acc94f3a5bfacabc43 64851: b16bc8c27984046f69b967a1927d309e838bfd61 64847: b32dbde860ab25366fc14829af3e544a9feb8767 v: v3 --- [refs] | 2 +- trunk/arch/mips/mm/init.c | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 15b7d7a96261..425bb644dda1 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 01e9943c79ad4edb2c0b76c99029e34d704223ce +refs/heads/master: b868868ae0f7272228c95cc760338ffe35bb739d diff --git a/trunk/arch/mips/mm/init.c b/trunk/arch/mips/mm/init.c index 09d91505b90c..5240432e6d1d 100644 --- a/trunk/arch/mips/mm/init.c +++ b/trunk/arch/mips/mm/init.c @@ -8,6 +8,7 @@ * Kevin D. Kissell, kevink@mips.com and Carsten Langgaard, carstenl@mips.com * Copyright (C) 2000 MIPS Technologies, Inc. All rights reserved. */ +#include #include #include #include @@ -132,6 +133,8 @@ void *kmap_coherent(struct page *page, unsigned long addr) pte_t pte; int tlbidx; + BUG_ON(Page_dcache_dirty(page)); + inc_preempt_count(); idx = (addr >> PAGE_SHIFT) & (FIX_N_COLOURS - 1); #ifdef CONFIG_MIPS_MT_SMTC @@ -208,7 +211,7 @@ void copy_user_highpage(struct page *to, struct page *from, void *vfrom, *vto; vto = kmap_atomic(to, KM_USER1); - if (cpu_has_dc_aliases) { + if (cpu_has_dc_aliases && !Page_dcache_dirty(from)) { vfrom = kmap_coherent(from, vaddr); copy_page(vto, vfrom); kunmap_coherent();