Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Jun 2014 18:10:07 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r267589 - in head/sys: arm/at91 dev/ahci dev/ata dev/de dev/mvs dev/nfe dev/nxge dev/vxge
Message-ID:  <201406171810.s5HIA7Op015345@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhb
Date: Tue Jun 17 18:10:06 2014
New Revision: 267589
URL: http://svnweb.freebsd.org/changeset/base/267589

Log:
  Don't bother clearing maps for static DMA allocations to NULL.  Instead,
  leave them as purely opaque values that are only set by bus_dmamem_alloc().

Modified:
  head/sys/arm/at91/if_ate.c
  head/sys/dev/ahci/ahci.c
  head/sys/dev/ata/ata-dma.c
  head/sys/dev/de/if_de.c
  head/sys/dev/mvs/mvs.c
  head/sys/dev/nfe/if_nfe.c
  head/sys/dev/nxge/xge-osdep.h
  head/sys/dev/vxge/vxge-osdep.h

Modified: head/sys/arm/at91/if_ate.c
==============================================================================
--- head/sys/arm/at91/if_ate.c	Tue Jun 17 18:03:59 2014	(r267588)
+++ head/sys/arm/at91/if_ate.c	Tue Jun 17 18:10:06 2014	(r267589)
@@ -671,7 +671,6 @@ ate_deactivate(struct ate_softc *sc)
 			bus_dmamem_free(sc->rx_tag, sc->rx_buf[i],
 			    sc->rx_map[i]);
 			sc->rx_buf[i] = NULL;
-			sc->rx_map[i] = NULL;
 		}
 		bus_dma_tag_destroy(sc->rx_tag);
 	}

Modified: head/sys/dev/ahci/ahci.c
==============================================================================
--- head/sys/dev/ahci/ahci.c	Tue Jun 17 18:03:59 2014	(r267588)
+++ head/sys/dev/ahci/ahci.c	Tue Jun 17 18:10:06 2014	(r267589)
@@ -1394,14 +1394,12 @@ ahci_dmafini(device_t dev)
 		bus_dmamap_unload(ch->dma.rfis_tag, ch->dma.rfis_map);
 		bus_dmamem_free(ch->dma.rfis_tag, ch->dma.rfis, ch->dma.rfis_map);
 		ch->dma.rfis_bus = 0;
