common/octeontx2: fix build with SVE
authorRuifeng Wang <ruifeng.wang@arm.com>
Tue, 12 Jan 2021 02:57:07 +0000 (02:57 +0000)
committerDavid Marchand <david.marchand@redhat.com>
Thu, 14 Jan 2021 15:42:25 +0000 (16:42 +0100)
commitfe558028140662ba8488399714d8fe21281851f0
tree390d0f47281cb036db03b0ad70f01205ee445482
parente88bd4746737a1ca464b866d29f20ff5a739cd3f
common/octeontx2: fix build with SVE

Building with gcc 10.2 with SVE extension enabled got error:

{standard input}: Assembler messages:
{standard input}:4002: Error: selected processor does not support `mov z3.b,#0'
{standard input}:4003: Error: selected processor does not support `whilelo p1.b,xzr,x7'
{standard input}:4005: Error: selected processor does not support `ld1b z0.b,p1/z,[x8]'
{standard input}:4006: Error: selected processor does not support `whilelo p4.s,wzr,w7'

This is because inline assembly code explicitly resets cpu model to
not have SVE support. Thus SVE instructions generated by compiler
auto vectorization got rejected by assembler.

Added SVE to the cpu model specified by inline assembly for SVE support.
Not replacing the inline assembly with C atomics because the driver relies
on specific LSE instruction to interface to co-processor [1].

Fixes: 8a4f835971f5 ("common/octeontx2: add IO handling APIs")
Cc: stable@dpdk.org
[1] https://mails.dpdk.org/archives/dev/2021-January/196092.html

Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
drivers/common/octeontx2/otx2_io_arm64.h