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 435D62B9B for ; Mon, 3 Apr 2017 14:58:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=intel; t=1491224289; x=1522760289; h=from:to:cc:subject:date:message-id; bh=IQJlPqYYCy11HYrfljCtR+KYui3mip7JIEGn3cy7sRA=; b=tC6ddxjObM6HQvZmTUbgh+vaUjxdOpDCUCOpqElhFtsZucBuBWzmQxdT ULEujiFQv/us7bAjBkMLQQwumLOCNg==; Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Apr 2017 05:58:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,270,1486454400"; d="scan'208";a="82253307" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by orsmga005.jf.intel.com with ESMTP; 03 Apr 2017 05:58:06 -0700 Received: from sivswdev02.ir.intel.com (sivswdev02.ir.intel.com [10.237.217.46]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id v33Cw6l6018300; Mon, 3 Apr 2017 13:58:06 +0100 Received: from sivswdev02.ir.intel.com (localhost [127.0.0.1]) by sivswdev02.ir.intel.com with ESMTP id v33Cw5CZ023702; Mon, 3 Apr 2017 13:58:05 +0100 Received: (from aburakov@localhost) by sivswdev02.ir.intel.com with œ id v33Cw561023698; Mon, 3 Apr 2017 13:58:05 +0100 From: Anatoly Burakov To: dev@dpdk.org Cc: "Burakov, Anatoly" Date: Mon, 3 Apr 2017 13:58:05 +0100 Message-Id: <1491224285-23588-1-git-send-email-anatoly.burakov@intel.com> X-Mailer: git-send-email 1.7.0.7 Subject: [dpdk-dev] [PATCH] vfio: Fix spapr vfio compile on some OS's 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: Mon, 03 Apr 2017 12:58:09 -0000 From: "Burakov, Anatoly" Some compilers require definition of vfio_iommu_spapr_tce_ddw_info before its use in vfio_iommu_spapr_tce_info, so move tce_info definition below tce_ddw_info. Fixes: 45385235aece ("vfio: fix compile on older kernels") Signed-off-by: Burakov, Anatoly --- lib/librte_eal/linuxapp/eal/eal_vfio.h | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/lib/librte_eal/linuxapp/eal/eal_vfio.h b/lib/librte_eal/linuxapp/eal/eal_vfio.h index 0bf85bb..72f1f75 100644 --- a/lib/librte_eal/linuxapp/eal/eal_vfio.h +++ b/lib/librte_eal/linuxapp/eal/eal_vfio.h @@ -60,19 +60,6 @@ #define VFIO_IOMMU_SPAPR_TCE_CREATE _IO(VFIO_TYPE, VFIO_BASE + 19) #define VFIO_IOMMU_SPAPR_TCE_REMOVE _IO(VFIO_TYPE, VFIO_BASE + 20) -/* SPAPR_v2 is not present, but SPAPR might be */ -#ifndef VFIO_SPAPR_TCE_IOMMU -#define VFIO_IOMMU_SPAPR_TCE_GET_INFO _IO(VFIO_TYPE, VFIO_BASE + 12) - -struct vfio_iommu_spapr_tce_info { - uint32_t argsz; - uint32_t flags; - uint32_t dma32_window_start; - uint32_t dma32_window_size; - struct vfio_iommu_spapr_tce_ddw_info ddw; -}; -#endif - struct vfio_iommu_spapr_register_memory { uint32_t argsz; uint32_t flags; @@ -97,7 +84,21 @@ struct vfio_iommu_spapr_tce_ddw_info { uint32_t max_dynamic_windows_supported; uint32_t levels; }; -#else + +/* SPAPR_v2 is not present, but SPAPR might be */ +#ifndef VFIO_SPAPR_TCE_IOMMU +#define VFIO_IOMMU_SPAPR_TCE_GET_INFO _IO(VFIO_TYPE, VFIO_BASE + 12) + +struct vfio_iommu_spapr_tce_info { + uint32_t argsz; + uint32_t flags; + uint32_t dma32_window_start; + uint32_t dma32_window_size; + struct vfio_iommu_spapr_tce_ddw_info ddw; +}; +#endif /* VFIO_SPAPR_TCE_IOMMU */ + +#else /* VFIO_SPAPR_TCE_v2_IOMMU */ #define RTE_VFIO_SPAPR VFIO_SPAPR_TCE_v2_IOMMU #endif -- 2.9.3