All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] lib/cobalt: x86: Relax asm constraints for syscall wrapper
@ 2021-08-16  9:10 Jan Kiszka
  0 siblings, 0 replies; only message in thread
From: Jan Kiszka @ 2021-08-16  9:10 UTC (permalink / raw)
  To: Xenomai

From: Jan Kiszka <jan.kiszka@siemens.com>

The y2038 test will pass the syscall number as variable. This is in
conflict with immediate constraint the current wrapper uses so far.
Relax it, the compiler will still use immediate where possible.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---

Adding this before your series in next.

 lib/cobalt/arch/x86/include/asm/xenomai/syscall.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/cobalt/arch/x86/include/asm/xenomai/syscall.h b/lib/cobalt/arch/x86/include/asm/xenomai/syscall.h
index 21aace16f9..2e02b9983b 100644
--- a/lib/cobalt/arch/x86/include/asm/xenomai/syscall.h
+++ b/lib/cobalt/arch/x86/include/asm/xenomai/syscall.h
@@ -84,7 +84,7 @@ asm (".L__X'%ebx = 1\n\t"
 		DOSYSCALL					\
 		RESTOREARGS_##nr				\
 		: "=a" (__resultvar)				\
-		: "i" (__xn_syscode(op)) ASMFMT_##nr(args)	\
+		: "g" (__xn_syscode(op)) ASMFMT_##nr(args)	\
 		: "memory", "cc");				\
 	(int) __resultvar;					\
 })
@@ -98,7 +98,7 @@ asm (".L__X'%ebx = 1\n\t"
 		DOSYSCALLSAFE					\
 		RESTOREARGS_##nr				\
 		: "=a" (__resultvar)				\
-		: "i" (__xn_syscode(op)) ASMFMT_##nr(args)	\
+		: "g" (__xn_syscode(op)) ASMFMT_##nr(args)	\
 		: "memory", "cc");				\
 	(int) __resultvar;					\
 })
-- 
2.31.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-08-16  9:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-16  9:10 [PATCH] lib/cobalt: x86: Relax asm constraints for syscall wrapper Jan Kiszka

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.