Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/mips/mips Flush the dcache before syncing the icach...



details:   https://anonhg.NetBSD.org/src/rev/ec8b7b50174d
branches:  trunk
changeset: 347606:ec8b7b50174d
user:      skrll <skrll%NetBSD.org@localhost>
date:      Mon Sep 05 06:59:25 2016 +0000

description:
Flush the dcache before syncing the icache as previous mappings (UBC)
might have used the same colo(u)r and the dcache won't have been flush up
to now.

diffstat:

 sys/arch/mips/mips/pmap_machdep.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (27 lines):

diff -r eab239c1653b -r ec8b7b50174d sys/arch/mips/mips/pmap_machdep.c
--- a/sys/arch/mips/mips/pmap_machdep.c Mon Sep 05 06:30:40 2016 +0000
+++ b/sys/arch/mips/mips/pmap_machdep.c Mon Sep 05 06:59:25 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap_machdep.c,v 1.10 2016/09/04 15:25:11 skrll Exp $  */
+/*     $NetBSD: pmap_machdep.c,v 1.11 2016/09/05 06:59:25 skrll Exp $  */
 
 /*-
  * Copyright (c) 1998, 2001 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(0, "$NetBSD: pmap_machdep.c,v 1.10 2016/09/04 15:25:11 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap_machdep.c,v 1.11 2016/09/05 06:59:25 skrll Exp $");
 
 /*
  *     Manages physical address maps.
@@ -656,6 +656,8 @@
         */
        if (MIPS_HAS_R4K_MMU) {
                if (VM_PAGEMD_CACHED_P(mdpg)) {
+                       /* This was probably mapped cached by UBC so flush it */
+                       mips_dcache_wbinv_range_index(va, PAGE_SIZE);
                        mips_icache_sync_range_index(va, PAGE_SIZE);
                }
        } else {



Home | Main Index | Thread Index | Old Index