From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 9A87E4D27 for ; Wed, 29 Aug 2018 13:57:00 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Aug 2018 04:56:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,303,1531810800"; d="scan'208";a="228584610" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by orsmga004.jf.intel.com with ESMTP; 29 Aug 2018 04:56:24 -0700 Received: from sivswdev01.ir.intel.com (sivswdev01.ir.intel.com [10.237.217.45]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id w7TBuOcl028622; Wed, 29 Aug 2018 12:56:24 +0100 Received: from sivswdev01.ir.intel.com (localhost [127.0.0.1]) by sivswdev01.ir.intel.com with ESMTP id w7TBuOwf010325; Wed, 29 Aug 2018 12:56:24 +0100 Received: (from aburakov@localhost) by sivswdev01.ir.intel.com with LOCAL id w7TBuNoe010319; Wed, 29 Aug 2018 12:56:23 +0100 From: Anatoly Burakov To: dev@dpdk.org Cc: dpdk@stormmq.com Date: Wed, 29 Aug 2018 12:56:16 +0100 Message-Id: <4694d02efdd764a45e84d2da00f1dff284694963.1535543250.git.anatoly.burakov@intel.com> X-Mailer: git-send-email 1.7.0.7 In-Reply-To: References: In-Reply-To: References: Subject: [dpdk-dev] [PATCH 2/7] pci/vfio: improve musl compatibility X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Aug 2018 11:57:01 -0000 Musl already has PAGE_SIZE defined, and our define clashed with it. Rename our define to SYS_PAGE_SIZE. Bugzilla ID: 36 Signed-off-by: Anatoly Burakov --- drivers/bus/pci/linux/pci_vfio.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/bus/pci/linux/pci_vfio.c b/drivers/bus/pci/linux/pci_vfio.c index 686386d6a..88bcfb88b 100644 --- a/drivers/bus/pci/linux/pci_vfio.c +++ b/drivers/bus/pci/linux/pci_vfio.c @@ -35,8 +35,8 @@ #ifdef VFIO_PRESENT -#define PAGE_SIZE (sysconf(_SC_PAGESIZE)) -#define PAGE_MASK (~(PAGE_SIZE - 1)) +#define SYS_PAGE_SIZE (sysconf(_SC_PAGESIZE)) +#define SYS_PAGE_MASK (~(SYS_PAGE_SIZE - 1)) static struct rte_tailq_elem rte_vfio_tailq = { .name = "VFIO_RESOURCE_LIST", @@ -344,8 +344,8 @@ pci_vfio_mmap_bar(int vfio_dev_fd, struct mapped_pci_resource *vfio_res, */ uint32_t table_start = msix_table->offset; uint32_t table_end = table_start + msix_table->size; - table_end = (table_end + ~PAGE_MASK) & PAGE_MASK; - table_start &= PAGE_MASK; + table_end = (table_end + ~SYS_PAGE_MASK) & SYS_PAGE_MASK; + table_start &= SYS_PAGE_MASK; if (table_start == 0 && table_end >= bar->size) { /* Cannot map this BAR */ -- 2.17.1