aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-sh
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2008-03-14 17:21:09 +0900
committerPaul Mundt <lethal@linux-sh.org>2008-03-14 17:21:09 +0900
commit6dba1b67601685ff00ef5d08cc4f11db00cff598 (patch)
treef8eaed5afa2c8aa79bbc50bd3c1e10ceea1af7e1 /include/asm-sh
parent66b5bf4216631628788bc48b028c203e8538f43e (diff)
downloadkernel_goldelico_gta04-6dba1b67601685ff00ef5d08cc4f11db00cff598.zip
kernel_goldelico_gta04-6dba1b67601685ff00ef5d08cc4f11db00cff598.tar.gz
kernel_goldelico_gta04-6dba1b67601685ff00ef5d08cc4f11db00cff598.tar.bz2
sh: Fix more user header breakage from sh64 integration.
posix_types.h and byteorder.h were sticking purely with the Kconfig symbols, which doesn't work when we scrub the headers for user use. Fixes a very unhelpful build error in current klibc. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'include/asm-sh')
-rw-r--r--include/asm-sh/byteorder.h15
-rw-r--r--include/asm-sh/posix_types.h6
2 files changed, 13 insertions, 8 deletions
diff --git a/include/asm-sh/byteorder.h b/include/asm-sh/byteorder.h
index 0eb9904..4c13e61 100644
--- a/include/asm-sh/byteorder.h
+++ b/include/asm-sh/byteorder.h
@@ -11,13 +11,13 @@
static inline __attribute_const__ __u32 ___arch__swab32(__u32 x)
{
__asm__(
-#ifdef CONFIG_SUPERH32
+#ifdef __SH5__
+ "byterev %0, %0\n\t"
+ "shari %0, 32, %0"
+#else
"swap.b %0, %0\n\t"
"swap.w %0, %0\n\t"
"swap.b %0, %0"
-#else
- "byterev %0, %0\n\t"
- "shari %0, 32, %0"
#endif
: "=r" (x)
: "0" (x));
@@ -28,12 +28,11 @@ static inline __attribute_const__ __u32 ___arch__swab32(__u32 x)
static inline __attribute_const__ __u16 ___arch__swab16(__u16 x)
{
__asm__(
-#ifdef CONFIG_SUPERH32
- "swap.b %0, %0"
-#else
+#ifdef __SH5__
"byterev %0, %0\n\t"
"shari %0, 32, %0"
-
+#else
+ "swap.b %0, %0"
#endif
: "=r" (x)
: "0" (x));
diff --git a/include/asm-sh/posix_types.h b/include/asm-sh/posix_types.h
index 4b9d11c..4eeb723 100644
--- a/include/asm-sh/posix_types.h
+++ b/include/asm-sh/posix_types.h
@@ -4,4 +4,10 @@
# else
# include "posix_types_64.h"
# endif
+#else
+# ifdef __SH5__
+# include "posix_types_64.h"
+# else
+# include "posix_types_32.h"
+# endif
#endif /* __KERNEL__ */