* [PATCH] tools/include: make uapi/linux/types.h usable from assembly
@ 2025-03-21 8:31 Thomas Weißschuh
2025-03-21 13:26 ` Mark Brown
0 siblings, 1 reply; 4+ messages in thread
From: Thomas Weißschuh @ 2025-03-21 8:31 UTC (permalink / raw)
To: Thomas Gleixner, Shuah Khan, Vincenzo Frascino
Cc: Mark Brown, linux-kernel, Thomas Weißschuh
The "real" linux/types.h UAPI header gracefully degrades to a NOOP when
included from assembly code.
Mirror this behaviour in the tools/ variant.
Test for __ASSEMBLER__ over __ASSEMBLY__ as the former is provided by the
toolchain automatically.
Reported-by: Mark Brown <broonie@kernel.org>
Closes: https://lore.kernel.org/lkml/af553c62-ca2f-4956-932c-dd6e3a126f58@sirena.org.uk/
Fixes: c9fbaa879508 ("selftests: vDSO: parse_vdso: Use UAPI headers instead of libc headers")
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
---
Intended to be merged through the tip tree to fix the arm64 selftest build
failure there.
---
tools/include/uapi/linux/types.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tools/include/uapi/linux/types.h b/tools/include/uapi/linux/types.h
index 91fa51a9c31de1496db9a31c90fa95760adc664d..85aa327245c6874e673f9ed0466698487215c655 100644
--- a/tools/include/uapi/linux/types.h
+++ b/tools/include/uapi/linux/types.h
@@ -4,6 +4,8 @@
#include <asm-generic/int-ll64.h>
+#ifndef __ASSEMBLER__
+
/* copied from linux:include/uapi/linux/types.h */
#define __bitwise
typedef __u16 __bitwise __le16;
@@ -20,4 +22,5 @@ typedef __u32 __bitwise __wsum;
#define __aligned_be64 __be64 __attribute__((aligned(8)))
#define __aligned_le64 __le64 __attribute__((aligned(8)))
+#endif /* __ASSEMBLER__ */
#endif /* _UAPI_LINUX_TYPES_H */
---
base-commit: 652262975db421767ada3f05b926854bbb357759
change-id: 20250321-uapi-consistency-38648d1235c1
Best regards,
--
Thomas Weißschuh <thomas.weissschuh@linutronix.de>
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] tools/include: make uapi/linux/types.h usable from assembly
2025-03-21 8:31 [PATCH] tools/include: make uapi/linux/types.h usable from assembly Thomas Weißschuh
@ 2025-03-21 13:26 ` Mark Brown
0 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2025-03-21 13:26 UTC (permalink / raw)
To: Thomas Weißschuh
Cc: Thomas Gleixner, Shuah Khan, Vincenzo Frascino, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 383 bytes --]
On Fri, Mar 21, 2025 at 09:31:17AM +0100, Thomas Weißschuh wrote:
> The "real" linux/types.h UAPI header gracefully degrades to a NOOP when
> included from assembly code.
>
> Mirror this behaviour in the tools/ variant.
>
> Test for __ASSEMBLER__ over __ASSEMBLY__ as the former is provided by the
> toolchain automatically.
Reviewed-by: Mark Brown <broonie@kernel.org>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] tools/include: make uapi/linux/types.h usable from assembly
@ 2025-04-02 20:21 Mark Brown
2025-04-06 17:57 ` Mark Brown
0 siblings, 1 reply; 4+ messages in thread
From: Mark Brown @ 2025-04-02 20:21 UTC (permalink / raw)
To: Linus Torvalds, Thomas Weißschuh, Shuah Khan,
Vincenzo Frascino, Thomas Gleixner
Cc: linux-kernel, Mark Brown
From: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
The "real" linux/types.h UAPI header gracefully degrades to a NOOP when
included from assembly code.
Mirror this behaviour in the tools/ variant.
Test for __ASSEMBLER__ over __ASSEMBLY__ as the former is provided by the
toolchain automatically.
Reported-by: Mark Brown <broonie@kernel.org>
Closes: https://lore.kernel.org/lkml/af553c62-ca2f-4956-932c-dd6e3a126f58@sirena.org.uk/
Fixes: c9fbaa879508 ("selftests: vDSO: parse_vdso: Use UAPI headers instead of libc headers")
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Link: https://patch.msgid.link/20250321-uapi-consistency-v1-1-439070118dc0@linutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
---
This is a fix for a build break in the vDSO selftests which was
introduced some time ago in the tip tree, Thomas posted the fix on 21st
March the day after I reported it but it's not been picked up and the
issue is now in mainline. I'm sending it directly to try to avoid -rc1
being broken.
---
tools/include/uapi/linux/types.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tools/include/uapi/linux/types.h b/tools/include/uapi/linux/types.h
index 91fa51a9c31d..85aa327245c6 100644
--- a/tools/include/uapi/linux/types.h
+++ b/tools/include/uapi/linux/types.h
@@ -4,6 +4,8 @@
#include <asm-generic/int-ll64.h>
+#ifndef __ASSEMBLER__
+
/* copied from linux:include/uapi/linux/types.h */
#define __bitwise
typedef __u16 __bitwise __le16;
@@ -20,4 +22,5 @@ typedef __u32 __bitwise __wsum;
#define __aligned_be64 __be64 __attribute__((aligned(8)))
#define __aligned_le64 __le64 __attribute__((aligned(8)))
+#endif /* __ASSEMBLER__ */
#endif /* _UAPI_LINUX_TYPES_H */
---
base-commit: acc4d5ff0b61eb1715c498b6536c38c1feb7f3c1
change-id: 20250402-kselftest-vdso-fix-d97fb8b09020
Best regards,
--
Mark Brown <broonie@kernel.org>
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] tools/include: make uapi/linux/types.h usable from assembly
2025-04-02 20:21 Mark Brown
@ 2025-04-06 17:57 ` Mark Brown
0 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2025-04-06 17:57 UTC (permalink / raw)
To: Linus Torvalds
Cc: Thomas Weißschuh, Shuah Khan, Vincenzo Frascino,
Thomas Gleixner, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 2283 bytes --]
On Wed, Apr 02, 2025 at 09:21:57PM +0100, Mark Brown wrote:
> From: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
>
> The "real" linux/types.h UAPI header gracefully degrades to a NOOP when
> included from assembly code.
>
> Mirror this behaviour in the tools/ variant.
>
> Test for __ASSEMBLER__ over __ASSEMBLY__ as the former is provided by the
> toolchain automatically.
The issue the vDSO tests not building on at least arm64 that is fixed by
this patch is still present in mainline, it would be great if we could
get it fixed for -rc1.
> Reported-by: Mark Brown <broonie@kernel.org>
> Closes: https://lore.kernel.org/lkml/af553c62-ca2f-4956-932c-dd6e3a126f58@sirena.org.uk/
> Fixes: c9fbaa879508 ("selftests: vDSO: parse_vdso: Use UAPI headers instead of libc headers")
> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
> Link: https://patch.msgid.link/20250321-uapi-consistency-v1-1-439070118dc0@linutronix.de
> Signed-off-by: Mark Brown <broonie@kernel.org>
> ---
> This is a fix for a build break in the vDSO selftests which was
> introduced some time ago in the tip tree, Thomas posted the fix on 21st
> March the day after I reported it but it's not been picked up and the
> issue is now in mainline. I'm sending it directly to try to avoid -rc1
> being broken.
> ---
> tools/include/uapi/linux/types.h | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/tools/include/uapi/linux/types.h b/tools/include/uapi/linux/types.h
> index 91fa51a9c31d..85aa327245c6 100644
> --- a/tools/include/uapi/linux/types.h
> +++ b/tools/include/uapi/linux/types.h
> @@ -4,6 +4,8 @@
>
> #include <asm-generic/int-ll64.h>
>
> +#ifndef __ASSEMBLER__
> +
> /* copied from linux:include/uapi/linux/types.h */
> #define __bitwise
> typedef __u16 __bitwise __le16;
> @@ -20,4 +22,5 @@ typedef __u32 __bitwise __wsum;
> #define __aligned_be64 __be64 __attribute__((aligned(8)))
> #define __aligned_le64 __le64 __attribute__((aligned(8)))
>
> +#endif /* __ASSEMBLER__ */
> #endif /* _UAPI_LINUX_TYPES_H */
>
> ---
> base-commit: acc4d5ff0b61eb1715c498b6536c38c1feb7f3c1
> change-id: 20250402-kselftest-vdso-fix-d97fb8b09020
>
> Best regards,
> --
> Mark Brown <broonie@kernel.org>
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-04-06 17:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-21 8:31 [PATCH] tools/include: make uapi/linux/types.h usable from assembly Thomas Weißschuh
2025-03-21 13:26 ` Mark Brown
-- strict thread matches above, loose matches on Subject: below --
2025-04-02 20:21 Mark Brown
2025-04-06 17:57 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).