From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 096E943267; Thu, 2 Nov 2023 02:06:08 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 40AD642DE5; Thu, 2 Nov 2023 02:05:42 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id AF8154027D for ; Thu, 2 Nov 2023 02:05:35 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 5E99320B74C5; Wed, 1 Nov 2023 18:05:34 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 5E99320B74C5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1698887134; bh=6AmXIM2YYX7nmk311+hT8BZpll1NW5cmAivPlB17S4M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RggyF59h4IQF4X6Rb9Flm3YFq+I2UyaZTdMbJDsS8VfAcMj/hkbxU9YaEtvfdRCQO 4ghzCdCkKdYBL4oH0kvKjFhXyyq69LW8qNuoeLtwGfEUyBL1P5meLfLhJVSOXJHL7Z 7l1kqVz7DsM+gcB+T5ppRkcQVOpvF6gdwYqaRWSc= From: Tyler Retzlaff To: dev@dpdk.org Cc: Bruce Richardson , Cristian Dumitrescu , David Hunt , Honnappa Nagarahalli , Ruifeng Wang , Sameh Gobriel , Tyler Retzlaff , Vladimir Medvedkin , Yipeng Wang Subject: [PATCH 5/5] rcu: use abstracted bit count functions Date: Wed, 1 Nov 2023 18:05:32 -0700 Message-Id: <1698887132-5347-6-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1698887132-5347-1-git-send-email-roretzla@linux.microsoft.com> References: <1698887132-5347-1-git-send-email-roretzla@linux.microsoft.com> X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Use rte_ctz64 instead of __builtin_ctzl Fixes: 18898c4d06f9 ("eal: use abstracted bit count functions") Signed-off-by: Tyler Retzlaff --- lib/rcu/rte_rcu_qsbr.c | 4 ++-- lib/rcu/rte_rcu_qsbr.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/rcu/rte_rcu_qsbr.c b/lib/rcu/rte_rcu_qsbr.c index 4dc7714..a9f3d6c 100644 --- a/lib/rcu/rte_rcu_qsbr.c +++ b/lib/rcu/rte_rcu_qsbr.c @@ -231,7 +231,7 @@ rte_memory_order_acquire); id = i << __RTE_QSBR_THRID_INDEX_SHIFT; while (bmap) { - t = __builtin_ctzl(bmap); + t = rte_ctz64(bmap); fprintf(f, "%u ", id + t); bmap &= ~(1UL << t); @@ -252,7 +252,7 @@ rte_memory_order_acquire); id = i << __RTE_QSBR_THRID_INDEX_SHIFT; while (bmap) { - t = __builtin_ctzl(bmap); + t = rte_ctz64(bmap); fprintf(f, "thread ID = %u, count = %" PRIu64 ", lock count = %u\n", id + t, rte_atomic_load_explicit( diff --git a/lib/rcu/rte_rcu_qsbr.h b/lib/rcu/rte_rcu_qsbr.h index 9f4aed2..13461f8 100644 --- a/lib/rcu/rte_rcu_qsbr.h +++ b/lib/rcu/rte_rcu_qsbr.h @@ -530,7 +530,7 @@ struct rte_rcu_qsbr_dq_parameters { id = i << __RTE_QSBR_THRID_INDEX_SHIFT; while (bmap) { - j = __builtin_ctzl(bmap); + j = rte_ctz64(bmap); __RTE_RCU_DP_LOG(DEBUG, "%s: check: token = %" PRIu64 ", wait = %d, Bit Map = 0x%" PRIx64 ", Thread ID = %d", __func__, t, wait, bmap, id + j); -- 1.8.3.1