summaryrefslogtreecommitdiff
path: root/sys/arch/mvme88k
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2010-06-22 17:42:38 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2010-06-22 17:42:38 +0000
commit3bf6376a8235779418ca7ff352723e7ad8c68372 (patch)
tree6e9388d17714ae0fce6067549a0da75f676f4bb4 /sys/arch/mvme88k
parentddf67604dbd2ed909cab25e13655a9e385a789a6 (diff)
Since our caches are snooping, we only need to broadcast cache invalidates
on 88110 designs. Brings a ~8% speedup on GENERIC.MP on 197DP.
Diffstat (limited to 'sys/arch/mvme88k')
-rw-r--r--sys/arch/mvme88k/mvme88k/m197_machdep.c5
-rw-r--r--sys/arch/mvme88k/mvme88k/m88110.c25
2 files changed, 17 insertions, 13 deletions
diff --git a/sys/arch/mvme88k/mvme88k/m197_machdep.c b/sys/arch/mvme88k/mvme88k/m197_machdep.c
index 7c3b6e4afa3..518075852d2 100644
--- a/sys/arch/mvme88k/mvme88k/m197_machdep.c
+++ b/sys/arch/mvme88k/mvme88k/m197_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: m197_machdep.c,v 1.41 2009/08/30 12:11:35 miod Exp $ */
+/* $OpenBSD: m197_machdep.c,v 1.42 2010/06/22 17:42:37 miod Exp $ */
/*
* Copyright (c) 2009 Miodrag Vallat.
@@ -615,8 +615,7 @@ m197_ipi_handler(struct trapframe *eframe)
cmmu_flush_inst_cache(ci->ci_cpuid, arg1, arg2);
}
else if (ipi & CI_IPI_DMA_CACHECTL) {
- dma_cachectl_local(arg1, arg2 & ~DMA_CACHE_MASK,
- arg2 & DMA_CACHE_MASK);
+ dma_cachectl_local(arg1, arg2, DMA_CACHE_INV);
}
return 0;
diff --git a/sys/arch/mvme88k/mvme88k/m88110.c b/sys/arch/mvme88k/mvme88k/m88110.c
index acc86352093..c6a9d3b6c0a 100644
--- a/sys/arch/mvme88k/mvme88k/m88110.c
+++ b/sys/arch/mvme88k/mvme88k/m88110.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: m88110.c,v 1.64 2010/04/17 22:10:13 miod Exp $ */
+/* $OpenBSD: m88110.c,v 1.65 2010/06/22 17:42:37 miod Exp $ */
/*
* Copyright (c) 1998 Steve Murphree, Jr.
* All rights reserved.
@@ -647,6 +647,14 @@ m88110_cmmu_inval_cache(paddr_t pa, psize_t size)
* High level cache handling functions (used by bus_dma).
*/
+#ifdef MULTIPROCESSOR
+void
+m88110_dma_cachectl_local(paddr_t _pa, psize_t _size, int op)
+{
+ /* Obviously nothing to do. */
+}
+#endif
+
void
m88110_dma_cachectl(paddr_t _pa, psize_t _size, int op)
{
@@ -790,14 +798,11 @@ m88410_dma_cachectl(paddr_t _pa, psize_t _size, int op)
m88410_dma_cachectl_local(pa, size, op);
#ifdef MULTIPROCESSOR
- m197_broadcast_complex_ipi(CI_IPI_DMA_CACHECTL, pa, size | op);
+ /*
+ * Since snooping is enabled, all we need is to propagate invalidate
+ * requests if necessary.
+ */
+ if (op != DMA_CACHE_SYNC)
+ m197_broadcast_complex_ipi(CI_IPI_DMA_CACHECTL, pa, size);
#endif
}
-
-#ifdef MULTIPROCESSOR
-void
-m88110_dma_cachectl_local(paddr_t _pa, psize_t _size, int op)
-{
- /* Obviously nothing to do. */
-}
-#endif