Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Nov 2011 22:56:40 +0000 (UTC)
From:      Marius Strobl <marius@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r227640 - head/sys/dev/sfxge
Message-ID:  <201111172256.pAHMuemi034488@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: marius
Date: Thu Nov 17 22:56:40 2011
New Revision: 227640
URL: http://svn.freebsd.org/changeset/base/227640

Log:
  Fix compilation on ILP32.

Modified:
  head/sys/dev/sfxge/sfxge_dma.c
  head/sys/dev/sfxge/sfxge_intr.c
  head/sys/dev/sfxge/sfxge_tx.c

Modified: head/sys/dev/sfxge/sfxge_dma.c
==============================================================================
--- head/sys/dev/sfxge/sfxge_dma.c	Thu Nov 17 22:07:50 2011	(r227639)
+++ head/sys/dev/sfxge/sfxge_dma.c	Thu Nov 17 22:56:40 2011	(r227640)
@@ -134,8 +134,8 @@ sfxge_dma_alloc(struct sfxge_softc *sc, 
 
 	/* Create the child DMA tag. */
 	if (bus_dma_tag_create(sc->parent_dma_tag, PAGE_SIZE, 0,
-	    0x3FFFFFFFFFFFULL, BUS_SPACE_MAXADDR, NULL, NULL, len, 1, len, 0,
-	    NULL, NULL, &esmp->esm_tag) != 0) {
+	    MIN(0x3FFFFFFFFFFFUL, BUS_SPACE_MAXADDR), BUS_SPACE_MAXADDR, NULL,
+	    NULL, len, 1, len, 0, NULL, NULL, &esmp->esm_tag) != 0) {
 		device_printf(sc->dev, "Couldn't allocate txq DMA tag\n");
 		return (ENOMEM);
 	}

Modified: head/sys/dev/sfxge/sfxge_intr.c
==============================================================================
--- head/sys/dev/sfxge/sfxge_intr.c	Thu Nov 17 22:07:50 2011	(r227639)
+++ head/sys/dev/sfxge/sfxge_intr.c	Thu Nov 17 22:56:40 2011	(r227640)
@@ -146,7 +146,7 @@ sfxge_intr_message(void *arg)
 
 		do {
 			mask = intr->mask;
-		} while (atomic_cmpset_long(&intr->mask, mask,
+		} while (atomic_cmpset_ptr(&intr->mask, mask,
 		    mask | (1 << index)) == 0);
 
 		return;

Modified: head/sys/dev/sfxge/sfxge_tx.c
==============================================================================
--- head/sys/dev/sfxge/sfxge_tx.c	Thu Nov 17 22:07:50 2011	(r227639)
+++ head/sys/dev/sfxge/sfxge_tx.c	Thu Nov 17 22:56:40 2011	(r227640)
@@ -135,7 +135,7 @@ sfxge_tx_qdpl_swizzle(struct sfxge_txq *
 
 	/* Acquire the put list. */
 	putp = &stdp->std_put;
-	put = atomic_readandclear_long(putp);
+	put = atomic_readandclear_ptr(putp);
 	mbuf = (void *)put;
 
 	if (mbuf == NULL)
@@ -484,7 +484,7 @@ sfxge_tx_qdpl_put(struct sfxge_txq *txq,
 				return ENOBUFS;
 			mbuf->m_pkthdr.csum_data = old_len + 1;
 			mbuf->m_nextpkt = (void *)old;
-		} while (atomic_cmpset_long(putp, old, new) == 0);
+		} while (atomic_cmpset_ptr(putp, old, new) == 0);
 	}
 
 	return (0);
@@ -1323,9 +1323,9 @@ sfxge_tx_qinit(struct sfxge_softc *sc, u
 				 &txq->buf_base_id);
 
 	/* Create a DMA tag for packet mappings. */
-	if (bus_dma_tag_create(sc->parent_dma_tag, 1, 0x1000, 0x3FFFFFFFFFFFULL,
-	    BUS_SPACE_MAXADDR, NULL, NULL, 0x11000,
-	    SFXGE_TX_MAPPING_MAX_SEG, 0x1000, 0, NULL, NULL,
+	if (bus_dma_tag_create(sc->parent_dma_tag, 1, 0x1000,
+	    MIN(0x3FFFFFFFFFFFUL, BUS_SPACE_MAXADDR), BUS_SPACE_MAXADDR, NULL,
+	    NULL, 0x11000, SFXGE_TX_MAPPING_MAX_SEG, 0x1000, 0, NULL, NULL,
 	    &txq->packet_dma_tag) != 0) {
 		device_printf(sc->dev, "Couldn't allocate txq DMA tag\n");
 		rc = ENOMEM;



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