]> git.baikalelectronics.ru Git - kernel.git/commit
arm64/neon: Disable -Wincompatible-pointer-types when building with Clang
authorNathan Chancellor <natechancellor@gmail.com>
Fri, 15 Feb 2019 01:39:59 +0000 (18:39 -0700)
committerWill Deacon <will.deacon@arm.com>
Mon, 18 Feb 2019 10:54:47 +0000 (10:54 +0000)
commitacf19676c4fdc9e163772defd3ece74f8753e487
tree79acdc6da02f3b78ea37392322e7af712f74deab
parent6a0a2f6f8934dbc5b14d4acd62bbae44b34b1a2b
arm64/neon: Disable -Wincompatible-pointer-types when building with Clang

After commit 7515fcb5a51f ("arm64: crypto: add NEON accelerated XOR
implementation"), Clang builds for arm64 started failing with the
following error message.

arch/arm64/lib/xor-neon.c:58:28: error: incompatible pointer types
assigning to 'const unsigned long *' from 'uint64_t *' (aka 'unsigned
long long *') [-Werror,-Wincompatible-pointer-types]
                v3 = veorq_u64(vld1q_u64(dp1 +  6), vld1q_u64(dp2 + 6));
                                         ^~~~~~~~
/usr/lib/llvm-9/lib/clang/9.0.0/include/arm_neon.h:7538:47: note:
expanded from macro 'vld1q_u64'
  __ret = (uint64x2_t) __builtin_neon_vld1q_v(__p0, 51); \
                                              ^~~~

There has been quite a bit of debate and triage that has gone into
figuring out what the proper fix is, viewable at the link below, which
is still ongoing. Ard suggested disabling this warning with Clang with a
pragma so no neon code will have this type of error. While this is not
at all an ideal solution, this build error is the only thing preventing
KernelCI from having successful arm64 defconfig and allmodconfig builds
on linux-next. Getting continuous integration running is more important
so new warnings/errors or boot failures can be caught and fixed quickly.

Link: https://github.com/ClangBuiltLinux/linux/issues/283
Suggested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/include/asm/neon-intrinsics.h