Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/mac68k/obio For avdma, bus_dmamap_create(9) with ns...



details:   https://anonhg.NetBSD.org/src/rev/f1edd672fedc
branches:  trunk
changeset: 368980:f1edd672fedc
user:      rin <rin%NetBSD.org@localhost>
date:      Mon Aug 15 11:22:45 2022 +0000

description:
For avdma, bus_dmamap_create(9) with nsegments = 1, as PSC supports
only one physically contiguous segment in a single DMA transaction.

Slightly improves performance.

diffstat:

 sys/arch/mac68k/obio/esp.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (31 lines):

diff -r 2e4a768a08cc -r f1edd672fedc sys/arch/mac68k/obio/esp.c
--- a/sys/arch/mac68k/obio/esp.c        Mon Aug 15 11:18:12 2022 +0000
+++ b/sys/arch/mac68k/obio/esp.c        Mon Aug 15 11:22:45 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: esp.c,v 1.61 2022/08/15 11:18:12 rin Exp $     */
+/*     $NetBSD: esp.c,v 1.62 2022/08/15 11:22:45 rin Exp $     */
 
 /*
  * Copyright (c) 1997 Jason R. Thorpe.
@@ -81,7 +81,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: esp.c,v 1.61 2022/08/15 11:18:12 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: esp.c,v 1.62 2022/08/15 11:22:45 rin Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -357,9 +357,9 @@
                esc->sc_pio = 0;
                esc->sc_dmat = oa->oa_dmat;
 
-               if (bus_dmamap_create(esc->sc_dmat, sc->sc_maxxfer,
-                   sc->sc_maxxfer / NBPG + 1, sc->sc_maxxfer, 0,
-                   BUS_DMA_WAITOK | BUS_DMA_ALLOCNOW, &esc->sc_dmap)) {
+               if (bus_dmamap_create(esc->sc_dmat, sc->sc_maxxfer, 1,
+                   sc->sc_maxxfer, 0, BUS_DMA_WAITOK | BUS_DMA_ALLOCNOW,
+                   &esc->sc_dmap)) {
                        printf("failed to create DMA map.\n");
                        return;
                }



Home | Main Index | Thread Index | Old Index