From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f176.google.com (mail-pf0-f176.google.com [209.85.192.176]) by dpdk.org (Postfix) with ESMTP id 622B38E93 for ; Mon, 14 Dec 2015 14:00:58 +0100 (CET) Received: by pff63 with SMTP id 63so11003646pff.2 for ; Mon, 14 Dec 2015 05:00:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mvista-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=SVbpPbnhKCBFJXd/qfh/8E8u1km7AaB8iM2WLwNBgZ8=; b=UJdUE41G5RxC1lLJRpq8HZLga0GmKxjwlfUA+QmkIXU+4sV7wpOz1rOv3LU7sQ2klt oJ4bru+gGWog7uJG0X5jczyFZB2zeAaKqJF751YArQxdxgMNYETh2cBpgi33YIEeiSNJ zT24bTYaxWNiS3sd3ozofb8oWxxDUhmdK3GOILDJo1xuiXushAtTFPCKwlht4ms0Z7Gm 4WqRnGDd0FejmL5ISW3g47ypQOkDgDtwXqk8O0rkGynq2u71P3TWUCU+vOhrnwi9Dm5U Iuv4DuHzqJez71yiTyyNij/KPuZg2d+iUPJ9R4ZJIf7Ku0UJj+QpnqH41BX4wq/tVXLZ HHxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=SVbpPbnhKCBFJXd/qfh/8E8u1km7AaB8iM2WLwNBgZ8=; b=b+QPeuikkoovPerSKAn3ZEWazJcg4NBrpg2WZs+8vHmp0SAU8PuG1v1XTg3cPeYW8o kf3J6ZKW09hQKs5bMfwLm3iIb9wV6B7wclXmJRCztVdaQzb3z8LjpPX5BDPRK2j+yCZC sviMCKhx7B4J3NgHg0HclCES3rg4C6NiU+iFUbRKtAr6KAAzS6myoaPDxdl0t+jCwDGR onN0Mw0wdOkJRxkTJBmQSmhNDLvkl5IO6ADAPQ/P5NSoeTfnUpCHleiJoNhMwVOdUMwD 0EN7rwTXHH34IE2G0ohvgwI3AWn5aMtglsvEcNFXvv1enQtNUQ+lckrd5v06OQog41Q7 O4Pg== X-Gm-Message-State: ALoCoQn/QUVdug6IAE5xH+kSIS3xnZpD0PyDO3+UEAG0UCPmJqiSoDgkS+WqNHevATqGAuO16ivkUq0fkWTMZE5Hc7UgWMjzvA== X-Received: by 10.98.10.195 with SMTP id 64mr1025809pfk.20.1450098057774; Mon, 14 Dec 2015 05:00:57 -0800 (PST) Received: from santosh-Latitude-E5530-non-vPro.mvista.com ([110.172.16.5]) by smtp.gmail.com with ESMTPSA id 9sm42506405pfn.51.2015.12.14.05.00.55 (version=TLS1_1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 14 Dec 2015 05:00:56 -0800 (PST) From: Santosh Shukla To: dev@dpdk.org Date: Mon, 14 Dec 2015 18:30:24 +0530 Message-Id: <1450098032-21198-6-git-send-email-sshukla@mvista.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1450098032-21198-1-git-send-email-sshukla@mvista.com> References: <1450098032-21198-1-git-send-email-sshukla@mvista.com> Subject: [dpdk-dev] [ [PATCH v2] 05/13] virtio: change io_base datatype from uint32_t to uint64_type 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, 14 Dec 2015 13:00:58 -0000 In x86 case io_base to store ioport address not more than 65535 ioports. i.e..0 to ffff but in non-x86 case in particular arm64 it need to store more than 32 bit address so changing io_base datatype from 32 to 64. Signed-off-by: Santosh Shukla --- drivers/net/virtio/virtio_ethdev.c | 2 +- drivers/net/virtio/virtio_pci.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c index d928339..620e0d4 100644 --- a/drivers/net/virtio/virtio_ethdev.c +++ b/drivers/net/virtio/virtio_ethdev.c @@ -1291,7 +1291,7 @@ eth_virtio_dev_init(struct rte_eth_dev *eth_dev) return -1; hw->use_msix = virtio_has_msix(&pci_dev->addr); - hw->io_base = (uint32_t)(uintptr_t)pci_dev->mem_resource[0].addr; + hw->io_base = (uint64_t)(uintptr_t)pci_dev->mem_resource[0].addr; /* Reset the device although not necessary at startup */ vtpci_reset(hw); diff --git a/drivers/net/virtio/virtio_pci.h b/drivers/net/virtio/virtio_pci.h index 3f4ff80..f3e4178 100644 --- a/drivers/net/virtio/virtio_pci.h +++ b/drivers/net/virtio/virtio_pci.h @@ -169,7 +169,7 @@ struct virtqueue; struct virtio_hw { struct virtqueue *cvq; - uint32_t io_base; + uint64_t io_base; uint32_t guest_features; uint32_t max_tx_queues; uint32_t max_rx_queues; @@ -231,7 +231,7 @@ outl_p(unsigned int data, unsigned int port) #endif #define VIRTIO_PCI_REG_ADDR(hw, reg) \ - (unsigned short)((hw)->io_base + (reg)) + (unsigned long)((hw)->io_base + (reg)) #define VIRTIO_READ_REG_1(hw, reg) \ inb((VIRTIO_PCI_REG_ADDR((hw), (reg)))) -- 1.7.9.5