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 15AD3A04FD; Wed, 8 Jun 2022 13:57:30 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EEB1240689; Wed, 8 Jun 2022 13:57:29 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 5C5B84021D for ; Wed, 8 Jun 2022 13:57:28 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654689446; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SkSf0BXKO81pUdOVXlsn8deAk3WnoXFOankkYhu5O/Y=; b=Eop4WIaFY2y38bXgFdeVoje8N9F0l9N6NjiRQLJkOtb+O4hnVqOFjyQI19FF3BAZMed8Up mq7wVdUIEXlYTxvlZTLqXJ/0jo2t0CdKXWmaQ64M/CjlSyGLDw5omXi6C77KgZ9vnPpQaR rWysVaWW2eMqyZUo8XUeowGCLBWtxtU= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-636-WSn3O3LLNDKpbliXaG3wMA-1; Wed, 08 Jun 2022 07:57:22 -0400 X-MC-Unique: WSn3O3LLNDKpbliXaG3wMA-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 676981C1826C; Wed, 8 Jun 2022 11:57:21 +0000 (UTC) Received: from localhost.localdomain (unknown [10.40.193.24]) by smtp.corp.redhat.com (Postfix) with ESMTP id EE36240D2827; Wed, 8 Jun 2022 11:57:18 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: Stephen Hemminger , Thomas Monjalon , Ruifeng Wang , Jan Viktorin , Honnappa Nagarahalli , Joyce Kong , David Christensen , Stanislaw Kardach , Bruce Richardson , Konstantin Ananyev Subject: [PATCH v2] eal: remove unused arch specific headers for locks Date: Wed, 8 Jun 2022 13:57:01 +0200 Message-Id: <20220608115701.2037384-1-david.marchand@redhat.com> In-Reply-To: <20220607190308.1926702-1-david.marchand@redhat.com> References: <20220607190308.1926702-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.11.54.2 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=david.marchand@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true 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 MCS lock, PF lock and Ticket lock have no arch specific implementation, there is no need for the extra redirection in headers. Signed-off-by: David Marchand Acked-by: Stephen Hemminger --- Note: this was mentionned during the seqlock patch review, and I spotted it again, while reviewing the RISC-V port, and I see the same for a next architecture too. So better clean this up as we don't need the redirection. Changes since v1: - rebased following RISC-V merge, --- MAINTAINERS | 4 ++-- lib/eal/arm/include/meson.build | 3 --- lib/eal/arm/include/rte_mcslock.h | 22 ------------------- lib/eal/arm/include/rte_pflock.h | 18 --------------- lib/eal/arm/include/rte_ticketlock.h | 22 ------------------- lib/eal/include/meson.build | 6 ++--- lib/eal/include/{generic => }/rte_mcslock.h | 8 +++++++ lib/eal/include/{generic => }/rte_pflock.h | 0 .../include/{generic => }/rte_ticketlock.h | 0 lib/eal/ppc/include/meson.build | 3 --- lib/eal/ppc/include/rte_mcslock.h | 18 --------------- lib/eal/ppc/include/rte_pflock.h | 17 -------------- lib/eal/ppc/include/rte_ticketlock.h | 18 --------------- lib/eal/riscv/include/meson.build | 3 --- lib/eal/riscv/include/rte_mcslock.h | 18 --------------- lib/eal/riscv/include/rte_pflock.h | 17 -------------- lib/eal/riscv/include/rte_ticketlock.h | 21 ------------------ lib/eal/x86/include/meson.build | 3 --- lib/eal/x86/include/rte_mcslock.h | 18 --------------- lib/eal/x86/include/rte_pflock.h | 18 --------------- lib/eal/x86/include/rte_ticketlock.h | 18 --------------- 21 files changed, 13 insertions(+), 242 deletions(-) delete mode 100644 lib/eal/arm/include/rte_mcslock.h delete mode 100644 lib/eal/arm/include/rte_pflock.h delete mode 100644 lib/eal/arm/include/rte_ticketlock.h rename lib/eal/include/{generic => }/rte_mcslock.h (98%) rename lib/eal/include/{generic => }/rte_pflock.h (100%) rename lib/eal/include/{generic => }/rte_ticketlock.h (100%) delete mode 100644 lib/eal/ppc/include/rte_mcslock.h delete mode 100644 lib/eal/ppc/include/rte_pflock.h delete mode 100644 lib/eal/ppc/include/rte_ticketlock.h delete mode 100644 lib/eal/riscv/include/rte_mcslock.h delete mode 100644 lib/eal/riscv/include/rte_pflock.h delete mode 100644 lib/eal/riscv/include/rte_ticketlock.h delete mode 100644 lib/eal/x86/include/rte_mcslock.h delete mode 100644 lib/eal/x86/include/rte_pflock.h delete mode 100644 lib/eal/x86/include/rte_ticketlock.h diff --git a/MAINTAINERS b/MAINTAINERS index 372f44523d..4e477401f8 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -255,7 +255,7 @@ F: app/test/test_bitmap.c MCSlock M: Honnappa Nagarahalli -F: lib/eal/include/generic/rte_mcslock.h +F: lib/eal/include/rte_mcslock.h F: app/test/test_mcslock.c Sequence Lock @@ -266,7 +266,7 @@ F: app/test/test_seqlock.c Ticketlock M: Joyce Kong -F: lib/eal/include/generic/rte_ticketlock.h +F: lib/eal/include/rte_ticketlock.h F: app/test/test_ticketlock.c Pseudo-random Number Generation diff --git a/lib/eal/arm/include/meson.build b/lib/eal/arm/include/meson.build index 65c3aec35c..657bf58569 100644 --- a/lib/eal/arm/include/meson.build +++ b/lib/eal/arm/include/meson.build @@ -14,21 +14,18 @@ arch_headers = files( 'rte_cycles.h', 'rte_io_64.h', 'rte_io.h', - 'rte_mcslock.h', 'rte_memcpy_32.h', 'rte_memcpy_64.h', 'rte_memcpy.h', 'rte_pause_32.h', 'rte_pause_64.h', 'rte_pause.h', - 'rte_pflock.h', 'rte_power_intrinsics.h', 'rte_prefetch_32.h', 'rte_prefetch_64.h', 'rte_prefetch.h', 'rte_rwlock.h', 'rte_spinlock.h', - 'rte_ticketlock.h', 'rte_vect.h', ) install_headers(arch_headers, subdir: get_option('include_subdir_arch')) diff --git a/lib/eal/arm/include/rte_mcslock.h b/lib/eal/arm/include/rte_mcslock.h deleted file mode 100644 index 896d678073..0000000000 --- a/lib/eal/arm/include/rte_mcslock.h +++ /dev/null @@ -1,22 +0,0 @@ -/* SPDX-License-Identifier: BSD-3-Clause - * Copyright(c) 2019 Arm Limited - */ - -#ifndef _RTE_MCSLOCK_ARM_H_ -#define _RTE_MCSLOCK_ARM_H_ - -#ifndef RTE_FORCE_INTRINSICS -# error Platform must be built with RTE_FORCE_INTRINSICS -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -#include "generic/rte_mcslock.h" - -#ifdef __cplusplus -} -#endif - -#endif /* _RTE_MCSLOCK_ARM_H_ */ diff --git a/lib/eal/arm/include/rte_pflock.h b/lib/eal/arm/include/rte_pflock.h deleted file mode 100644 index bb9934eec4..0000000000 --- a/lib/eal/arm/include/rte_pflock.h +++ /dev/null @@ -1,18 +0,0 @@ -/* SPDX-License-Identifier: BSD-3-Clause - * Copyright(c) 2021 Microsoft Corporation - */ - -#ifndef _RTE_PFLOCK_ARM_H_ -#define _RTE_PFLOCK_ARM_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -#include "generic/rte_pflock.h" - -#ifdef __cplusplus -} -#endif - -#endif /* _RTE_PFLOCK_ARM_H_ */ diff --git a/lib/eal/arm/include/rte_ticketlock.h b/lib/eal/arm/include/rte_ticketlock.h deleted file mode 100644 index e66beefbe2..0000000000 --- a/lib/eal/arm/include/rte_ticketlock.h +++ /dev/null @@ -1,22 +0,0 @@ -/* SPDX-License-Identifier: BSD-3-Clause - * Copyright(c) 2019 Arm Limited - */ - -#ifndef _RTE_TICKETLOCK_ARM_H_ -#define _RTE_TICKETLOCK_ARM_H_ - -#ifndef RTE_FORCE_INTRINSICS -# error Platform must be built with RTE_FORCE_INTRINSICS -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -#include "generic/rte_ticketlock.h" - -#ifdef __cplusplus -} -#endif - -#endif /* _RTE_TICKETLOCK_ARM_H_ */ diff --git a/lib/eal/include/meson.build b/lib/eal/include/meson.build index 40ebb5b63d..fd6e844224 100644 --- a/lib/eal/include/meson.build +++ b/lib/eal/include/meson.build @@ -29,11 +29,13 @@ headers += files( 'rte_lcore.h', 'rte_log.h', 'rte_malloc.h', + 'rte_mcslock.h', 'rte_memory.h', 'rte_memzone.h', 'rte_pci_dev_feature_defs.h', 'rte_pci_dev_features.h', 'rte_per_lcore.h', + 'rte_pflock.h', 'rte_random.h', 'rte_reciprocal.h', 'rte_seqcount.h', @@ -43,6 +45,7 @@ headers += files( 'rte_string_fns.h', 'rte_tailq.h', 'rte_thread.h', + 'rte_ticketlock.h', 'rte_time.h', 'rte_trace.h', 'rte_trace_point.h', @@ -59,15 +62,12 @@ generic_headers = files( 'generic/rte_cpuflags.h', 'generic/rte_cycles.h', 'generic/rte_io.h', - 'generic/rte_mcslock.h', 'generic/rte_memcpy.h', 'generic/rte_pause.h', - 'generic/rte_pflock.h', 'generic/rte_power_intrinsics.h', 'generic/rte_prefetch.h', 'generic/rte_rwlock.h', 'generic/rte_spinlock.h', - 'generic/rte_ticketlock.h', 'generic/rte_vect.h', ) install_headers(generic_headers, subdir: 'generic') diff --git a/lib/eal/include/generic/rte_mcslock.h b/lib/eal/include/rte_mcslock.h similarity index 98% rename from lib/eal/include/generic/rte_mcslock.h rename to lib/eal/include/rte_mcslock.h index f15b785358..a805cb2906 100644 --- a/lib/eal/include/generic/rte_mcslock.h +++ b/lib/eal/include/rte_mcslock.h @@ -19,6 +19,10 @@ * they acquired the lock. */ +#ifdef __cplusplus +extern "C" { +#endif + #include #include #include @@ -169,4 +173,8 @@ rte_mcslock_is_locked(rte_mcslock_t *msl) return (__atomic_load_n(&msl, __ATOMIC_RELAXED) != NULL); } +#ifdef __cplusplus +} +#endif + #endif /* _RTE_MCSLOCK_H_ */ diff --git a/lib/eal/include/generic/rte_pflock.h b/lib/eal/include/rte_pflock.h similarity index 100% rename from lib/eal/include/generic/rte_pflock.h rename to lib/eal/include/rte_pflock.h diff --git a/lib/eal/include/generic/rte_ticketlock.h b/lib/eal/include/rte_ticketlock.h similarity index 100% rename from lib/eal/include/generic/rte_ticketlock.h rename to lib/eal/include/rte_ticketlock.h diff --git a/lib/eal/ppc/include/meson.build b/lib/eal/ppc/include/meson.build index 1e1f39c05a..fa64330f01 100644 --- a/lib/eal/ppc/include/meson.build +++ b/lib/eal/ppc/include/meson.build @@ -8,15 +8,12 @@ arch_headers = files( 'rte_cpuflags.h', 'rte_cycles.h', 'rte_io.h', - 'rte_mcslock.h', 'rte_memcpy.h', 'rte_pause.h', - 'rte_pflock.h', 'rte_power_intrinsics.h', 'rte_prefetch.h', 'rte_rwlock.h', 'rte_spinlock.h', - 'rte_ticketlock.h', 'rte_vect.h', ) install_headers(arch_headers, subdir: get_option('include_subdir_arch')) diff --git a/lib/eal/ppc/include/rte_mcslock.h b/lib/eal/ppc/include/rte_mcslock.h deleted file mode 100644 index c58a6edc1c..0000000000 --- a/lib/eal/ppc/include/rte_mcslock.h +++ /dev/null @@ -1,18 +0,0 @@ -/* SPDX-License-Identifier: BSD-3-Clause - * Copyright(c) 2019 Arm Limited - */ - -#ifndef _RTE_MCSLOCK_PPC_64_H_ -#define _RTE_MCSLOCK_PPC_64_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -#include "generic/rte_mcslock.h" - -#ifdef __cplusplus -} -#endif - -#endif /* _RTE_MCSLOCK_PPC_64_H_ */ diff --git a/lib/eal/ppc/include/rte_pflock.h b/lib/eal/ppc/include/rte_pflock.h deleted file mode 100644 index 27c201b11d..0000000000 --- a/lib/eal/ppc/include/rte_pflock.h +++ /dev/null @@ -1,17 +0,0 @@ -/* SPDX-License-Identifier: BSD-3-Clause - * Copyright(c) 2021 Microsoft Corporation - */ -#ifndef _RTE_PFLOCK_PPC_64_H_ -#define _RTE_PFLOCK_PPC_64_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -#include "generic/rte_pflock.h" - -#ifdef __cplusplus -} -#endif - -#endif /* _RTE_PFLOCK_PPC_64_H_ */ diff --git a/lib/eal/ppc/include/rte_ticketlock.h b/lib/eal/ppc/include/rte_ticketlock.h deleted file mode 100644 index c175e9eab2..0000000000 --- a/lib/eal/ppc/include/rte_ticketlock.h +++ /dev/null @@ -1,18 +0,0 @@ -/* SPDX-License-Identifier: BSD-3-Clause - * Copyright(c) 2019 Arm Limited - */ - -#ifndef _RTE_TICKETLOCK_PPC_64_H_ -#define _RTE_TICKETLOCK_PPC_64_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -#include "generic/rte_ticketlock.h" - -#ifdef __cplusplus -} -#endif - -#endif /* _RTE_TICKETLOCK_PPC_64_H_ */ diff --git a/lib/eal/riscv/include/meson.build b/lib/eal/riscv/include/meson.build index 7f6e4a5b1e..481c7d50a4 100644 --- a/lib/eal/riscv/include/meson.build +++ b/lib/eal/riscv/include/meson.build @@ -9,15 +9,12 @@ arch_headers = files( 'rte_cpuflags.h', 'rte_cycles.h', 'rte_io.h', - 'rte_mcslock.h', 'rte_memcpy.h', 'rte_pause.h', - 'rte_pflock.h', 'rte_power_intrinsics.h', 'rte_prefetch.h', 'rte_rwlock.h', 'rte_spinlock.h', - 'rte_ticketlock.h', 'rte_vect.h', ) install_headers(arch_headers, subdir: get_option('include_subdir_arch')) diff --git a/lib/eal/riscv/include/rte_mcslock.h b/lib/eal/riscv/include/rte_mcslock.h deleted file mode 100644 index b517cd5fc5..0000000000 --- a/lib/eal/riscv/include/rte_mcslock.h +++ /dev/null @@ -1,18 +0,0 @@ -/* SPDX-License-Identifier: BSD-3-Clause - * Copyright(c) 2019 Arm Limited - */ - -#ifndef RTE_MCSLOCK_RISCV_H -#define RTE_MCSLOCK_RISCV_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include "generic/rte_mcslock.h" - -#ifdef __cplusplus -} -#endif - -#endif /* RTE_MCSLOCK_RISCV_H */ diff --git a/lib/eal/riscv/include/rte_pflock.h b/lib/eal/riscv/include/rte_pflock.h deleted file mode 100644 index ce6ca02aca..0000000000 --- a/lib/eal/riscv/include/rte_pflock.h +++ /dev/null @@ -1,17 +0,0 @@ -/* SPDX-License-Identifier: BSD-3-Clause - * Copyright(c) 2021 Microsoft Corporation - */ -#ifndef RTE_PFLOCK_RISCV_H -#define RTE_PFLOCK_RISCV_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include "generic/rte_pflock.h" - -#ifdef __cplusplus -} -#endif - -#endif /* RTE_PFLOCK_RISCV_H */ diff --git a/lib/eal/riscv/include/rte_ticketlock.h b/lib/eal/riscv/include/rte_ticketlock.h deleted file mode 100644 index b8d2a4f937..0000000000 --- a/lib/eal/riscv/include/rte_ticketlock.h +++ /dev/null @@ -1,21 +0,0 @@ -/* SPDX-License-Identifier: BSD-3-Clause - * Copyright(c) 2019 Arm Limited - * Copyright(c) 2022 StarFive - * Copyright(c) 2022 SiFive - * Copyright(c) 2022 Semihalf - */ - -#ifndef RTE_TICKETLOCK_RISCV_H -#define RTE_TICKETLOCK_RISCV_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include "generic/rte_ticketlock.h" - -#ifdef __cplusplus -} -#endif - -#endif /* RTE_TICKETLOCK_RISCV_H */ diff --git a/lib/eal/x86/include/meson.build b/lib/eal/x86/include/meson.build index 12c2e00035..52d2f8e969 100644 --- a/lib/eal/x86/include/meson.build +++ b/lib/eal/x86/include/meson.build @@ -7,16 +7,13 @@ arch_headers = files( 'rte_cpuflags.h', 'rte_cycles.h', 'rte_io.h', - 'rte_mcslock.h', 'rte_memcpy.h', 'rte_pause.h', - 'rte_pflock.h', 'rte_power_intrinsics.h', 'rte_prefetch.h', 'rte_rtm.h', 'rte_rwlock.h', 'rte_spinlock.h', - 'rte_ticketlock.h', 'rte_vect.h', ) arch_indirect_headers = files( diff --git a/lib/eal/x86/include/rte_mcslock.h b/lib/eal/x86/include/rte_mcslock.h deleted file mode 100644 index a8f041a720..0000000000 --- a/lib/eal/x86/include/rte_mcslock.h +++ /dev/null @@ -1,18 +0,0 @@ -/* SPDX-License-Identifier: BSD-3-Clause - * Copyright(c) 2019 Arm Limited - */ - -#ifndef _RTE_MCSLOCK_X86_64_H_ -#define _RTE_MCSLOCK_X86_64_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -#include "generic/rte_mcslock.h" - -#ifdef __cplusplus -} -#endif - -#endif /* _RTE_MCSLOCK_X86_64_H_ */ diff --git a/lib/eal/x86/include/rte_pflock.h b/lib/eal/x86/include/rte_pflock.h deleted file mode 100644 index c2d876062c..0000000000 --- a/lib/eal/x86/include/rte_pflock.h +++ /dev/null @@ -1,18 +0,0 @@ -/* SPDX-License-Identifier: BSD-3-Clause - * Copyright(c) 2021 Microsoft Corporation - */ - -#ifndef _RTE_PFLOCK_X86_64_H_ -#define _RTE_PFLOCK_X86_64_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -#include "generic/rte_pflock.h" - -#ifdef __cplusplus -} -#endif - -#endif /* _RTE_PFLOCK_X86_64_H_ */ diff --git a/lib/eal/x86/include/rte_ticketlock.h b/lib/eal/x86/include/rte_ticketlock.h deleted file mode 100644 index 0cc01f6b92..0000000000 --- a/lib/eal/x86/include/rte_ticketlock.h +++ /dev/null @@ -1,18 +0,0 @@ -/* SPDX-License-Identifier: BSD-3-Clause - * Copyright(c) 2019 Arm Limited - */ - -#ifndef _RTE_TICKETLOCK_X86_64_H_ -#define _RTE_TICKETLOCK_X86_64_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -#include "generic/rte_ticketlock.h" - -#ifdef __cplusplus -} -#endif - -#endif /* _RTE_TICKETLOCK_X86_64_H_ */ -- 2.36.1