[PATCH] headers: enable ppc64 ___arch__swab16 and ___arch__swab32

This patch cleans up asm-ppc64/byteorder.h to enable ___arch__swab16 and
___arch__swab32 which are marked TODO currently. It removes ___arch__swab64
because ppc64 does not have short instruction combinations for swab64, the
recent gcc generates enough smart code that is equivalent to hand assembled
code under my tests.

Signed-off-by: GOTO Masanori <gotom@debian.or.jp>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by GOTO Masanori and committed by Linus Torvalds 12822bc2 c016e225

-10
-10
include/asm-ppc64/byteorder.h
··· 40 __asm__ __volatile__ ("stwbrx %1,0,%2" : "=m" (*addr) : "r" (val), "r" (addr)); 41 } 42 43 - #if 0 44 static __inline__ __attribute_const__ __u16 ___arch__swab16(__u16 value) 45 { 46 __u16 result; ··· 62 return result; 63 } 64 65 - static __inline__ __attribute_const__ __u64 ___arch__swab64(__u64 value) 66 - { 67 - __u64 result; 68 - #error implement me 69 - } 70 - 71 #define __arch__swab16(x) ___arch__swab16(x) 72 #define __arch__swab32(x) ___arch__swab32(x) 73 - #define __arch__swab64(x) ___arch__swab64(x) 74 - 75 - #endif 76 77 /* The same, but returns converted value from the location pointer by addr. */ 78 #define __arch__swab16p(addr) ld_le16(addr)
··· 40 __asm__ __volatile__ ("stwbrx %1,0,%2" : "=m" (*addr) : "r" (val), "r" (addr)); 41 } 42 43 static __inline__ __attribute_const__ __u16 ___arch__swab16(__u16 value) 44 { 45 __u16 result; ··· 63 return result; 64 } 65 66 #define __arch__swab16(x) ___arch__swab16(x) 67 #define __arch__swab32(x) ___arch__swab32(x) 68 69 /* The same, but returns converted value from the location pointer by addr. */ 70 #define __arch__swab16p(addr) ld_le16(addr)