summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2008-12-01 10:05:32 +1100
committerStephen Rothwell <sfr@canb.auug.org.au>2008-12-01 10:05:32 +1100
commit2f5f7090b4b6717f21276f8d7569589f77f44797 (patch)
tree5db9dd28752ecadd358d55dfdd39007e4672fe69 /arch
parent0f9c2402919ab16b8a601a9a00cdb8c982c6bc6f (diff)
parent0db42c6b23ce26b05b235dbe2e0aa096db194e33 (diff)
Merge commit 'cris/for-next'
Diffstat (limited to 'arch')
-rw-r--r--arch/cris/include/arch-v10/arch/byteorder.h10
-rw-r--r--arch/cris/include/arch-v32/arch/byteorder.h6
-rw-r--r--arch/cris/include/asm/byteorder.h20
3 files changed, 14 insertions, 22 deletions
diff --git a/arch/cris/include/arch-v10/arch/byteorder.h b/arch/cris/include/arch-v10/arch/byteorder.h
index 255b646b7fa8..ffbd6673a098 100644
--- a/arch/cris/include/arch-v10/arch/byteorder.h
+++ b/arch/cris/include/arch-v10/arch/byteorder.h
@@ -9,18 +9,20 @@
* them together into ntohl etc.
*/
-static inline __attribute_const__ __u32 ___arch__swab32(__u32 x)
+static inline __attribute_const__ __u32 __arch_swab32(__u32 x)
{
__asm__ ("swapwb %0" : "=r" (x) : "0" (x));
-
+
return(x);
}
+#define __arch_swab32 __arch_swab32
-static inline __attribute_const__ __u16 ___arch__swab16(__u16 x)
+static inline __attribute_const__ __u16 __arch_swab16(__u16 x)
{
__asm__ ("swapb %0" : "=r" (x) : "0" (x));
-
+
return(x);
}
+#define __arch_swab16 __arch_swab16
#endif
diff --git a/arch/cris/include/arch-v32/arch/byteorder.h b/arch/cris/include/arch-v32/arch/byteorder.h
index 6ef8fb4a35f2..fb76087fa2d9 100644
--- a/arch/cris/include/arch-v32/arch/byteorder.h
+++ b/arch/cris/include/arch-v32/arch/byteorder.h
@@ -4,17 +4,19 @@
#include <asm/types.h>
static inline __const__ __u32
-___arch__swab32(__u32 x)
+__arch_swab32(__u32 x)
{
__asm__ __volatile__ ("swapwb %0" : "=r" (x) : "0" (x));
return (x);
}
+#define __arch_swab32 __arch_swab32
static inline __const__ __u16
-___arch__swab16(__u16 x)
+__arch_swab16(__u16 x)
{
__asm__ __volatile__ ("swapb %0" : "=r" (x) : "0" (x));
return (x);
}
+#define __arch_swab16 __arch_swab16
#endif /* _ASM_CRIS_ARCH_BYTEORDER_H */
diff --git a/arch/cris/include/asm/byteorder.h b/arch/cris/include/asm/byteorder.h
index cc8e418cfd14..420c03021343 100644
--- a/arch/cris/include/asm/byteorder.h
+++ b/arch/cris/include/asm/byteorder.h
@@ -1,26 +1,14 @@
#ifndef _CRIS_BYTEORDER_H
#define _CRIS_BYTEORDER_H
-#ifdef __GNUC__
+#define __LITTLE_ENDIAN
+#define __SWAB_64_THRU_32__
#ifdef __KERNEL__
-#include <arch/byteorder.h>
-
-/* defines are necessary because the other files detect the presence
- * of a defined __arch_swab32, not an inline
- */
-#define __arch__swab32(x) ___arch__swab32(x)
-#define __arch__swab16(x) ___arch__swab16(x)
-#endif /* __KERNEL__ */
-
-#if !defined(__STRICT_ANSI__) || defined(__KERNEL__)
-# define __BYTEORDER_HAS_U64__
-# define __SWAB_64_THRU_32__
+# include <arch/byteorder.h>
#endif
-#endif /* __GNUC__ */
-
-#include <linux/byteorder/little_endian.h>
+#include <linux/byteorder.h>
#endif