Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/landisk/landisk Don't call sh_dcache_inv_range() on...



details:   https://anonhg.NetBSD.org/src/rev/802314a60d52
branches:  trunk
changeset: 778514:802314a60d52
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Sat Mar 31 06:35:11 2012 +0000

description:
Don't call sh_dcache_inv_range() on BUS_DMASYNC_POSTREAD ops
as other mips and arm ports.

All cached data is cared on BUS_DMASYNC_PREREAD and
invalidating cache without writeback could cause unexpected
data loss if specified sync region is not cacheline aligned.

This may fix "ffs_alloccg: map corrupted" panic on acardide IDE disks,
which didn't happen on USB HDD.

diffstat:

 sys/arch/landisk/landisk/bus_dma.c |  9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)

diffs (30 lines):

diff -r e2b7633e9d88 -r 802314a60d52 sys/arch/landisk/landisk/bus_dma.c
--- a/sys/arch/landisk/landisk/bus_dma.c        Sat Mar 31 02:45:37 2012 +0000
+++ b/sys/arch/landisk/landisk/bus_dma.c        Sat Mar 31 06:35:11 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bus_dma.c,v 1.14 2011/07/01 19:12:53 dyoung Exp $      */
+/*     $NetBSD: bus_dma.c,v 1.15 2012/03/31 06:35:11 tsutsui Exp $     */
 
 /*
  * Copyright (c) 2005 NONAKA Kimihiro
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.14 2011/07/01 19:12:53 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.15 2012/03/31 06:35:11 tsutsui Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -545,11 +545,6 @@
                        if (SH_HAS_WRITEBACK_CACHE)
                                sh_dcache_wb_range(naddr, minlen);
                        break;
-
-               case BUS_DMASYNC_POSTREAD:
-               case BUS_DMASYNC_POSTREAD|BUS_DMASYNC_POSTWRITE:
-                       sh_dcache_inv_range(naddr, minlen);
-                       break;
                }
                offset = 0;
                len -= minlen;



Home | Main Index | Thread Index | Old Index