Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/mvme68k/mvme68k Slight tweak: Avoid needlessly purg...



details:   https://anonhg.NetBSD.org/src/rev/281bfbddc0ed
branches:  trunk
changeset: 513761:281bfbddc0ed
user:      scw <scw%NetBSD.org@localhost>
date:      Sun Aug 12 18:13:45 2001 +0000

description:
Slight tweak: Avoid needlessly purging cachelines which we've just flushed.

diffstat:

 sys/arch/mvme68k/mvme68k/bus_dma.c |  20 ++++++++++++--------
 1 files changed, 12 insertions(+), 8 deletions(-)

diffs (42 lines):

diff -r 8005688d8ae5 -r 281bfbddc0ed sys/arch/mvme68k/mvme68k/bus_dma.c
--- a/sys/arch/mvme68k/mvme68k/bus_dma.c        Sun Aug 12 11:52:43 2001 +0000
+++ b/sys/arch/mvme68k/mvme68k/bus_dma.c        Sun Aug 12 18:13:45 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bus_dma.c,v 1.17 2001/07/18 17:21:49 scw Exp $     */
+/* $NetBSD: bus_dma.c,v 1.18 2001/08/12 18:13:45 scw Exp $     */
 
 /*
  * This file was taken from from next68k/dev/bus_dma.c, which was originally
@@ -46,7 +46,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.17 2001/07/18 17:21:49 scw Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.18 2001/08/12 18:13:45 scw Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -540,13 +540,17 @@
                 * cachelines at the start and end of the required region.
                 */
                if (ops & BUS_DMASYNC_PREREAD) {
-                       if (ps & 0xf)
-                               DCFL_40(ps);
-                       if (pe & 0xf)
-                               DCFL_40(pe);
+                       if (ps & 0xf) {
+                               DCFL_40(ps & ~0xf);
+                               ICPL_40(ps & ~0xf);
+                       }
+                       if (pe & 0xf) {
+                               DCFL_40(pe & ~0xf);
+                               ICPL_40(pe & ~0xf);
+                       }
 
-                       p = ps & ~0xf;
-                       e = (pe + 15) & ~0xf;
+                       p = (ps + 15) & ~0xf;
+                       e = pe & ~0xf;
 
                        /* purge cache line */
                        while((p < e) && (p % NBPG)) {



Home | Main Index | Thread Index | Old Index