]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
[XFS] merge xfs_arch.h userspace changes back
authorChristoph Hellwig <hch@sgi.com>
Wed, 11 Jan 2006 04:23:43 +0000 (15:23 +1100)
committerNathan Scott <nathans@sgi.com>
Wed, 11 Jan 2006 04:23:43 +0000 (15:23 +1100)
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>
fs/xfs/xfs_arch.h

index 68e5051d8e249cbc89a8d3aec50df12548e248a1..f1aeda599eb109f98dec6e6b7cd71275d4eab0aa 100644 (file)
 #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? */