Fix compilation on ILP32.

This commit is contained in:
Marius Strobl 2011-11-17 22:56:40 +00:00
parent d467ffaa66
commit fb8ccc7840
3 changed files with 8 additions and 8 deletions

View File

@ -134,8 +134,8 @@ sfxge_dma_alloc(struct sfxge_softc *sc, bus_size_t len, efsys_mem_t *esmp)
/* 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);
}

View File

@ -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;

View File

@ -135,7 +135,7 @@ sfxge_tx_qdpl_swizzle(struct sfxge_txq *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, struct mbuf *mbuf, int locked)
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, unsigned int txq_index,
&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;