From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0b-0016ce01.pphosted.com (mx0b-0016ce01.pphosted.com [67.231.156.153]) by dpdk.org (Postfix) with ESMTP id F0B73559C for ; Tue, 10 Nov 2015 00:57:15 +0100 (CET) Received: from pps.filterd (m0085408.ppops.net [127.0.0.1]) by mx0b-0016ce01.pphosted.com (8.15.0.59/8.15.0.59) with SMTP id tA9Nupgn002463; Mon, 9 Nov 2015 15:57:14 -0800 Received: from avcashub1.qlogic.com (avcashub3.qlogic.com [198.70.193.117]) by mx0b-0016ce01.pphosted.com with ESMTP id 1y1h5uk04k-1 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Mon, 09 Nov 2015 15:57:14 -0800 Received: from avluser05.qlc.com (10.1.113.115) by qlc.com (10.1.4.192) with Microsoft SMTP Server id 14.3.235.1; Mon, 9 Nov 2015 15:57:12 -0800 Received: (from rmody@localhost) by avluser05.qlc.com (8.14.4/8.14.4/Submit) id tA9NvChk019439; Mon, 9 Nov 2015 15:57:12 -0800 X-Authentication-Warning: avluser05.qlc.com: rmody set sender to rasesh.mody@qlogic.com using -f From: Rasesh Mody To: Date: Mon, 9 Nov 2015 15:56:22 -0800 Message-ID: <1447113386-19346-8-git-send-email-rasesh.mody@qlogic.com> X-Mailer: git-send-email 1.7.10.3 In-Reply-To: <1447113386-19346-1-git-send-email-rasesh.mody@qlogic.com> References: <1447113386-19346-1-git-send-email-rasesh.mody@qlogic.com> MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=nai engine=5700 definitions=7980 signatures=670655 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 clxscore=1015 suspectscore=3 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1507310000 definitions=main-1511090403 Cc: dev@dpdk.org, sony.chacko@qlogic.com Subject: [dpdk-dev] [PATCH v2 07/11] bnx2x: Linux 32bit enablement X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Nov 2015 23:57:16 -0000 Compile tested. Signed-off-by: Rasesh Mody --- drivers/net/bnx2x/bnx2x.h | 12 ++++++------ drivers/net/bnx2x/bnx2x_ethdev.c | 2 +- drivers/net/bnx2x/bnx2x_rxtx.c | 11 +++++++---- drivers/net/bnx2x/bnx2x_vfpf.c | 4 ++-- 4 files changed, 16 insertions(+), 13 deletions(-) diff --git a/drivers/net/bnx2x/bnx2x.h b/drivers/net/bnx2x/bnx2x.h index 0362e4b..55ffbf1 100644 --- a/drivers/net/bnx2x/bnx2x.h +++ b/drivers/net/bnx2x/bnx2x.h @@ -1457,22 +1457,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 0117049..69df02e 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 c25a898..0f8b9bd 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 b3fcceb..765cc92 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 -- 1.7.10.3