All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jerin Jacob <jerin.jacob@caviumnetworks.com>
To: Ashwin Sekhar T K <ashwin.sekhar@caviumnetworks.com>
Cc: thomas@monjalon.net, maciej.czekaj@caviumnetworks.com,
	viktorin@rehivetech.com, jianbo.liu@linaro.org,
	bruce.richardson@intel.com, pablo.de.lara.guarch@intel.com,
	konstantin.ananyev@intel.com, dev@dpdk.org
Subject: Re: [PATCH 1/6] hash: compile armv8a CRC32 support conditionally
Date: Thu, 11 May 2017 10:51:49 +0530	[thread overview]
Message-ID: <20170511052148.GA3057@jerin> (raw)
In-Reply-To: <20170510101643.30556-2-ashwin.sekhar@caviumnetworks.com>

-----Original Message-----
> Date: Wed, 10 May 2017 03:16:38 -0700
> From: Ashwin Sekhar T K <ashwin.sekhar@caviumnetworks.com>
> To: thomas@monjalon.net, jerin.jacob@caviumnetworks.com,
>  maciej.czekaj@caviumnetworks.com, viktorin@rehivetech.com,
>  jianbo.liu@linaro.org, bruce.richardson@intel.com,
>  pablo.de.lara.guarch@intel.com, konstantin.ananyev@intel.com
> Cc: dev@dpdk.org, Ashwin Sekhar T K <ashwin.sekhar@caviumnetworks.com>
> Subject: [dpdk-dev] [PATCH 1/6] hash: compile armv8a CRC32 support
>  conditionally
> X-Mailer: git-send-email 2.13.0.rc1
> 
> Compile the armv8a CRC32 support only if the machine
> has the CRC extensions i.e if RTE_MACHINE_CPUFLAG_CRC32
> is defined.
> 
> Removed the .arch assembly directives as these are no
> more necessary.
> 
> Signed-off-by: Ashwin Sekhar T K <ashwin.sekhar@caviumnetworks.com>

Reviewed-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>

