* [PATCH 0/2] ARM: Use type override hacks only in NEON code
@ 2026-09-09 16:33 Ard Biesheuvel
2026-09-09 16:33 ` [PATCH 1/2] lib/raid6: Switch to Linux's NEON intrinsics header Ard Biesheuvel
2026-09-09 16:33 ` [PATCH 2/2] ARM: Remove hacked-up asm/types.h header Ard Biesheuvel
0 siblings, 2 replies; 5+ messages in thread
From: Ard Biesheuvel @ 2026-09-09 16:33 UTC (permalink / raw)
To: linux-arm-kernel
Cc: linux-kernel, Ard Biesheuvel, Eric Biggers, Christoph Hellwig,
Russell King, Arnd Bergmann
From: Ard Biesheuvel <ardb@kernel.org>
Now that the RAID-6 code can no longer be built for user space, we can
drop the direct dependency on the arm_neon.h system header, and include
asm/neon-intrinsics.h instead.
Since asm/neon-intrinsics.h has all the type overrides needed to include
arm_neon.h without conflicts in the uintXX_t types, those hacks can be
dropped from asm/types.h, and so the file can be dropped entirely.
Cc: Eric Biggers <ebiggers@kernel.org>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Arnd Bergmann <arnd@arndb.de>
Ard Biesheuvel (2):
lib/raid6: Switch to Linux's NEON intrinsics header
ARM: Remove hacked-up asm/types.h header
arch/arm/include/uapi/asm/types.h | 41 --------------------
lib/raid/raid6/arm/neon.uc | 2 +-
lib/raid/raid6/arm/recov_neon_inner.c | 2 +-
3 files changed, 2 insertions(+), 43 deletions(-)
delete mode 100644 arch/arm/include/uapi/asm/types.h
--
2.55.0.1003.g10538fe699-goog
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] lib/raid6: Switch to Linux's NEON intrinsics header
2026-09-09 16:33 [PATCH 0/2] ARM: Use type override hacks only in NEON code Ard Biesheuvel
@ 2026-09-09 16:33 ` Ard Biesheuvel
2026-09-10 5:30 ` Christoph Hellwig
2026-09-09 16:33 ` [PATCH 2/2] ARM: Remove hacked-up asm/types.h header Ard Biesheuvel
1 sibling, 1 reply; 5+ messages in thread
From: Ard Biesheuvel @ 2026-09-09 16:33 UTC (permalink / raw)
To: linux-arm-kernel
Cc: linux-kernel, Ard Biesheuvel, Eric Biggers, Christoph Hellwig,
Russell King, Arnd Bergmann
From: Ard Biesheuvel <ardb@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@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@linaro.org>
*/
-#include <arm_neon.h>
+#include <asm/neon-intrinsics.h>
#include "arm/neon.h"
#ifdef CONFIG_ARM
--
2.55.0.1003.g10538fe699-goog
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 2/2] ARM: Remove hacked-up asm/types.h header
2026-09-09 16:33 [PATCH 0/2] ARM: Use type override hacks only in NEON code Ard Biesheuvel
2026-09-09 16:33 ` [PATCH 1/2] lib/raid6: Switch to Linux's NEON intrinsics header Ard Biesheuvel
@ 2026-09-09 16:33 ` Ard Biesheuvel
2026-09-10 5:31 ` Christoph Hellwig
1 sibling, 1 reply; 5+ messages in thread
From: Ard Biesheuvel @ 2026-09-09 16:33 UTC (permalink / raw)
To: linux-arm-kernel
Cc: linux-kernel, Ard Biesheuvel, Eric Biggers, Christoph Hellwig,
Russell King, Arnd Bergmann
From: Ard Biesheuvel <ardb@kernel.org>
ARM has a special version of asm/types.h which contains overrides for
certain #define's related to the C types used to back C99 types such as
uint32_t and uintptr_t.
This is only needed when pulling in system headers such as stdint.h
during the build, and this only happens when using NEON intrinsics,
for which there is now a dedicated header file.
So drop this header entirely, and revert to the asm-generic one.
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
---
arch/arm/include/uapi/asm/types.h | 41 --------------------
1 file changed, 41 deletions(-)
diff --git a/arch/arm/include/uapi/asm/types.h b/arch/arm/include/uapi/asm/types.h
deleted file mode 100644
index 1a667bc26510..000000000000
--- a/arch/arm/include/uapi/asm/types.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
-#ifndef _UAPI_ASM_TYPES_H
-#define _UAPI_ASM_TYPES_H
-
-#include <asm-generic/int-ll64.h>
-
-/*
- * The C99 types uintXX_t that are usually defined in 'stdint.h' are not as
- * unambiguous on ARM as you would expect. For the types below, there is a
- * difference on ARM between GCC built for bare metal ARM, GCC built for glibc
- * and the kernel itself, which results in build errors if you try to build with
- * -ffreestanding and include 'stdint.h' (such as when you include 'arm_neon.h'
- * in order to use NEON intrinsics)
- *
- * As the typedefs for these types in 'stdint.h' are based on builtin defines
- * supplied by GCC, we can tweak these to align with the kernel's idea of those
- * types, so 'linux/types.h' and 'stdint.h' can be safely included from the same
- * source file (provided that -ffreestanding is used).
- *
- * int32_t uint32_t uintptr_t
- * bare metal GCC long unsigned long unsigned int
- * glibc GCC int unsigned int unsigned int
- * kernel int unsigned int unsigned long
- */
-
-#ifdef __INT32_TYPE__
-#undef __INT32_TYPE__
-#define __INT32_TYPE__ int
-#endif
-
-#ifdef __UINT32_TYPE__
-#undef __UINT32_TYPE__
-#define __UINT32_TYPE__ unsigned int
-#endif
-
-#ifdef __UINTPTR_TYPE__
-#undef __UINTPTR_TYPE__
-#define __UINTPTR_TYPE__ unsigned long
-#endif
-
-#endif /* _UAPI_ASM_TYPES_H */
--
2.55.0.1003.g10538fe699-goog
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] lib/raid6: Switch to Linux's NEON intrinsics header
2026-09-09 16:33 ` [PATCH 1/2] lib/raid6: Switch to Linux's NEON intrinsics header Ard Biesheuvel
@ 2026-09-10 5:30 ` Christoph Hellwig
0 siblings, 0 replies; 5+ messages in thread
From: Christoph Hellwig @ 2026-09-10 5:30 UTC (permalink / raw)
To: Ard Biesheuvel
Cc: linux-arm-kernel, linux-kernel, Ard Biesheuvel, Eric Biggers,
Christoph Hellwig, Russell King, Arnd Bergmann
Looks good:
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] ARM: Remove hacked-up asm/types.h header
2026-09-09 16:33 ` [PATCH 2/2] ARM: Remove hacked-up asm/types.h header Ard Biesheuvel
@ 2026-09-10 5:31 ` Christoph Hellwig
0 siblings, 0 replies; 5+ messages in thread
From: Christoph Hellwig @ 2026-09-10 5:31 UTC (permalink / raw)
To: Ard Biesheuvel
Cc: linux-arm-kernel, linux-kernel, Ard Biesheuvel, Eric Biggers,
Christoph Hellwig, Russell King, Arnd Bergmann
Looks good:
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-09-10 5:31 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-09 16:33 [PATCH 0/2] ARM: Use type override hacks only in NEON code Ard Biesheuvel
2026-09-09 16:33 ` [PATCH 1/2] lib/raid6: Switch to Linux's NEON intrinsics header Ard Biesheuvel
2026-09-10 5:30 ` Christoph Hellwig
2026-09-09 16:33 ` [PATCH 2/2] ARM: Remove hacked-up asm/types.h header Ard Biesheuvel
2026-09-10 5:31 ` Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®