[PATCH 1/2] lib/raid6: Switch to Linux's NEON intrinsics header

Ard Biesheuvel ardb+git at google.com
Wed Sep 9 09:33:21 PDT 2026


From: Ard Biesheuvel <ardb at kernel.org>

Including arm_neon.h directly requires workarounds in the types.h header
that are ugly and should only be applied when actually building NEON
code.

ARM and arm64 both have a asm/neon-intrinsics.h header that applies the
same workarounds, but without propagating them to all other C files. So
include that instead.

This will allow those type hacks to be dropped from the ARM tree.

Signed-off-by: Ard Biesheuvel <ardb at kernel.org>
---
 lib/raid/raid6/arm/neon.uc            | 2 +-
 lib/raid/raid6/arm/recov_neon_inner.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/raid/raid6/arm/neon.uc b/lib/raid/raid6/arm/neon.uc
index 14a9fc2c60fa..fb31cfac1f86 100644
--- a/lib/raid/raid6/arm/neon.uc
+++ b/lib/raid/raid6/arm/neon.uc
@@ -24,7 +24,7 @@
  * This file is postprocessed using unroll.awk
  */
 
-#include <arm_neon.h>
+#include <asm/neon-intrinsics.h>
 #include "arm/neon.h"
 
 typedef uint8x16_t unative_t;
diff --git a/lib/raid/raid6/arm/recov_neon_inner.c b/lib/raid/raid6/arm/recov_neon_inner.c
index 53c355efa7ff..afd225a533cf 100644
--- a/lib/raid/raid6/arm/recov_neon_inner.c
+++ b/lib/raid/raid6/arm/recov_neon_inner.c
@@ -4,7 +4,7 @@
  * Copyright (C) 2017 Linaro Ltd. <ard.biesheuvel at linaro.org>
  */
 
-#include <arm_neon.h>
+#include <asm/neon-intrinsics.h>
 #include "arm/neon.h"
 
 #ifdef CONFIG_ARM
-- 
2.55.0.1003.g10538fe699-goog




More information about the linux-arm-kernel mailing list