Skip to content

Commit

Permalink
[XFS] merge xfs_arch.h userspace changes back
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Christoph Hellwig authored and Nathan Scott committed Jan 11, 2006
1 parent f60d366 commit d3a9b1f
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions fs/xfs/xfs_arch.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,22 @@
#undef XFS_NATIVE_HOST
#endif

#ifdef XFS_NATIVE_HOST
#define cpu_to_be16(val) ((__be16)(val))
#define cpu_to_be32(val) ((__be32)(val))
#define cpu_to_be64(val) ((__be64)(val))
#define be16_to_cpu(val) ((__uint16_t)(val)
#define be32_to_cpu(val) ((__uint32_t)(val))
#define be64_to_cpu(val) ((__uint64_t)(val))
#else
#define cpu_to_be16(val) (__swab16((__uint16_t)(val)))
#define cpu_to_be32(val) (__swab32((__uint32_t)(val)))
#define cpu_to_be64(val) (__swab64((__uint64_t)(val)))
#define be16_to_cpu(val) (__swab16((__be16)(val)))
#define be32_to_cpu(val) (__swab32((__be32)(val)))
#define be64_to_cpu(val) (__swab64((__be64)(val)))
#endif

#endif /* __KERNEL__ */

/* do we need conversion? */
Expand Down

0 comments on commit d3a9b1f

Please sign in to comment.