From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by dpdk.org (Postfix) with ESMTP id 6C596322C for ; Sun, 18 Nov 2018 22:29:20 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id E9C79213CA; Sun, 18 Nov 2018 16:29:19 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Sun, 18 Nov 2018 16:29:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:mime-version:content-type :content-transfer-encoding; s=mesmtp; bh=Dykm17wQzjx9dTwtmgjfp8+ vaRbq5sy9vuYP6FiCpQQ=; b=q0fh05CqIglKQ1pVN7OfYPfTvpvn7U7DMZz1pca zVpmcq00yihKHI77jpbfK4Q3OpGVeGoCXpX50a89gKovFbVuI6pZ6MbaZHjd1Hq+ VtNt+/LseAk3eT/L3FH9BC+193TEK71ywW5P/Qawbk+EGsJh7xcUS/C7OhFJhVd4 jqlE= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=Dykm17 wQzjx9dTwtmgjfp8+vaRbq5sy9vuYP6FiCpQQ=; b=JJr/7Bzek3UZYcifyYij8w zXabXCbmq7QtKJu+nGZswJr7xhCEslKscAeswab5KGrBr19YV3ve53f4Qsj90wvW QemrfKFvLt7UfqDyUII08Tti8cXyJq5cNWVcA+VgMvNWMS/KVWVWEFekOoX83yAV cye4LqjCqJb37XXthTKXOT2tekbtEEBEfNLRjaC3wiD122OTO32umfQP+E+TgtwW xbRlXPDAjEdeBqt2KbaEd9beDOC8+vtJzoO2XNacRR8iCRlYEb+qpTPRKhdRYrjh OC8h3brTW5yLBcwjFiGdEfS5a4BQVBx82FgKbJ9eHjPVol8kJnavxQxgzTAxt9YA == X-ME-Sender: X-ME-Proxy: Received: from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id CEC02102F9; Sun, 18 Nov 2018 16:29:18 -0500 (EST) From: Thomas Monjalon To: dev@dpdk.org Cc: anatoly.burakov@intel.com, jia.guo@intel.com Date: Sun, 18 Nov 2018 22:29:14 +0100 Message-Id: <20181118212914.29280-1-thomas@monjalon.net> X-Mailer: git-send-email 2.19.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] vfio: fix build with Linux < 4.0 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: Sun, 18 Nov 2018 21:29:20 -0000 drivers/bus/pci/linux/pci_vfio.c:45:23: error: ‘failure_handle_lock’ defined but not used Fixes: 8ffe73865124 ("vfio: add lock for hot-unplug failure handler") Cc: jia.guo@intel.com Signed-off-by: Thomas Monjalon --- Applied immediately. --- drivers/bus/pci/linux/pci_vfio.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/bus/pci/linux/pci_vfio.c b/drivers/bus/pci/linux/pci_vfio.c index d2c84106f..ffd26f195 100644 --- a/drivers/bus/pci/linux/pci_vfio.c +++ b/drivers/bus/pci/linux/pci_vfio.c @@ -36,14 +36,6 @@ * This file is only compiled if CONFIG_RTE_EAL_VFIO is set to "y". */ -/* - * spinlock for device hot-unplug failure handling. If it try to access bus or - * device, such as handle sigbus on bus or handle memory failure for device - * just need to use this lock. It could protect the bus and the device to avoid - * race condition. - */ -static rte_spinlock_t failure_handle_lock = RTE_SPINLOCK_INITIALIZER; - #ifdef VFIO_PRESENT #ifndef PAGE_SIZE @@ -291,6 +283,14 @@ pci_vfio_setup_interrupts(struct rte_pci_device *dev, int vfio_dev_fd) } #ifdef HAVE_VFIO_DEV_REQ_INTERFACE +/* + * Spinlock for device hot-unplug failure handling. + * If it tries to access bus or device, such as handle sigbus on bus + * or handle memory failure for device, just need to use this lock. + * It could protect the bus and the device to avoid race condition. + */ +static rte_spinlock_t failure_handle_lock = RTE_SPINLOCK_INITIALIZER; + static void pci_vfio_req_handler(void *param) { -- 2.19.0