summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2013-05-25 17:49:55 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2013-05-25 17:49:55 +0000
commitebf84d4ad6c5b84d96be6de9d78634d68f879133 (patch)
tree291c8460ec3d48688548b3b1de094c3aac03545f
parent9ec8e68a21275ba6a68cdfb5968c4ece4c9138d8 (diff)
Fix wbinv routine used by bus_dmamap_sync() to correctly operate on all cmmus,
instead of I$ cmmu only. This longstanding bug has been introduced in r1.44, which commit message was right mentioning that it `fixes some bugs, probably introduces new ones as well'.
-rw-r--r--sys/arch/m88k/m88k/m8820x_machdep.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/arch/m88k/m88k/m8820x_machdep.c b/sys/arch/m88k/m88k/m8820x_machdep.c
index 16bb2ee8cec..54e3aa22d5b 100644
--- a/sys/arch/m88k/m88k/m8820x_machdep.c
+++ b/sys/arch/m88k/m88k/m8820x_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: m8820x_machdep.c,v 1.54 2013/05/17 22:33:25 miod Exp $ */
+/* $OpenBSD: m8820x_machdep.c,v 1.55 2013/05/25 17:49:54 miod Exp $ */
/*
* Copyright (c) 2004, 2007, 2010, 2011, Miodrag Vallat.
*
@@ -742,11 +742,11 @@ m8820x_dcache_wb(cpuid_t cpu, paddr_t pa, psize_t size)
while (size != 0) {
if ((pa & PAGE_MASK) == 0 && size >= PAGE_SIZE) {
m8820x_cmmu_set_cmd(CMMU_FLUSH_CACHE_CB_PAGE,
- 0, cpu, 0, pa);
+ MODE_VAL, cpu, DATA_CMMU, pa);
count = PAGE_SIZE;
} else {
m8820x_cmmu_set_cmd(CMMU_FLUSH_CACHE_CB_LINE,
- 0, cpu, 0, pa);
+ MODE_VAL, cpu, DATA_CMMU, pa);
count = MC88200_CACHE_LINE;
}
pa += count;
@@ -817,10 +817,10 @@ m8820x_cmmu_wbinv_locked(int cpu, paddr_t pa, psize_t size)
{
if (size <= MC88200_CACHE_LINE) {
m8820x_cmmu_set_cmd(CMMU_FLUSH_CACHE_CBI_LINE,
- MODE_VAL, cpu, 0, pa);
+ 0, cpu, 0, pa);
} else {
m8820x_cmmu_set_cmd(CMMU_FLUSH_CACHE_CBI_PAGE,
- MODE_VAL, cpu, 0, pa);
+ 0, cpu, 0, pa);
}
m8820x_cmmu_wait(cpu);
}