diff options
Diffstat (limited to 'fs/xfs/xfs_arch.h')
-rw-r--r-- | fs/xfs/xfs_arch.h | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/fs/xfs/xfs_arch.h b/fs/xfs/xfs_arch.h index ae35189b3d70..5ab0dd885b1b 100644 --- a/fs/xfs/xfs_arch.h +++ b/fs/xfs/xfs_arch.h | |||
@@ -40,22 +40,28 @@ | |||
40 | 40 | ||
41 | #include <asm/byteorder.h> | 41 | #include <asm/byteorder.h> |
42 | 42 | ||
43 | #ifdef __LITTLE_ENDIAN | ||
44 | # define __BYTE_ORDER __LITTLE_ENDIAN | ||
45 | #endif | ||
46 | #ifdef __BIG_ENDIAN | 43 | #ifdef __BIG_ENDIAN |
47 | # define __BYTE_ORDER __BIG_ENDIAN | 44 | #define XFS_NATIVE_HOST 1 |
45 | #else | ||
46 | #undef XFS_NATIVE_HOST | ||
47 | #endif | ||
48 | |||
49 | #else /* __KERNEL__ */ | ||
50 | |||
51 | #if __BYTE_ORDER == __BIG_ENDIAN | ||
52 | #define XFS_NATIVE_HOST 1 | ||
53 | #else | ||
54 | #undef XFS_NATIVE_HOST | ||
48 | #endif | 55 | #endif |
49 | 56 | ||
50 | #endif /* __KERNEL__ */ | 57 | #endif /* __KERNEL__ */ |
51 | 58 | ||
52 | /* do we need conversion? */ | 59 | /* do we need conversion? */ |
53 | |||
54 | #define ARCH_NOCONVERT 1 | 60 | #define ARCH_NOCONVERT 1 |
55 | #if __BYTE_ORDER == __LITTLE_ENDIAN | 61 | #ifdef XFS_NATIVE_HOST |
56 | # define ARCH_CONVERT 0 | ||
57 | #else | ||
58 | # define ARCH_CONVERT ARCH_NOCONVERT | 62 | # define ARCH_CONVERT ARCH_NOCONVERT |
63 | #else | ||
64 | # define ARCH_CONVERT 0 | ||
59 | #endif | 65 | #endif |
60 | 66 | ||
61 | /* generic swapping macros */ | 67 | /* generic swapping macros */ |