From: "Thomas Weißschuh" <thomas.weissschuh@linutronix.de>
To: Thomas Gleixner <tglx@linutronix.de>,
Shuah Khan <skhan@linuxfoundation.org>,
Vincenzo Frascino <vincenzo.frascino@arm.com>
Cc: "Mark Brown" <broonie@kernel.org>,
linux-kernel@vger.kernel.org,
"Thomas Weißschuh" <thomas.weissschuh@linutronix.de>
Subject: [PATCH] tools/include: make uapi/linux/types.h usable from assembly
Date: Fri, 21 Mar 2025 09:31:17 +0100 [thread overview]
Message-ID: <20250321-uapi-consistency-v1-1-439070118dc0@linutronix.de> (raw)
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>
next reply other threads:[~2025-03-21 8:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-21 8:31 Thomas Weißschuh [this message]
2025-03-21 13:26 ` Mark Brown
2025-04-02 20:21 Mark Brown
2025-04-06 17:57 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250321-uapi-consistency-v1-1-439070118dc0@linutronix.de \
--to=thomas.weissschuh@linutronix.de \
--cc=broonie@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=skhan@linuxfoundation.org \
--cc=tglx@linutronix.de \
--cc=vincenzo.frascino@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®