diff options
author | Christoph Hellwig <hch@sgi.com> | 2006-01-10 23:23:43 -0500 |
---|---|---|
committer | Nathan Scott <nathans@sgi.com> | 2006-01-10 23:23:43 -0500 |
commit | d3a9b1f9da4ee3e6d284148412097621b1c9e575 (patch) | |
tree | 0de472c3ae18e863aaa0099f2227e2163f71693a /fs | |
parent | f60d36690ce11a6a41b89e63b4201fbba3aa0bfb (diff) |
[XFS] merge xfs_arch.h userspace changes back
SGI-PV: 907752
SGI-Modid: xfs-linux-melb:xfs-kern:201882a
Signed-off-by: Christoph Hellwig <hch@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/xfs/xfs_arch.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/fs/xfs/xfs_arch.h b/fs/xfs/xfs_arch.h index 68e5051d8e24..f1aeda599eb1 100644 --- a/fs/xfs/xfs_arch.h +++ b/fs/xfs/xfs_arch.h | |||
@@ -40,6 +40,22 @@ | |||
40 | #undef XFS_NATIVE_HOST | 40 | #undef XFS_NATIVE_HOST |
41 | #endif | 41 | #endif |
42 | 42 | ||
43 | #ifdef XFS_NATIVE_HOST | ||
44 | #define cpu_to_be16(val) ((__be16)(val)) | ||
45 | #define cpu_to_be32(val) ((__be32)(val)) | ||
46 | #define cpu_to_be64(val) ((__be64)(val)) | ||
47 | #define be16_to_cpu(val) ((__uint16_t)(val) | ||
48 | #define be32_to_cpu(val) ((__uint32_t)(val)) | ||
49 | #define be64_to_cpu(val) ((__uint64_t)(val)) | ||
50 | #else | ||
51 | #define cpu_to_be16(val) (__swab16((__uint16_t)(val))) | ||
52 | #define cpu_to_be32(val) (__swab32((__uint32_t)(val))) | ||
53 | #define cpu_to_be64(val) (__swab64((__uint64_t)(val))) | ||
54 | #define be16_to_cpu(val) (__swab16((__be16)(val))) | ||
55 | #define be32_to_cpu(val) (__swab32((__be32)(val))) | ||
56 | #define be64_to_cpu(val) (__swab64((__be64)(val))) | ||
57 | #endif | ||
58 | |||
43 | #endif /* __KERNEL__ */ | 59 | #endif /* __KERNEL__ */ |
44 | 60 | ||
45 | /* do we need conversion? */ | 61 | /* do we need conversion? */ |