> ---
>  lib/librte_hash/Makefile        | 2 ++
>  lib/librte_hash/rte_crc_arm64.h | 4 ----
>  lib/librte_hash/rte_hash_crc.h  | 2 +-
>  3 files changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/lib/librte_hash/Makefile b/lib/librte_hash/Makefile
> index d856aa26d..9cf13a045 100644
> --- a/lib/librte_hash/Makefile
> +++ b/lib/librte_hash/Makefile
> @@ -49,8 +49,10 @@ SRCS-$(CONFIG_RTE_LIBRTE_HASH) += rte_fbk_hash.c
>  SYMLINK-$(CONFIG_RTE_LIBRTE_HASH)-include := rte_hash.h
>  SYMLINK-$(CONFIG_RTE_LIBRTE_HASH)-include += rte_hash_crc.h
>  ifeq ($(CONFIG_RTE_ARCH_ARM64),y)
> +ifneq ($(findstring RTE_MACHINE_CPUFLAG_CRC32,$(CFLAGS)),)
>  SYMLINK-$(CONFIG_RTE_LIBRTE_HASH)-include += rte_crc_arm64.h
>  endif
> +endif
>  SYMLINK-$(CONFIG_RTE_LIBRTE_HASH)-include += rte_jhash.h
>  SYMLINK-$(CONFIG_RTE_LIBRTE_HASH)-include += rte_thash.h
>  SYMLINK-$(CONFIG_RTE_LIBRTE_HASH)-include += rte_fbk_hash.h
> diff --git a/lib/librte_hash/rte_crc_arm64.h b/lib/librte_hash/rte_crc_arm64.h
> index 7dd6334ee..91cde3b9d 100644
> --- a/lib/librte_hash/rte_crc_arm64.h
> +++ b/lib/librte_hash/rte_crc_arm64.h
> @@ -52,7 +52,6 @@ extern "C" {
>  static inline uint32_t
>  crc32c_arm64_u8(uint8_t data, uint32_t init_val)
>  {
> -	asm(".arch armv8-a+crc");
>  	__asm__ volatile(
>  			"crc32cb %w[crc], %w[crc], %w[value]"
>  			: [crc] "+r" (init_val)
> @@ -63,7 +62,6 @@ crc32c_arm64_u8(uint8_t data, uint32_t init_val)
>  static inline uint32_t
>  crc32c_arm64_u16(uint16_t data, uint32_t init_val)
>  {
> -	asm(".arch armv8-a+crc");
>  	__asm__ volatile(
>  			"crc32ch %w[crc], %w[crc], %w[value]"
>  			: [crc] "+r" (init_val)
> @@ -74,7 +72,6 @@ crc32c_arm64_u16(uint16_t data, uint32_t init_val)
>  static inline uint32_t
>  crc32c_arm64_u32(uint32_t data, uint32_t init_val)
>  {
> -	asm(".arch armv8-a+crc");
>  	__asm__ volatile(
>  			"crc32cw %w[crc], %w[crc], %w[value]"
>  			: [crc] "+r" (init_val)
> @@ -85,7 +82,6 @@ crc32c_arm64_u32(uint32_t data, uint32_t init_val)
>  static inline uint32_t
>  crc32c_arm64_u64(uint64_t data, uint32_t init_val)
>  {
> -	asm(".arch armv8-a+crc");
>  	__asm__ volatile(
>  			"crc32cx %w[crc], %w[crc], %x[value]"
>  			: [crc] "+r" (init_val)
> diff --git a/lib/librte_hash/rte_hash_crc.h b/lib/librte_hash/rte_hash_crc.h
> index 0f485b854..808a082c5 100644
> --- a/lib/librte_hash/rte_hash_crc.h
> +++ b/lib/librte_hash/rte_hash_crc.h
> @@ -453,7 +453,7 @@ crc32c_sse42_u64(uint64_t data, uint64_t init_val)
>  
>  static uint8_t crc32_alg = CRC32_SW;
>  
> -#if defined(RTE_ARCH_ARM64)
> +#if defined(RTE_ARCH_ARM64) && defined(RTE_MACHINE_CPUFLAG_CRC32)
>  #include "rte_crc_arm64.h"
>  #else
>  
> -- 
> 2.13.0.rc1
> 

  reply	other threads:[~2017-05-11  5:22 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-10 10:16 [PATCH 0/6] add clang compilation support for armv8a linuxapp Ashwin Sekhar T K
2017-05-10 10:16 ` [PATCH 1/6] hash: compile armv8a CRC32 support conditionally Ashwin Sekhar T K
2017-05-11  5:21   ` Jerin Jacob [this message]
2017-05-11 14:33   ` [PATCH v2 0/6] Add clang compilation support for armv8a linuxapp Ashwin Sekhar T K
2017-05-11 14:33     ` [PATCH v2 1/6] hash: compile armv8a CRC32 support conditionally Ashwin Sekhar T K
2017-05-11 14:33     ` [PATCH v2 2/6] config: add clang support for armv8a linuxapp Ashwin Sekhar T K
2017-05-12  5:17       ` Jerin Jacob
2017-05-11 14:33     ` [PATCH v2 3/6] net/thunderx: fix compile errors for armv8a clang Ashwin Sekhar T K
2017-05-11 14:33     ` [PATCH v2 4/6] acl: fix warning seen with " Ashwin Sekhar T K
2017-05-11 14:33     ` [PATCH v2 5/6] eal/arm: fix warnings " Ashwin Sekhar T K
2017-05-11 14:33     ` [PATCH v2 6/6] eal: pause while busy-waiting for slave Ashwin Sekhar T K
2017-05-10 10:16 ` [PATCH 2/6] config: add clang support for armv8a linuxapp Ashwin Sekhar T K
2017-05-11  5:24   ` Jerin Jacob
2017-05-11  5:37     ` Sekhar, Ashwin
2017-05-11  6:58       ` Jerin Jacob
2017-05-10 10:16 ` [PATCH 3/6] net/thunderx: fix compile errors for armv8a clang Ashwin Sekhar T K
2017-05-11  5:28   ` Jerin Jacob
2017-05-10 10:16 ` [PATCH 4/6] acl: fix warning seen with " Ashwin Sekhar T K
2017-05-11  5:32   ` Jerin Jacob
2017-05-10 10:16 ` [PATCH 5/6] eal/arm: fix warnings " Ashwin Sekhar T K
2017-05-11  5:33   ` Jerin Jacob
2017-05-10 10:16 ` [PATCH 6/6] eal: fix warning " Ashwin Sekhar T K
2017-05-11  5:52   ` Jerin Jacob
2017-05-11  5:59 ` [PATCH 0/6] add clang compilation support for armv8a linuxapp Jerin Jacob
2017-05-11 14:09   ` Sekhar, Ashwin
2017-05-12  5:45 ` [PATCH v3 0/6] Add " Ashwin Sekhar T K
2017-05-12  5:45   ` [PATCH v3 1/6] eal: pause while busy-waiting for slave Ashwin Sekhar T K
2017-05-12  5:45   ` [PATCH v3 2/6] hash: compile armv8a CRC32 support conditionally Ashwin Sekhar T K
2017-05-12  5:45   ` [PATCH v3 3/6] net/thunderx: fix compile errors for armv8a clang Ashwin Sekhar T K
2017-05-12  5:45   ` [PATCH v3 4/6] acl: fix warning seen with " Ashwin Sekhar T K
2017-05-12  5:45   ` [PATCH v3 5/6] eal/arm: fix warnings " Ashwin Sekhar T K
2017-05-12  5:45   ` [PATCH v3 6/6] config: add clang support for armv8a linuxapp Ashwin Sekhar T K
2017-05-12  6:10     ` Jianbo Liu
2017-05-15 10:24       ` Hemant Agrawal
2017-05-15 10:29   ` [PATCH v3 0/6] Add clang compilation " Hemant Agrawal
2017-07-03 20:29     ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170511052148.GA3057@jerin \
    --to=jerin.jacob@caviumnetworks.com \
    --cc=ashwin.sekhar@caviumnetworks.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=jianbo.liu@linaro.org \
    --cc=konstantin.ananyev@intel.com \
    --cc=maciej.czekaj@caviumnetworks.com \
    --cc=pablo.de.lara.guarch@intel.com \
    --cc=thomas@monjalon.net \
    --cc=viktorin@rehivetech.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.