From: Rasesh Mody Date: Fri, 11 Dec 2015 06:36:40 +0000 (-0800) Subject: bnx2x: fix 32-bit build X-Git-Tag: spdx-start~7772 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=99d47f445eb0d83e642d121119d3293b5a7f9e9d;p=dpdk.git bnx2x: fix 32-bit build Compile tested. Signed-off-by: Rasesh Mody --- diff --git a/doc/guides/nics/bnx2x.rst b/doc/guides/nics/bnx2x.rst index 5647a9059d..85ac1c3c24 100644 --- a/doc/guides/nics/bnx2x.rst +++ b/doc/guides/nics/bnx2x.rst @@ -143,6 +143,14 @@ command:: cd make config T=i686-native-linuxapp-gcc install +To compile BNX2X PMD for Linux i686 gcc target, run the following "make" +command: + +.. code-block:: console + + cd + make config T=i686-native-linuxapp-gcc install + To compile BNX2X PMD for FreeBSD x86_64 clang target, run the following "gmake" command:: diff --git a/drivers/net/bnx2x/bnx2x.h b/drivers/net/bnx2x/bnx2x.h index 32fab219b6..2abab0c41b 100644 --- a/drivers/net/bnx2x/bnx2x.h +++ b/drivers/net/bnx2x/bnx2x.h @@ -1444,22 +1444,22 @@ void bnx2x_reg_write16(struct bnx2x_softc *sc, size_t offset, uint16_t val); void bnx2x_reg_write32(struct bnx2x_softc *sc, size_t offset, uint32_t val); #else #define bnx2x_reg_write8(sc, offset, val)\ - *((volatile uint8_t*)((uint64_t)sc->bar[BAR0].base_addr + offset)) = val + *((volatile uint8_t*)((uintptr_t)sc->bar[BAR0].base_addr + offset)) = val #define bnx2x_reg_write16(sc, offset, val)\ - *((volatile uint16_t*)((uint64_t)sc->bar[BAR0].base_addr + offset)) = val + *((volatile uint16_t*)((uintptr_t)sc->bar[BAR0].base_addr + offset)) = val #define bnx2x_reg_write32(sc, offset, val)\ - *((volatile uint32_t*)((uint64_t)sc->bar[BAR0].base_addr + offset)) = val + *((volatile uint32_t*)((uintptr_t)sc->bar[BAR0].base_addr + offset)) = val #define bnx2x_reg_read8(sc, offset)\ - (*((volatile uint8_t*)((uint64_t)sc->bar[BAR0].base_addr + offset))) + (*((volatile uint8_t*)((uintptr_t)sc->bar[BAR0].base_addr + offset))) #define bnx2x_reg_read16(sc, offset)\ - (*((volatile uint16_t*)((uint64_t)sc->bar[BAR0].base_addr + offset))) + (*((volatile uint16_t*)((uintptr_t)sc->bar[BAR0].base_addr + offset))) #define bnx2x_reg_read32(sc, offset)\ - (*((volatile uint32_t*)((uint64_t)sc->bar[BAR0].base_addr + offset))) + (*((volatile uint32_t*)((uintptr_t)sc->bar[BAR0].base_addr + offset))) #endif #define REG_ADDR(sc, offset) (((uint64_t)sc->bar[BAR0].base_addr) + (offset)) diff --git a/drivers/net/bnx2x/bnx2x_ethdev.c b/drivers/net/bnx2x/bnx2x_ethdev.c index 0117049323..69df02e4d2 100644 --- a/drivers/net/bnx2x/bnx2x_ethdev.c +++ b/drivers/net/bnx2x/bnx2x_ethdev.c @@ -442,7 +442,7 @@ bnx2x_common_dev_init(struct rte_eth_dev *eth_dev, int is_vf) sc->bar[BAR0].base_addr = (void *)pci_dev->mem_resource[0].addr; if (is_vf) sc->bar[BAR1].base_addr = (void *) - ((uint64_t)pci_dev->mem_resource[0].addr + PXP_VF_ADDR_DB_START); + ((uintptr_t)pci_dev->mem_resource[0].addr + PXP_VF_ADDR_DB_START); else sc->bar[BAR1].base_addr = pci_dev->mem_resource[2].addr; diff --git a/drivers/net/bnx2x/bnx2x_rxtx.c b/drivers/net/bnx2x/bnx2x_rxtx.c index 2d2b0db2e9..52152e244b 100644 --- a/drivers/net/bnx2x/bnx2x_rxtx.c +++ b/drivers/net/bnx2x/bnx2x_rxtx.c @@ -110,8 +110,10 @@ bnx2x_dev_rx_queue_setup(struct rte_eth_dev *dev, PMD_INIT_LOG(DEBUG, "fp[%02d] req_bd=%u, thresh=%u, usable_bd=%lu, " "total_bd=%lu, rx_pages=%u, cq_pages=%u", - queue_idx, nb_desc, rxq->rx_free_thresh, USABLE_RX_BD(rxq), - TOTAL_RX_BD(rxq), rxq->nb_rx_pages, rxq->nb_cq_pages); + queue_idx, nb_desc, rxq->rx_free_thresh, + (unsigned long)USABLE_RX_BD(rxq), + (unsigned long)TOTAL_RX_BD(rxq), rxq->nb_rx_pages, + rxq->nb_cq_pages); /* Allocate RX ring hardware descriptors */ dma_size = rxq->nb_rx_desc * sizeof(struct eth_rx_bd); @@ -291,8 +293,9 @@ bnx2x_dev_tx_queue_setup(struct rte_eth_dev *dev, PMD_INIT_LOG(DEBUG, "fp[%02d] req_bd=%u, thresh=%u, usable_bd=%lu, " "total_bd=%lu, tx_pages=%u", - queue_idx, nb_desc, txq->tx_free_thresh, USABLE_TX_BD(txq), - TOTAL_TX_BD(txq), txq->nb_tx_pages); + queue_idx, nb_desc, txq->tx_free_thresh, + (unsigned long)USABLE_TX_BD(txq), + (unsigned long)TOTAL_TX_BD(txq), txq->nb_tx_pages); /* Allocate TX ring hardware descriptors */ tsize = txq->nb_tx_desc * sizeof(union eth_tx_bd_types); diff --git a/drivers/net/bnx2x/bnx2x_vfpf.c b/drivers/net/bnx2x/bnx2x_vfpf.c index b3fcceb750..765cc92416 100644 --- a/drivers/net/bnx2x/bnx2x_vfpf.c +++ b/drivers/net/bnx2x/bnx2x_vfpf.c @@ -66,8 +66,8 @@ bnx2x_check_bull(struct bnx2x_softc *sc) /* add tlv to a buffer */ #define BNX2X_TLV_APPEND(_tlvs, _offset, _type, _length) \ - ((struct vf_first_tlv *)((uint64_t)_tlvs + _offset))->type = _type; \ - ((struct vf_first_tlv *)((uint64_t)_tlvs + _offset))->length = _length + ((struct vf_first_tlv *)((unsigned long)_tlvs + _offset))->type = _type; \ + ((struct vf_first_tlv *)((unsigned long)_tlvs + _offset))->length = _length /* Initiliaze header of the first tlv and clear mailbox*/ static void diff --git a/scripts/test-build.sh b/scripts/test-build.sh index f2bf7633f2..6e67c8fc68 100755 --- a/scripts/test-build.sh +++ b/scripts/test-build.sh @@ -98,7 +98,6 @@ config () # echo $2 | grep -q '^i686' || \ sed -ri 's,(PMD_SZEDATA2=)n,\1y,' $1/.config test "$DPDK_DEP_ZLIB" != y || \ - echo $2 | grep -q '^i686' || \ sed -ri 's,(BNX2X_PMD=)n,\1y,' $1/.config sed -ri 's,(NFP_PMD=)n,\1y,' $1/.config test "$DPDK_DEP_PCAP" != y || \