aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc
diff options
context:
space:
mode:
authorHarvey Harrison <harvey.harrison@gmail.com>2008-10-29 18:36:00 -0400
committerDavid S. Miller <davem@davemloft.net>2008-10-29 18:36:00 -0400
commit398cf93a394a6f2e42b8e61b1071fc32ecf18647 (patch)
treeac8c328b2f581a39813d1759355d85c1e485fb5e /arch/sparc
parent12a9ee3cce256ae0f178d604f2c8764fb2942cfe (diff)
sparc: use the new byteorder headers
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc')
-rw-r--r--arch/sparc/include/asm/byteorder.h22
1 files changed, 8 insertions, 14 deletions
diff --git a/arch/sparc/include/asm/byteorder.h b/arch/sparc/include/asm/byteorder.h
index bcd83aa351c5..5a70f137f1f7 100644
--- a/arch/sparc/include/asm/byteorder.h
+++ b/arch/sparc/include/asm/byteorder.h
@@ -4,15 +4,14 @@
4#include <asm/types.h> 4#include <asm/types.h>
5#include <asm/asi.h> 5#include <asm/asi.h>
6 6
7#ifdef __GNUC__ 7#define __BIG_ENDIAN
8 8
9#ifdef CONFIG_SPARC32 9#ifdef CONFIG_SPARC32
10#define __SWAB_64_THRU_32__ 10#define __SWAB_64_THRU_32__
11#endif 11#endif
12 12
13#ifdef CONFIG_SPARC64 13#ifdef CONFIG_SPARC64
14 14static inline __u16 __arch_swab16p(const __u16 *addr)
15static inline __u16 ___arch__swab16p(const __u16 *addr)
16{ 15{
17 __u16 ret; 16 __u16 ret;
18 17
@@ -21,8 +20,9 @@ static inline __u16 ___arch__swab16p(const __u16 *addr)
21 : "r" (addr), "i" (ASI_PL)); 20 : "r" (addr), "i" (ASI_PL));
22 return ret; 21 return ret;
23} 22}
23#define __arch_swab16p __arch_swab16p
24 24
25static inline __u32 ___arch__swab32p(const __u32 *addr) 25static inline __u32 __arch_swab32p(const __u32 *addr)
26{ 26{
27 __u32 ret; 27 __u32 ret;
28 28
@@ -31,8 +31,9 @@ static inline __u32 ___arch__swab32p(const __u32 *addr)
31 : "r" (addr), "i" (ASI_PL)); 31 : "r" (addr), "i" (ASI_PL));
32 return ret; 32 return ret;
33} 33}
34#define __arch_swab32p __arch_swab32p
34 35
35static inline __u64 ___arch__swab64p(const __u64 *addr) 36static inline __u64 __arch_swab64p(const __u64 *addr)
36{ 37{
37 __u64 ret; 38 __u64 ret;
38 39
@@ -41,17 +42,10 @@ static inline __u64 ___arch__swab64p(const __u64 *addr)
41 : "r" (addr), "i" (ASI_PL)); 42 : "r" (addr), "i" (ASI_PL));
42 return ret; 43 return ret;
43} 44}
44 45#define __arch_swab64p __arch_swab64p
45#define __arch__swab16p(x) ___arch__swab16p(x)
46#define __arch__swab32p(x) ___arch__swab32p(x)
47#define __arch__swab64p(x) ___arch__swab64p(x)
48 46
49#endif /* CONFIG_SPARC64 */ 47#endif /* CONFIG_SPARC64 */
50 48
51#define __BYTEORDER_HAS_U64__ 49#include <linux/byteorder.h>
52
53#endif
54
55#include <linux/byteorder/big_endian.h>
56 50
57#endif /* _SPARC_BYTEORDER_H */ 51#endif /* _SPARC_BYTEORDER_H */