DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ruifeng Wang <Ruifeng.Wang@arm.com>
To: Ruifeng Wang <Ruifeng.Wang@arm.com>,
	"jerinj@marvell.com" <jerinj@marvell.com>,
	Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>, nd <nd@arm.com>,
	Feifei Wang <Feifei.Wang2@arm.com>, nd <nd@arm.com>
Subject: Re: [dpdk-dev] [PATCH v2 1/2] eal/arm: fix gcc build for optimization level 0
Date: Fri, 27 Nov 2020 13:03:45 +0000
Message-ID: <VI1PR0802MB235135D2407B90F1566953AB9EF80@VI1PR0802MB2351.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <20201127101514.47329-2-ruifeng.wang@arm.com>

> -----Original Message-----
> From: Ruifeng Wang <ruifeng.wang@arm.com>
> Sent: Friday, November 27, 2020 6:15 PM
> To: jerinj@marvell.com; Ruifeng Wang <Ruifeng.Wang@arm.com>;
> Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>
> Cc: dev@dpdk.org; nd <nd@arm.com>; Feifei Wang
> <Feifei.Wang2@arm.com>
> Subject: [PATCH v2 1/2] eal/arm: fix gcc build for optimization level 0
> 
> Gcc build with '-O0' on platforms with RTE_ARM_FEATURE_ATOMICS set
> failed for:
>  ../lib/librte_efd/rte_efd.c
>  Assembler messages:
> 3866: Error: selected processor does not support `crc32cb w0,w0,w1'
> 3890: Error: selected processor does not support `crc32ch w0,w0,w1'
> 3914: Error: selected processor does not support `crc32cw w0,w0,w1'
> 3938: Error: selected processor does not support `crc32cx w0,w0,x1'
> 
> This was caused by an architecture specifier added for Clang.
> Unlike Clang, Gcc considers each inline assembly block to be dependent and
> therefore, the architecture specifier impacts assemble of some blocks
> require certain extension support.
> 
> Used arch_extension instead to not override architecture.
> Referred for [1] to fix the issue.
> 
> [1]
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?i
> d=dd1f6308b28edf0452dd5dc7877992903ec61e69
> 
> Fixes: 8fce34cd0a6a ("eal/arm: fix clang build of native target")
> 
> Reported-by: Feifei Wang <feifei.wang2@arm.com>
> Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
> ---
> v2:
> New approach to use arch_extension instead.
> 
>  lib/librte_eal/arm/include/rte_atomic_64.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/librte_eal/arm/include/rte_atomic_64.h
> b/lib/librte_eal/arm/include/rte_atomic_64.h
> index 7fcd17466..6584bc38c 100644
> --- a/lib/librte_eal/arm/include/rte_atomic_64.h
> +++ b/lib/librte_eal/arm/include/rte_atomic_64.h
> @@ -46,7 +46,7 @@ rte_atomic_thread_fence(int memorder)
>  /*------------------------ 128 bit atomic operations -------------------------*/
> 
>  #if defined(__ARM_FEATURE_ATOMICS) ||
> defined(RTE_ARM_FEATURE_ATOMICS)
> -#define __LSE_PREAMBLE	".arch armv8-a+lse\n"
> +#define __LSE_PREAMBLE	".arch_extension lse\n"

This approach has issue on earlier version Clang (eg. clang-6).
I think it is better to take approach in v1.
> 
>  #define __ATOMIC128_CAS_OP(cas_op_name, op_string)                          \
>  static __rte_noinline rte_int128_t                                          \
> --
> 2.20.1


  reply	other threads:[~2020-11-27 13:04 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-27  8:09 [dpdk-dev] [PATCH 0/2] gcc build fix Ruifeng Wang
2020-11-27  8:09 ` [dpdk-dev] [PATCH 1/2] eal/arm: fix gcc build for optimization level 0 Ruifeng Wang
2020-11-27  8:39   ` David Marchand
2020-11-27  8:51     ` Jerin Jacob
2020-11-27  9:25       ` David Marchand
2020-11-27  9:33         ` Jerin Jacob
2020-11-27  9:45           ` David Marchand
2020-11-27 10:05             ` Ruifeng Wang
2020-11-27 10:28               ` Jerin Jacob
2020-11-27  9:39         ` Andrew Rybchenko
2020-11-27  9:36     ` Ruifeng Wang
2020-11-27  8:09 ` [dpdk-dev] [PATCH 2/2] net/igc: " Ruifeng Wang
2020-11-27  8:53   ` Jerin Jacob
2020-11-27  9:02   ` David Marchand
2020-11-27 12:13     ` David Marchand
2020-11-27 14:50       ` Wang, Haiyue
2020-11-27 10:15 ` [dpdk-dev] [PATCH v2 0/2] gcc build fix Ruifeng Wang
2020-11-27 10:15   ` [dpdk-dev] [PATCH v2 1/2] eal/arm: fix gcc build for optimization level 0 Ruifeng Wang
2020-11-27 13:03     ` Ruifeng Wang [this message]
2020-11-27 10:15   ` [dpdk-dev] [PATCH v2 2/2] net/igc: " Ruifeng Wang
2020-11-27 13:35   ` [dpdk-dev] [PATCH v2 0/2] gcc build fix Thomas Monjalon
2020-11-27 14:08     ` Ruifeng Wang
2020-11-27 16:03 ` [dpdk-dev] [PATCH " 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=VI1PR0802MB235135D2407B90F1566953AB9EF80@VI1PR0802MB2351.eurprd08.prod.outlook.com \
    --to=ruifeng.wang@arm.com \
    --cc=Feifei.Wang2@arm.com \
    --cc=Honnappa.Nagarahalli@arm.com \
    --cc=dev@dpdk.org \
    --cc=jerinj@marvell.com \
    --cc=nd@arm.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

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git