public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86 byteorder.h: use __asm__/__inline__ for userspace
@ 2008-12-27  6:50 Mike Frysinger
  2008-12-27  7:12 ` Sam Ravnborg
  2008-12-28 22:35 ` Marcin Slusarz
  0 siblings, 2 replies; 33+ messages in thread
From: Mike Frysinger @ 2008-12-27  6:50 UTC (permalink / raw)
  To: tglx, mingo, hpa; +Cc: linux-kernel

Use __asm__/__inline__ rather than asm/inline for all the functions
exported to userspace.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
 arch/x86/include/asm/byteorder.h |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/arch/x86/include/asm/byteorder.h b/arch/x86/include/asm/byteorder.h
index e02ae2d..16f7c01 100644
--- a/arch/x86/include/asm/byteorder.h
+++ b/arch/x86/include/asm/byteorder.h
@@ -8,12 +8,12 @@
 
 #ifdef __i386__
 
-static inline __attribute_const__ __u32 ___arch__swab32(__u32 x)
+static __inline__ __attribute_const__ __u32 ___arch__swab32(__u32 x)
 {
 #ifdef CONFIG_X86_BSWAP
-	asm("bswap %0" : "=r" (x) : "0" (x));
+	__asm__("bswap %0" : "=r" (x) : "0" (x));
 #else
-	asm("xchgb %b0,%h0\n\t"	/* swap lower bytes	*/
+	__asm__("xchgb %b0,%h0\n\t"	/* swap lower bytes	*/
 	    "rorl $16,%0\n\t"	/* swap words		*/
 	    "xchgb %b0,%h0"	/* swap higher bytes	*/
 	    : "=q" (x)
@@ -22,7 +22,7 @@ static inline __attribute_const__ __u32 ___arch__swab32(__u32 x)
 	return x;
 }
 
-static inline __attribute_const__ __u64 ___arch__swab64(__u64 val)
+static __inline__ __attribute_const__ __u64 ___arch__swab64(__u64 val)
 {
 	union {
 		struct {
@@ -33,13 +33,13 @@ static inline __attribute_const__ __u64 ___arch__swab64(__u64 val)
 	} v;
 	v.u = val;
 #ifdef CONFIG_X86_BSWAP
-	asm("bswapl %0 ; bswapl %1 ; xchgl %0,%1"
+	__asm__("bswapl %0 ; bswapl %1 ; xchgl %0,%1"
 	    : "=r" (v.s.a), "=r" (v.s.b)
 	    : "0" (v.s.a), "1" (v.s.b));
 #else
 	v.s.a = ___arch__swab32(v.s.a);
 	v.s.b = ___arch__swab32(v.s.b);
-	asm("xchgl %0,%1"
+	__asm__("xchgl %0,%1"
 	    : "=r" (v.s.a), "=r" (v.s.b)
 	    : "0" (v.s.a), "1" (v.s.b));
 #endif
@@ -48,17 +48,17 @@ static inline __attribute_const__ __u64 ___arch__swab64(__u64 val)
 
 #else /* __i386__ */
 
-static inline __attribute_const__ __u64 ___arch__swab64(__u64 x)
+static __inline__ __attribute_const__ __u64 ___arch__swab64(__u64 x)
 {
-	asm("bswapq %0"
+	__asm__("bswapq %0"
 	    : "=r" (x)
 	    : "0" (x));
 	return x;
 }
 
-static inline __attribute_const__ __u32 ___arch__swab32(__u32 x)
+static __inline__ __attribute_const__ __u32 ___arch__swab32(__u32 x)
 {
-	asm("bswapl %0"
+	__asm__("bswapl %0"
 	    : "=r" (x)
 	    : "0" (x));
 	return x;
-- 
1.6.0.6


^ permalink raw reply related	[flat|nested] 33+ messages in thread

end of thread, other threads:[~2009-01-18 20:51 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-27  6:50 [PATCH] x86 byteorder.h: use __asm__/__inline__ for userspace Mike Frysinger
2008-12-27  7:12 ` Sam Ravnborg
2008-12-27  7:55   ` Mike Frysinger
2008-12-27  8:47   ` Ingo Molnar
2008-12-27  9:21     ` Mike Frysinger
2008-12-27 18:57     ` Sam Ravnborg
2008-12-27 18:58       ` H. Peter Anvin
2008-12-27 19:12         ` Sam Ravnborg
2008-12-27 19:15           ` H. Peter Anvin
2008-12-27 19:21             ` Mike Frysinger
2008-12-27 19:23               ` H. Peter Anvin
2008-12-27 20:05                 ` Mike Frysinger
2008-12-27 20:45                   ` H. Peter Anvin
2008-12-27 20:57                     ` Mike Frysinger
2008-12-27 21:08                       ` H. Peter Anvin
2008-12-27 21:09                       ` H. Peter Anvin
2008-12-29 11:56                         ` Mike Frysinger
2008-12-29 17:44                           ` H. Peter Anvin
2008-12-27 19:24             ` Sam Ravnborg
2008-12-27 19:24               ` H. Peter Anvin
2008-12-29 11:12             ` [PATCH] kbuild: auto-convert size types in userspace headers Mike Frysinger
2008-12-29 14:03               ` Sam Ravnborg
2008-12-29 20:34                 ` Mike Frysinger
2008-12-29 20:36                   ` H. Peter Anvin
2008-12-29 22:04                     ` Mike Frysinger
2008-12-29 23:35                 ` H. Peter Anvin
2008-12-30 10:43                   ` Sam Ravnborg
2008-12-30 17:42                     ` H. Peter Anvin
2009-01-18 20:53                       ` Sam Ravnborg
2009-01-07 16:44           ` [PATCH] x86 byteorder.h: use __asm__/__inline__ for userspace David Woodhouse
2008-12-27 21:15     ` H. Peter Anvin
2008-12-28 22:35 ` Marcin Slusarz
2008-12-28 23:03   ` H. Peter Anvin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox