Module Name: src
Committed By: nonaka
Date: Thu Jan 22 03:43:24 UTC 2015
Modified Files:
src/sys/arch/evbsh3/evbsh3: bus_dma.c
Log Message:
Sync with sys/arch/landisk/landisk/bus_dma.c rev.1.15.
> 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.
To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/evbsh3/evbsh3/bus_dma.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/evbsh3/evbsh3/bus_dma.c
diff -u src/sys/arch/evbsh3/evbsh3/bus_dma.c:1.3 src/sys/arch/evbsh3/evbsh3/bus_dma.c:1.4
--- src/sys/arch/evbsh3/evbsh3/bus_dma.c:1.3 Tue Jul 19 15:44:52 2011
+++ src/sys/arch/evbsh3/evbsh3/bus_dma.c Thu Jan 22 03:43:24 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: bus_dma.c,v 1.3 2011/07/19 15:44:52 dyoung Exp $ */
+/* $NetBSD: bus_dma.c,v 1.4 2015/01/22 03:43:24 nonaka Exp $ */
/*
* Copyright (c) 2005 NONAKA Kimihiro <[email protected]>
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.3 2011/07/19 15:44:52 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.4 2015/01/22 03:43:24 nonaka Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -545,11 +545,6 @@ _bus_dmamap_sync(bus_dma_tag_t t, bus_dm
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;