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 iommu_flush becomes iommu_strbuf_flush ...



details:   https://anonhg.NetBSD.org/src/rev/029cdde24d2f
branches:  trunk
changeset: 488105:029cdde24d2f
user:      mrg <mrg%NetBSD.org@localhost>
date:      Sun Jun 18 07:17:40 2000 +0000

description:
iommu_flush becomes iommu_strbuf_flush cuz that's what it does.

diffstat:

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

diffs (113 lines):

diff -r 663aa26b6e87 -r 029cdde24d2f sys/arch/sparc64/dev/iommu.c
--- a/sys/arch/sparc64/dev/iommu.c      Sun Jun 18 07:13:41 2000 +0000
+++ b/sys/arch/sparc64/dev/iommu.c      Sun Jun 18 07:17:40 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: iommu.c,v 1.13 2000/06/18 07:05:09 mrg Exp $   */
+/*     $NetBSD: iommu.c,v 1.14 2000/06/18 07:17:40 mrg Exp $   */
 
 /*
  * Copyright (c) 1999, 2000 Matthew R. Green
@@ -140,6 +140,7 @@
 #define DPRINTF(l, s)
 #endif
 
+static int iommu_strbuf_flush __P((struct iommu_state *));
 
 /*
  * initialise the UltraSPARC IOMMU (SBUS or PCI):
@@ -216,13 +217,10 @@
        {
                /* Probe the iommu */
                struct iommureg *regs = is->is_iommu;
-               int64_t cr, tsb;
 
                printf("iommu regs at: cr=%lx tsb=%lx flush=%lx\n", &regs->iommu_cr,
                       &regs->iommu_tsb, &regs->iommu_flush);
-               cr = regs->iommu_cr;
-               tsb = regs->iommu_tsb;
-               printf("iommu cr=%qx tsb=%qx\n", cr, tsb);
+               printf("iommu cr=%qx tsb=%qx\n", regs->iommu_cr, regs->iommu_tsb);
                printf("TSB base %p phys %qx\n", (void *)is->is_tsb, (u_int64_t)is->is_ptsb);
                delay(1000000); /* 1 s */
        }
@@ -304,7 +302,7 @@
        if (is->is_sb) {
                bus_space_write_8(is->is_bustag, &is->is_sb->strbuf_pgflush, 0,
                    va);
-               iommu_flush(is);
+               iommu_strbuf_flush(is);
        }
        DPRINTF(IDB_DVMA, ("Clearing TSB slot %d for va %p\n", 
                       (int)IOTSBSLOT(va,is->is_tsbsize), va));
@@ -357,7 +355,7 @@
                        bus_space_write_8(is->is_bustag,
                            &is->is_sb->strbuf_pgflush, 0, va);
                        if (len <= NBPG)
-                               iommu_flush(is);
+                               iommu_strbuf_flush(is);
                        DPRINTF(IDB_DVMA, ("iommu_remove: flushed va %p TSB[%lx]@%p=%lx, %lu bytes left\n",            
                               (long)va, (long)IOTSBSLOT(va,is->is_tsbsize), 
                               (long)&is->is_tsb[IOTSBSLOT(va,is->is_tsbsize)],
@@ -377,8 +375,8 @@
        }
 }
 
-int 
-iommu_flush(is)
+static int 
+iommu_strbuf_flush(is)
        struct iommu_state *is;
 {
        struct timeval cur, flushtimeout;
@@ -419,7 +417,7 @@
        cur = flushtimeout;
        BUMPTIME(&flushtimeout, 500000); /* 1/2 sec */
        
-       DPRINTF(IDB_DVMA, ("iommu_flush: flush = %lx at va = %lx pa = %lx now=%lx:%lx until = %lx:%lx\n", 
+       DPRINTF(IDB_DVMA, ("iommu_strbuf_flush: flush = %lx at va = %lx pa = %lx now=%lx:%lx until = %lx:%lx\n", 
                       (long)is->is_flush, (long)&is->is_flush, 
                       (long)is->is_flushpa, cur.tv_sec, cur.tv_usec, 
                       flushtimeout.tv_sec, flushtimeout.tv_usec));
@@ -431,14 +429,14 @@
 
 #ifdef DIAGNOSTIC
        if (!is->is_flush) {
-               printf("iommu_flush: flush timeout %p at %p\n", (long)is->is_flush, 
+               printf("iommu_strbuf_flush: flush timeout %p at %p\n", (long)is->is_flush, 
                       (long)is->is_flushpa); /* panic? */
 #ifdef DDB
                Debugger();
 #endif
        }
 #endif
-       DPRINTF(IDB_DVMA, ("iommu_flush: flushed\n"));
+       DPRINTF(IDB_DVMA, ("iommu_strbuf_flush: flushed\n"));
        return (is->is_flush);
 }
 
@@ -722,7 +720,7 @@
                                bus_space_write_8(is->is_bustag,
                                    &is->is_sb->strbuf_pgflush, 0, va);
                                if (len <= NBPG) {
-                                       iommu_flush(is);
+                                       iommu_strbuf_flush(is);
                                        len = 0;
                                } else
                                        len -= NBPG;
diff -r 663aa26b6e87 -r 029cdde24d2f sys/arch/sparc64/dev/iommuvar.h
--- a/sys/arch/sparc64/dev/iommuvar.h   Sun Jun 18 07:13:41 2000 +0000
+++ b/sys/arch/sparc64/dev/iommuvar.h   Sun Jun 18 07:17:40 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: iommuvar.h,v 1.4 2000/05/17 02:31:13 eeh Exp $ */
+/*     $NetBSD: iommuvar.h,v 1.5 2000/06/18 07:17:40 mrg Exp $ */
 
 /*
  * Copyright (c) 1999 Matthew R. Green
@@ -57,7 +57,6 @@
 void   iommu_reset __P((struct iommu_state *));
 void    iommu_enter __P((struct iommu_state *, vaddr_t, int64_t, int));
 void    iommu_remove __P((struct iommu_state *, vaddr_t, size_t));
-int    iommu_flush __P((struct iommu_state *));
 
 int    iommu_dvmamap_load __P((bus_dma_tag_t, struct iommu_state *,
            bus_dmamap_t, void *, bus_size_t, struct proc *, int));



Home | Main Index | Thread Index | Old Index