> -----Original Message----- > From: pbhagavat...@marvell.com <pbhagavat...@marvell.com> > Sent: Wednesday, July 3, 2019 10:22 PM > To: Jerin Jacob Kollanukkaran <jer...@marvell.com> > Cc: dev@dpdk.org; Pavan Nikhilesh Bhagavatula > <pbhagavat...@marvell.com> > Subject: [dpdk-dev][PATCH] mempool/octeontx2: fix clang build failure
Subject could be: mempool/octeontx2: fix arm64 clang build failure > > From: Pavan Nikhilesh <pbhagavat...@marvell.com> > > The ARMv8.1 CASP instruction works with even register pairs and since there > no register constraint in older versions of GCC/Clang, use explicit register > allocation to satisfy CASP requirements. > > Fixs build issue with arm64-armv8a-linux-clang. Typo > > Fixes: ee338015e7a9 ("mempool/octeontx2: add optimized dequeue > operation for arm64") > > Reported-by: Gavin Hu <gavin...@arm.com> > Signed-off-by: Pavan Nikhilesh <pbhagavat...@marvell.com> > Signed-off-by: Jerin Jacob <jer...@marvell.com> > --- > > Upstreamed gcc fix: > https://github.com/gcc-mirror/gcc/commit/a1bdb8f296aac911 > > drivers/mempool/octeontx2/otx2_mempool_ops.c | 278 +++++++++-------- > -- > 1 file changed, 127 insertions(+), 151 deletions(-) > > diff --git a/drivers/mempool/octeontx2/otx2_mempool_ops.c > b/drivers/mempool/octeontx2/otx2_mempool_ops.c > index 97146d1fe..e1764b030 100644 > --- a/drivers/mempool/octeontx2/otx2_mempool_ops.c > +++ b/drivers/mempool/octeontx2/otx2_mempool_ops.c > @@ -54,233 +54,206 @@ npa_lf_aura_op_search_alloc(const int64_t wdata, > int64_t * const addr, > return 0; > } > > -/* > - * Some versions of the compiler don't have support for __int128_t for > - * CASP inline-asm. i.e. if the optimization level is reduced to -O0 the > - * CASP restrictions aren't followed and the compiler might end up violation > the > - * CASP rules. Fix it by explicitly providing ((optimize("-O3"))). > - * > - * Example: > - * ccSPMGzq.s:1648: Error: reg pair must start from even reg at > - * operand 1 - `casp x21,x22,x0,x1,[x19]' > - */ > -static __attribute__((optimize("-O3"))) __rte_noinline int __hot Better to mention optimize(-O3) removed due lack of clang support. > -#endif > + > +#else Let otx2_npa_deq build for all cases to catch any issue in early stage(i.e avoid case where building on arm64 not on x86 case) With above fixes: Acked-by: Jerin Jacob <jer...@marvell.com>