DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev]  [PATCH] eal: arm64: introduce RTE_CPUFLAG_ATOMICS
@ 2016-03-02 13:20 Jerin Jacob
  2016-03-02 14:06 ` Jan Viktorin
  0 siblings, 1 reply; 3+ messages in thread
From: Jerin Jacob @ 2016-03-02 13:20 UTC (permalink / raw)
  To: dev; +Cc: viktorin

armv8.1 adds support for new atomic instructions.
Linux kernel v4.3 onwards, the presence of atomic instruction
support can detect through HWCAP_ATOMICS

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
---
 app/test/test_cpuflags.c                                 | 3 +++
 lib/librte_eal/common/arch/arm/rte_cpuflags.c            | 1 +
 lib/librte_eal/common/include/arch/arm/rte_cpuflags_64.h | 1 +
 3 files changed, 5 insertions(+)

diff --git a/app/test/test_cpuflags.c b/app/test/test_cpuflags.c
index e8d0ce7..d083c86 100644
--- a/app/test/test_cpuflags.c
+++ b/app/test/test_cpuflags.c
@@ -144,6 +144,9 @@ test_cpuflags(void)
 
 	printf("Check for CRC32:\t");
 	CHECK_FOR_FLAG(RTE_CPUFLAG_CRC32);
+
+	printf("Check for ATOMICS:\t");
+	CHECK_FOR_FLAG(RTE_CPUFLAG_ATOMICS);
 #endif
 
 #if defined(RTE_ARCH_X86_64) || defined(RTE_ARCH_I686)
diff --git a/lib/librte_eal/common/arch/arm/rte_cpuflags.c b/lib/librte_eal/common/arch/arm/rte_cpuflags.c
index f14c56a..23240ef 100644
--- a/lib/librte_eal/common/arch/arm/rte_cpuflags.c
+++ b/lib/librte_eal/common/arch/arm/rte_cpuflags.c
@@ -122,6 +122,7 @@ const struct feature_entry rte_cpu_feature_table[] = {
 	FEAT_DEF(SHA1,		REG_HWCAP,    5)
 	FEAT_DEF(SHA2,		REG_HWCAP,    6)
 	FEAT_DEF(CRC32,		REG_HWCAP,    7)
+	FEAT_DEF(ATOMICS,	REG_HWCAP,    8)
 	FEAT_DEF(AARCH64,	REG_PLATFORM, 1)
 };
 #endif /* RTE_ARCH */
diff --git a/lib/librte_eal/common/include/arch/arm/rte_cpuflags_64.h b/lib/librte_eal/common/include/arch/arm/rte_cpuflags_64.h
index 810e8a0..49aead9 100644
--- a/lib/librte_eal/common/include/arch/arm/rte_cpuflags_64.h
+++ b/lib/librte_eal/common/include/arch/arm/rte_cpuflags_64.h
@@ -49,6 +49,7 @@ enum rte_cpu_flag_t {
 	RTE_CPUFLAG_SHA1,
 	RTE_CPUFLAG_SHA2,
 	RTE_CPUFLAG_CRC32,
+	RTE_CPUFLAG_ATOMICS,
 	RTE_CPUFLAG_AARCH64,
 	/* The last item */
 	RTE_CPUFLAG_NUMFLAGS,/**< This should always be the last! */
-- 
2.1.0

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] eal: arm64: introduce RTE_CPUFLAG_ATOMICS
  2016-03-02 13:20 [dpdk-dev] [PATCH] eal: arm64: introduce RTE_CPUFLAG_ATOMICS Jerin Jacob
@ 2016-03-02 14:06 ` Jan Viktorin
  2016-03-05 18:09   ` Thomas Monjalon
  0 siblings, 1 reply; 3+ messages in thread
From: Jan Viktorin @ 2016-03-02 14:06 UTC (permalink / raw)
  To: Jerin Jacob; +Cc: dev

On Wed, 2 Mar 2016 18:50:59 +0530
Jerin Jacob <jerin.jacob@caviumnetworks.com> wrote:

> armv8.1 adds support for new atomic instructions.
> Linux kernel v4.3 onwards, the presence of atomic instruction
> support can detect through HWCAP_ATOMICS
> 
> Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Reviewed-by: Jan Viktorin <viktorin@rehivetech.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] eal: arm64: introduce RTE_CPUFLAG_ATOMICS
  2016-03-02 14:06 ` Jan Viktorin
@ 2016-03-05 18:09   ` Thomas Monjalon
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2016-03-05 18:09 UTC (permalink / raw)
  To: Jerin Jacob; +Cc: dev, Jan Viktorin

2016-03-02 15:06, Jan Viktorin:
> On Wed, 2 Mar 2016 18:50:59 +0530
> Jerin Jacob <jerin.jacob@caviumnetworks.com> wrote:
> 
> > armv8.1 adds support for new atomic instructions.
> > Linux kernel v4.3 onwards, the presence of atomic instruction
> > support can detect through HWCAP_ATOMICS
> > 
> > Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
> Reviewed-by: Jan Viktorin <viktorin@rehivetech.com>

Applied, thanks

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-03-05 18:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-02 13:20 [dpdk-dev] [PATCH] eal: arm64: introduce RTE_CPUFLAG_ATOMICS Jerin Jacob
2016-03-02 14:06 ` Jan Viktorin
2016-03-05 18:09   ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).