Commit 6dba1b67601685ff00ef5d08cc4f11db00cff598

Authored by Paul Mundt
1 parent 66b5bf4216

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>

Showing 2 changed files with 13 additions and 8 deletions Side-by-side Diff

include/asm-sh/byteorder.h
... ... @@ -11,13 +11,13 @@
11 11 static inline __attribute_const__ __u32 ___arch__swab32(__u32 x)
12 12 {
13 13 __asm__(
14   -#ifdef CONFIG_SUPERH32
  14 +#ifdef __SH5__
  15 + "byterev %0, %0\n\t"
  16 + "shari %0, 32, %0"
  17 +#else
15 18 "swap.b %0, %0\n\t"
16 19 "swap.w %0, %0\n\t"
17 20 "swap.b %0, %0"
18   -#else
19   - "byterev %0, %0\n\t"
20   - "shari %0, 32, %0"
21 21 #endif
22 22 : "=r" (x)
23 23 : "0" (x));
24 24  
... ... @@ -28,12 +28,11 @@
28 28 static inline __attribute_const__ __u16 ___arch__swab16(__u16 x)
29 29 {
30 30 __asm__(
31   -#ifdef CONFIG_SUPERH32
32   - "swap.b %0, %0"
33   -#else
  31 +#ifdef __SH5__
34 32 "byterev %0, %0\n\t"
35 33 "shari %0, 32, %0"
36   -
  34 +#else
  35 + "swap.b %0, %0"
37 36 #endif
38 37 : "=r" (x)
39 38 : "0" (x));
include/asm-sh/posix_types.h
... ... @@ -4,5 +4,11 @@
4 4 # else
5 5 # include "posix_types_64.h"
6 6 # endif
  7 +#else
  8 +# ifdef __SH5__
  9 +# include "posix_types_64.h"
  10 +# else
  11 +# include "posix_types_32.h"
  12 +# endif
7 13 #endif /* __KERNEL__ */