[PATCH 1/1]: arm: _syscallX() macros must mark "memory" as clobbered

Markus Gutschke
2006-03-09T23:39:18Z

[-- Attachment #1: Type: text/plain, Size: 391 bytes --]

From: Markus Gutschke <markus@google.com>

While other platforms (including x86) have been fixed to mark memory as
clobbered by _syscallX()'s, this bug has not yet been fixed for ARM.
This patch adds the missing constraints and applies to version 2.6.15.6.

The bug can be tracked at http://bugzilla.kernel.org/show_bug.cgi?id=6205

Signed-off-by: Markus Gutschke <markus@google.com>

---

[-- Attachment #2: arm-unistd.h.diff --]
[-- Type: text/x-patch, Size: 1578 bytes --]

--- include/asm-arm/unistd.h.orig 2006-03-05 11:07:54.000000000 -0800
+++ include/asm-arm/unistd.h 2006-03-09 15:10:22.000000000 -0800
@@ -415,7 +415,7 @@
__syscall(name) \
: "=r" (__res_r0) \
: "r" (__r0) \
- : "lr"); \
+ : "lr", "memory"); \
__res = __res_r0; \
__syscall_return(type,__res); \
}
@@ -430,7 +430,7 @@
__syscall(name) \
: "=r" (__res_r0) \
: "r" (__r0),"r" (__r1) \
- : "lr"); \
+ : "lr", "memory"); \
__res = __res_r0; \
__syscall_return(type,__res); \
}
@@ -447,7 +447,7 @@
__syscall(name) \
: "=r" (__res_r0) \
: "r" (__r0),"r" (__r1),"r" (__r2) \
- : "lr"); \
+ : "lr", "memory"); \
__res = __res_r0; \
__syscall_return(type,__res); \
}
@@ -465,7 +465,7 @@
__syscall(name) \
: "=r" (__res_r0) \
: "r" (__r0),"r" (__r1),"r" (__r2),"r" (__r3) \
- : "lr"); \
+ : "lr", "memory"); \
__res = __res_r0; \
__syscall_return(type,__res); \
}
@@ -484,7 +484,7 @@
__syscall(name) \
: "=r" (__res_r0) \
: "r" (__r0),"r" (__r1),"r" (__r2),"r" (__r3),"r" (__r4) \
- : "lr"); \
+ : "lr", "memory"); \
__res = __res_r0; \
__syscall_return(type,__res); \
}
@@ -503,7 +503,7 @@
__syscall(name) \
: "=r" (__res_r0) \
: "r" (__r0),"r" (__r1),"r" (__r2),"r" (__r3), "r" (__r4),"r" (__r5) \
- : "lr"); \
+ : "lr", "memory"); \
__res = __res_r0; \
__syscall_return(type,__res); \
}