svn commit: r258237 - in projects/altix2/sys: dev/bge dev/isp ia64/sgisn sys

Marcel Moolenaar marcel at FreeBSD.org
Sat Nov 16 20:49:25 UTC 2013


Author: marcel
Date: Sat Nov 16 20:49:23 2013
New Revision: 258237
URL: http://svnweb.freebsd.org/changeset/base/258237

Log:
  Rename BUSDMA_ALLOC_CONSISTENT to BUSDMA_ALLOC_COHERENT.

Modified:
  projects/altix2/sys/dev/bge/if_bge.c
  projects/altix2/sys/dev/isp/isp_pci.c
  projects/altix2/sys/dev/isp/isp_sbus.c
  projects/altix2/sys/ia64/sgisn/sgisn_pcib.c
  projects/altix2/sys/sys/busdma.h

Modified: projects/altix2/sys/dev/bge/if_bge.c
==============================================================================
--- projects/altix2/sys/dev/bge/if_bge.c	Sat Nov 16 20:42:26 2013	(r258236)
+++ projects/altix2/sys/dev/bge/if_bge.c	Sat Nov 16 20:49:23 2013	(r258237)
@@ -2856,7 +2856,7 @@ bge_dma_ring_alloc(struct bge_softc *sc,
 	}
 	/* Allocate DMA'able memory for ring. */
 	error = busdma_mem_alloc(*tag,
-	    BUSDMA_ALLOC_ZERO | BUSDMA_ALLOC_CONSISTENT, map);
+	    BUSDMA_ALLOC_ZERO | BUSDMA_ALLOC_COHERENT, map);
 	if (error != 0) {
 		device_printf(sc->bge_dev, 
 		    "could not allocate DMA'able memory for %s (error %d)\n",

Modified: projects/altix2/sys/dev/isp/isp_pci.c
==============================================================================
--- projects/altix2/sys/dev/isp/isp_pci.c	Sat Nov 16 20:42:26 2013	(r258236)
+++ projects/altix2/sys/dev/isp/isp_pci.c	Sat Nov 16 20:49:23 2013	(r258237)
@@ -1579,7 +1579,7 @@ isp_pci_mbxdma(ispsoftc_t *isp)
 	}
 
 	error = busdma_mem_alloc(isp->isp_osinfo.cdmat,
-	    BUSDMA_ALLOC_CONSISTENT, &isp->isp_osinfo.cdmd);
+	    BUSDMA_ALLOC_COHERENT, &isp->isp_osinfo.cdmd);
 	if (error != 0) {
 		isp_prt(isp, ISP_LOGERR, "cannot allocate %d bytes of CCB memory", len);
 		busdma_tag_destroy(isp->isp_osinfo.cdmat);

Modified: projects/altix2/sys/dev/isp/isp_sbus.c
==============================================================================
--- projects/altix2/sys/dev/isp/isp_sbus.c	Sat Nov 16 20:42:26 2013	(r258236)
+++ projects/altix2/sys/dev/isp/isp_sbus.c	Sat Nov 16 20:49:23 2013	(r258237)
@@ -500,7 +500,7 @@ isp_sbus_mbxdma(ispsoftc_t *isp)
 		return (error);
 	}
 
-	error = busdma_mem_alloc(isp->isp_osinfo.cdmat, BUSDMA_ALLOC_CONSISTENT,
+	error = busdma_mem_alloc(isp->isp_osinfo.cdmat, BUSDMA_ALLOC_COHERENT,
 	    &isp->isp_osinfo.cdmd);
 	if (error) {
 		isp_prt(isp, ISP_LOGERR,

Modified: projects/altix2/sys/ia64/sgisn/sgisn_pcib.c
==============================================================================
--- projects/altix2/sys/ia64/sgisn/sgisn_pcib.c	Sat Nov 16 20:42:26 2013	(r258236)
+++ projects/altix2/sys/ia64/sgisn/sgisn_pcib.c	Sat Nov 16 20:49:23 2013	(r258237)
@@ -609,7 +609,7 @@ sgisn_pcib_iommu_xlate(device_t bus, dev
 	 * need consistent DMA and we're not in PCI-X mode, force 32-bit
 	 * mappings.
 	 */
-	if ((mtag->dmt_flags & BUSDMA_ALLOC_CONSISTENT) &&
+	if ((mtag->dmt_flags & BUSDMA_ALLOC_COHERENT) &&
 	    (sc->sc_fwbus->fw_mode & 1) == 0 &&
 	    mtag->dmt_maxaddr == BUS_SPACE_MAXADDR)
 		mtag->dmt_maxaddr >>= 4;
@@ -623,7 +623,7 @@ sgisn_pcib_iommu_xlate(device_t bus, dev
 	 */
 	if (mtag->dmt_maxaddr < BUS_SPACE_MAXADDR &&
 	    (sc->sc_fwbus->fw_mode & 1) == 0 &&
-	    (mtag->dmt_flags & BUSDMA_ALLOC_CONSISTENT) == 0)
+	    (mtag->dmt_flags & BUSDMA_ALLOC_COHERENT) == 0)
 		mtag->dmt_flags |= BUSDMA_MD_IA64_DIRECT32;
 
 	if (mtag->dmt_flags & BUSDMA_MD_IA64_DIRECT32) {
@@ -658,7 +658,7 @@ sgisn_pcib_iommu_map(device_t bus, devic
 	maxaddr = busdma_tag_get_maxaddr(tag);
 	if (maxaddr == BUS_SPACE_MAXADDR) {
 		addr = ba;
-		if (flags & BUSDMA_ALLOC_CONSISTENT)
+		if (flags & BUSDMA_ALLOC_COHERENT)
 			addr |= 1UL << 56;	/* bar */
 		else if ((sc->sc_fwbus->fw_mode & 1) == 0)
 			addr |= 1UL << 59;	/* prefetch */
@@ -746,7 +746,7 @@ sgisn_pcib_iommu_map(device_t bus, devic
 
 	ba &= ~SGISN_PCIB_PAGE_MASK;
 	ba |= 1 << 0;		/* valid */
-	if (flags & BUSDMA_ALLOC_CONSISTENT)
+	if (flags & BUSDMA_ALLOC_COHERENT)
 		ba |= 1 << 4;	/* bar */
 	else if ((sc->sc_fwbus->fw_mode & 1) == 0)
 		ba |= 1 << 3;	/* prefetch */

Modified: projects/altix2/sys/sys/busdma.h
==============================================================================
--- projects/altix2/sys/sys/busdma.h	Sat Nov 16 20:42:26 2013	(r258236)
+++ projects/altix2/sys/sys/busdma.h	Sat Nov 16 20:49:23 2013	(r258237)
@@ -154,8 +154,8 @@ int busdma_mem_alloc(busdma_tag_t tag, u
 /* Allocate pre-zeroed DMA memory. */
 #define	BUSDMA_ALLOC_ZERO		0x10000
 
-/* Allocate memory with consistent mapping. */
-#define	BUSDMA_ALLOC_CONSISTENT		0x20000
+/* Allocate memory with coherent semantics (aka synchronous). */
+#define	BUSDMA_ALLOC_COHERENT		0x20000
 
 /*
  * busdma_mem_free


More information about the svn-src-projects mailing list