sh: Fix more user header breakage from sh64 integration.
authorPaul Mundt <lethal@linux-sh.org>
Fri, 14 Mar 2008 08:21:09 +0000 (17:21 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Fri, 14 Mar 2008 08:21:09 +0000 (17:21 +0900)
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>
include/asm-sh/byteorder.h
include/asm-sh/posix_types.h

index 0eb9904b6545be3be0b7a99c6b258c25828fc2fa..4c13e61175632c3dc8f5a60712dda405eb177b66 100644 (file)
 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));
index 4b9d11c9fc770e2fdfcd0bd0c10ff66f955a1f78..4eeb723aee7ed4c2915989af3c0151447058cf1b 100644 (file)
@@ -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__ */
This page took 0.049464 seconds and 5 git commands to generate.