summaryrefslogtreecommitdiff
path: root/sys/arch/m88k
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2013-02-14 05:50:50 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2013-02-14 05:50:50 +0000
commit2178afceaf94bffa1d1dd8ae43339ce72e7a30f2 (patch)
treef2afeace0a05dfa12934d04563fb4570b25dd2e1 /sys/arch/m88k
parent7aa7079b8803602cb3f8e866d89b4cddae293c4e (diff)
Be sure to writeback D$ in addition to invalidate I$ in pmap_proc_iflush(),
or I$ may reload with stale data. It used to work without this because the kernel used to run in write-through mode. Repairs gdb single-stepping.
Diffstat (limited to 'sys/arch/m88k')
-rw-r--r--sys/arch/m88k/m88k/pmap.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/arch/m88k/m88k/pmap.c b/sys/arch/m88k/m88k/pmap.c
index f259b8e3a54..fcfb7cb8427 100644
--- a/sys/arch/m88k/m88k/pmap.c
+++ b/sys/arch/m88k/m88k/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.68 2011/10/25 18:38:06 miod Exp $ */
+/* $OpenBSD: pmap.c,v 1.69 2013/02/14 05:50:49 miod Exp $ */
/*
* Copyright (c) 2001-2004, 2010, Miodrag Vallat.
@@ -1644,6 +1644,8 @@ pmap_proc_iflush(struct proc *p, vaddr_t va, vsize_t len)
ci = curcpu();
#endif
/* CPU_INFO_FOREACH(cpu, ci) */ {
+ if (KERNEL_APR_CMODE == CACHE_DFL)
+ cmmu_dcache_wb(ci->ci_cpuid, pa, count);
cmmu_icache_inv(ci->ci_cpuid, pa, count);
}
}