From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id BC67EA045E for ; Wed, 29 May 2019 18:31:34 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 87D931B958; Wed, 29 May 2019 18:31:20 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 312CB1B94B for ; Wed, 29 May 2019 18:31:17 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 May 2019 09:31:16 -0700 X-ExtLoop1: 1 Received: from silpixa00399498.ir.intel.com (HELO silpixa00399498.ger.corp.intel.com) ([10.237.223.125]) by orsmga005.jf.intel.com with ESMTP; 29 May 2019 09:31:15 -0700 From: Anatoly Burakov To: dev@dpdk.org Cc: Hemant Agrawal , Shreyansh Jain , stephen@networkplumber.org, thomas@monjalon.net, david.marchand@redhat.com Date: Wed, 29 May 2019 17:30:48 +0100 Message-Id: <62bb5f666f82c69300655643649583aac38927be.1559147228.git.anatoly.burakov@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: Subject: [dpdk-dev] [PATCH 02/25] bus/fslmc: use new memory locking API 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Replace usages of direct access to shared memory config with calls to the new API. Signed-off-by: Anatoly Burakov --- drivers/bus/fslmc/fslmc_vfio.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/bus/fslmc/fslmc_vfio.c b/drivers/bus/fslmc/fslmc_vfio.c index 1aae56fa9..bf9911f56 100644 --- a/drivers/bus/fslmc/fslmc_vfio.c +++ b/drivers/bus/fslmc/fslmc_vfio.c @@ -347,14 +347,12 @@ fslmc_dmamap_seg(const struct rte_memseg_list *msl __rte_unused, int rte_fslmc_vfio_dmamap(void) { int i = 0, ret; - struct rte_mem_config *mcfg = rte_eal_get_configuration()->mem_config; - rte_rwlock_t *mem_lock = &mcfg->memory_hotplug_lock; /* Lock before parsing and registering callback to memory subsystem */ - rte_rwlock_read_lock(mem_lock); + rte_eal_mcfg_mem_read_lock(); if (rte_memseg_walk(fslmc_dmamap_seg, &i) < 0) { - rte_rwlock_read_unlock(mem_lock); + rte_eal_mcfg_mem_read_unlock(); return -1; } @@ -378,7 +376,7 @@ int rte_fslmc_vfio_dmamap(void) /* Existing segments have been mapped and memory callback for hotplug * has been installed. */ - rte_rwlock_read_unlock(mem_lock); + rte_eal_mcfg_mem_read_unlock(); return 0; } -- 2.17.1