Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sparc64/dev Add comment about an uncorrectable DMA ...



details:   https://anonhg.NetBSD.org/src/rev/cab3a4a4a06b
branches:  trunk
changeset: 749757:cab3a4a4a06b
user:      nakayama <nakayama%NetBSD.org@localhost>
date:      Mon Dec 07 11:24:30 2009 +0000

description:
Add comment about an uncorrectable DMA error sometimes observed on
tlp(4) on Netra X1, and its workaround.

Also add membar_storestore, from OpenBSD.

diffstat:

 sys/arch/sparc64/dev/iommu.c |  15 ++++++++++++---
 1 files changed, 12 insertions(+), 3 deletions(-)

diffs (37 lines):

diff -r 0ba636b1eb61 -r cab3a4a4a06b sys/arch/sparc64/dev/iommu.c
--- a/sys/arch/sparc64/dev/iommu.c      Mon Dec 07 11:18:38 2009 +0000
+++ b/sys/arch/sparc64/dev/iommu.c      Mon Dec 07 11:24:30 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: iommu.c,v 1.93 2009/12/07 11:18:38 nakayama Exp $      */
+/*     $NetBSD: iommu.c,v 1.94 2009/12/07 11:24:30 nakayama Exp $      */
 
 /*
  * Copyright (c) 1999, 2000 Matthew R. Green
@@ -59,7 +59,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: iommu.c,v 1.93 2009/12/07 11:18:38 nakayama Exp $");
+__KERNEL_RCSID(0, "$NetBSD: iommu.c,v 1.94 2009/12/07 11:24:30 nakayama Exp $");
 
 #include "opt_ddb.h"
 
@@ -349,8 +349,17 @@
                else
                        len -= PAGE_SIZE;
 
-               /* XXX Zero-ing the entry would not require RMW */
+               /*
+                * XXX Zero-ing the entry would not require RMW
+                *
+                * Disabling valid bit while a page is used by a device
+                * causes an uncorrectable DMA error.
+                * Workaround to avoid an uncorrectable DMA error is
+                * eliminating the next line, but the page is mapped
+                * until the next iommu_enter call.
+                */
                is->is_tsb[IOTSBSLOT(va,is->is_tsbsize)] &= ~IOTTE_V;
+               membar_storestore();
                bus_space_write_8(is->is_bustag, is->is_iommu,
                        IOMMUREG(iommu_flush), va);
                va += PAGE_SIZE;



Home | Main Index | Thread Index | Old Index