-		ch->dma.rfis_map = NULL;
 		ch->dma.rfis = NULL;
 	}
 	if (ch->dma.work_bus) {
 		bus_dmamap_unload(ch->dma.work_tag, ch->dma.work_map);
 		bus_dmamem_free(ch->dma.work_tag, ch->dma.work, ch->dma.work_map);
 		ch->dma.work_bus = 0;
-		ch->dma.work_map = NULL;
 		ch->dma.work = NULL;
 	}
 	if (ch->dma.work_tag) {

Modified: head/sys/dev/ata/ata-dma.c
==============================================================================
--- head/sys/dev/ata/ata-dma.c	Tue Jun 17 18:03:59 2014	(r267588)
+++ head/sys/dev/ata/ata-dma.c	Tue Jun 17 18:10:06 2014	(r267589)
@@ -132,7 +132,6 @@ ata_dmafini(device_t dev)
 	bus_dmamap_unload(ch->dma.work_tag, ch->dma.work_map);
 	bus_dmamem_free(ch->dma.work_tag, ch->dma.work, ch->dma.work_map);
 	ch->dma.work_bus = 0;
-	ch->dma.work_map = NULL;
 	ch->dma.work = NULL;
     }
     if (ch->dma.work_tag) {

Modified: head/sys/dev/de/if_de.c
==============================================================================
--- head/sys/dev/de/if_de.c	Tue Jun 17 18:03:59 2014	(r267588)
+++ head/sys/dev/de/if_de.c	Tue Jun 17 18:10:06 2014	(r267589)
@@ -4473,7 +4473,6 @@ tulip_busdma_freering(tulip_ringinfo_t *
     }
     if (ri->ri_descs != NULL) {
 	bus_dmamem_free(ri->ri_ring_tag, ri->ri_descs, ri->ri_ring_map);
-	ri->ri_ring_map = NULL;
 	ri->ri_descs = NULL;
     }
     if (ri->ri_ring_tag != NULL) {
@@ -4558,7 +4557,6 @@ tulip_busdma_cleanup(tulip_softc_t * con
     if (sc->tulip_setupbuf != NULL) {
 	bus_dmamem_free(sc->tulip_setup_tag, sc->tulip_setupbuf,
 	    sc->tulip_setup_map);
-	sc->tulip_setup_map = NULL;
 	sc->tulip_setupbuf = NULL;
     }
     if (sc->tulip_setup_tag != NULL) {

Modified: head/sys/dev/mvs/mvs.c
==============================================================================
--- head/sys/dev/mvs/mvs.c	Tue Jun 17 18:03:59 2014	(r267588)
+++ head/sys/dev/mvs/mvs.c	Tue Jun 17 18:10:06 2014	(r267589)
@@ -402,7 +402,6 @@ mvs_dmafini(device_t dev)
 		bus_dmamem_free(ch->dma.workrp_tag,
 		    ch->dma.workrp, ch->dma.workrp_map);
 		ch->dma.workrp_bus = 0;
-		ch->dma.workrp_map = NULL;
 		ch->dma.workrp = NULL;
 	}
 	if (ch->dma.workrp_tag) {
@@ -414,7 +413,6 @@ mvs_dmafini(device_t dev)
 		bus_dmamem_free(ch->dma.workrq_tag,
 		    ch->dma.workrq, ch->dma.workrq_map);
 		ch->dma.workrq_bus = 0;
-		ch->dma.workrq_map = NULL;
 		ch->dma.workrq = NULL;
 	}
 	if (ch->dma.workrq_tag) {

Modified: head/sys/dev/nfe/if_nfe.c
==============================================================================
--- head/sys/dev/nfe/if_nfe.c	Tue Jun 17 18:03:59 2014	(r267588)
+++ head/sys/dev/nfe/if_nfe.c	Tue Jun 17 18:10:06 2014	(r267589)
@@ -1410,7 +1410,6 @@ nfe_free_rx_ring(struct nfe_softc *sc, s
 		bus_dmamem_free(ring->rx_desc_tag, desc, ring->rx_desc_map);
 		ring->desc64 = NULL;
 		ring->desc32 = NULL;
-		ring->rx_desc_map = NULL;
 	}
 	if (ring->rx_desc_tag != NULL) {
 		bus_dma_tag_destroy(ring->rx_desc_tag);
@@ -1464,7 +1463,6 @@ nfe_free_jrx_ring(struct nfe_softc *sc, 
 		bus_dmamem_free(ring->jrx_desc_tag, desc, ring->jrx_desc_map);
 		ring->jdesc64 = NULL;
 		ring->jdesc32 = NULL;
-		ring->jrx_desc_map = NULL;
 	}
 
 	if (ring->jrx_desc_tag != NULL) {
@@ -1626,7 +1624,6 @@ nfe_free_tx_ring(struct nfe_softc *sc, s
 		bus_dmamem_free(ring->tx_desc_tag, desc, ring->tx_desc_map);
 		ring->desc64 = NULL;
 		ring->desc32 = NULL;
-		ring->tx_desc_map = NULL;
 		bus_dma_tag_destroy(ring->tx_desc_tag);
 		ring->tx_desc_tag = NULL;
 	}

Modified: head/sys/dev/nxge/xge-osdep.h
==============================================================================
--- head/sys/dev/nxge/xge-osdep.h	Tue Jun 17 18:03:59 2014	(r267588)
+++ head/sys/dev/nxge/xge-osdep.h	Tue Jun 17 18:10:06 2014	(r267589)
@@ -406,7 +406,6 @@ xge_os_dma_free(pci_dev_h pdev, const vo
 	XGE_OS_MEMORY_CHECK_FREE(p_dmah->dma_viraddr, size);
 	bus_dmamem_free(p_dmah->dma_tag, p_dmah->dma_viraddr, p_dmah->dma_map);
 	bus_dma_tag_destroy(p_dmah->dma_tag);
-	p_dmah->dma_map = NULL;
 	p_dmah->dma_tag = NULL;
 	p_dmah->dma_viraddr = NULL;
 	return;

Modified: head/sys/dev/vxge/vxge-osdep.h
==============================================================================
--- head/sys/dev/vxge/vxge-osdep.h	Tue Jun 17 18:03:59 2014	(r267588)
+++ head/sys/dev/vxge/vxge-osdep.h	Tue Jun 17 18:10:06 2014	(r267589)
@@ -615,7 +615,6 @@ vxge_dma_free(pci_dev_h pdev, const void
 	bus_dmamem_free(p_dmah->dma_tag, p_dmah->dma_vaddr, p_dmah->dma_map);
 	bus_dma_tag_destroy(p_dmah->dma_tag);
 
-	p_dmah->dma_map = NULL;
 	p_dmah->dma_tag = NULL;
 	p_dmah->dma_vaddr = NULL;
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201406171810.s5HIA7Op015345>