Index: kernel/arch/amd64/include/byteorder.h
===================================================================
--- kernel/arch/amd64/include/byteorder.h	(revision 058b021e12166270a97cf3aaf8f91a30aedc513c)
+++ kernel/arch/amd64/include/byteorder.h	(revision c55dd5898c757f39330d775b262957e173319714)
@@ -36,7 +36,12 @@
 #define KERN_amd64_BYTEORDER_H_
 
+#include <byteorder.h>
+
 /* AMD64 is little-endian */
-#define unative_t_le2host(n)		(n)
+#define uint32_t_le2host(n)		(n)
 #define uint64_t_le2host(n)		(n)
+
+#define uint32_t_be2host(n)		uint64_t_byteorder_swap(n)
+#define uint64_t_be2host(n)		uint32_t_byteorder_swap(n)
 
 #endif
Index: kernel/arch/ia32/include/byteorder.h
===================================================================
--- kernel/arch/ia32/include/byteorder.h	(revision 058b021e12166270a97cf3aaf8f91a30aedc513c)
+++ kernel/arch/ia32/include/byteorder.h	(revision c55dd5898c757f39330d775b262957e173319714)
@@ -36,7 +36,12 @@
 #define KERN_ia32_BYTEORDER_H_
 
+#include <byteorder.h>
+
 /* IA-32 is little-endian */
-#define unative_t_le2host(n)		(n)
+#define uint32_t_le2host(n)		(n)
 #define uint64_t_le2host(n)		(n)
+
+#define uint32_t_be2host(n)		uint64_t_byteorder_swap(n)
+#define uint64_t_be2host(n)		uint32_t_byteorder_swap(n)
 
 #endif
Index: kernel/arch/ia64/include/byteorder.h
===================================================================
--- kernel/arch/ia64/include/byteorder.h	(revision 058b021e12166270a97cf3aaf8f91a30aedc513c)
+++ kernel/arch/ia64/include/byteorder.h	(revision c55dd5898c757f39330d775b262957e173319714)
@@ -36,7 +36,12 @@
 #define KERN_ia64_BYTEORDER_H_
 
+#include <byteorder.h>
+
 /* IA-64 is little-endian */
-#define unative_t_le2host(n)		(n)
+#define uint32_t_le2host(n)		(n)
 #define uint64_t_le2host(n)		(n)
+
+#define uint32_t_be2host(n)		uint64_t_byteorder_swap(n)
+#define uint64_t_be2host(n)		uint32_t_byteorder_swap(n)
 
 #endif
Index: kernel/arch/mips32/include/byteorder.h
===================================================================
--- kernel/arch/mips32/include/byteorder.h	(revision 058b021e12166270a97cf3aaf8f91a30aedc513c)
+++ kernel/arch/mips32/include/byteorder.h	(revision c55dd5898c757f39330d775b262957e173319714)
@@ -36,21 +36,22 @@
 #define KERN_mips32_BYTEORDER_H_
 
-#include <arch/types.h>
 #include <byteorder.h>
 
 #ifdef BIG_ENDIAN
-static inline uint64_t uint64_t_le2host(uint64_t n)
-{
-	return uint64_t_byteorder_swap(n);
-}
 
-static inline unative_t unative_t_le2host(unative_t n)
-{
-	return uint32_t_byteorder_swap(n);
-}
+#define uint32_t_le2host(n)		uint64_t_byteorder_swap(n)
+#define uint64_t_le2host(n)		uint32_t_byteorder_swap(n)
+
+#define uint32_t_be2host(n)		(n)
+#define uint64_t_be2host(n)		(n)
 
 #else
-#  define unative_t_le2host(n)		(n)
-#  define uint64_t_le2host(n)		(n)
+
+#define uint32_t_le2host(n)		(n)
+#define uint64_t_le2host(n)		(n)
+
+#define uint32_t_be2host(n)		uint64_t_byteorder_swap(n)
+#define uint64_t_be2host(n)		uint32_t_byteorder_swap(n)
+
 #endif
 
Index: kernel/arch/ppc32/include/byteorder.h
===================================================================
--- kernel/arch/ppc32/include/byteorder.h	(revision 058b021e12166270a97cf3aaf8f91a30aedc513c)
+++ kernel/arch/ppc32/include/byteorder.h	(revision c55dd5898c757f39330d775b262957e173319714)
@@ -36,35 +36,11 @@
 #define KERN_ppc32_BYTEORDER_H_
 
-#include <arch/types.h>
 #include <byteorder.h>
 
-#define BIG_ENDIAN
+#define uint32_t_le2host(n)		uint64_t_byteorder_swap(n)
+#define uint64_t_le2host(n)		uint32_t_byteorder_swap(n)
 
-static inline uint64_t uint64_t_le2host(uint64_t n)
-{
-	return uint64_t_byteorder_swap(n);
-}
-
-
-/** Convert little-endian unative_t to host unative_t
- *
- * Convert little-endian unative_t parameter to host endianess.
- *
- * @param n Little-endian unative_t argument.
- *
- * @return Result in host endianess.
- *
- */
-static inline unative_t unative_t_le2host(unative_t n)
-{
-	uintptr_t v;
-	
-	asm volatile (
-		"lwbrx %0, %1, %2\n"
-		: "=r" (v)
-		: "i" (0), "r" (&n)
-	);
-	return v;
-}
+#define uint32_t_be2host(n)		(n)
+#define uint64_t_be2host(n)		(n)
 
 #endif
Index: kernel/arch/ppc64/include/byteorder.h
===================================================================
--- kernel/arch/ppc64/include/byteorder.h	(revision 058b021e12166270a97cf3aaf8f91a30aedc513c)
+++ kernel/arch/ppc64/include/byteorder.h	(revision c55dd5898c757f39330d775b262957e173319714)
@@ -36,35 +36,11 @@
 #define KERN_ppc64_BYTEORDER_H_
 
-#include <arch/types.h>
 #include <byteorder.h>
 
-#define BIG_ENDIAN
+#define uint32_t_le2host(n)		uint64_t_byteorder_swap(n)
+#define uint64_t_le2host(n)		uint32_t_byteorder_swap(n)
 
-static inline uint64_t uint64_t_le2host(uint64_t n)
-{
-	return uint64_t_byteorder_swap(n);
-}
-
-
-/** Convert little-endian unative_t to host unative_t
- *
- * Convert little-endian unative_t parameter to host endianess.
- *
- * @param n Little-endian unative_t argument.
- *
- * @return Result in host endianess.
- *
- */
-static inline unative_t unative_t_le2host(unative_t n)
-{
-	uintptr_t v;
-	
-	asm volatile (
-		"lwbrx %0, %1, %2\n"
-		: "=r" (v)
-		: "i" (0), "r" (&n)
-	);
-	return v;
-}
+#define uint32_t_be2host(n)		(n)
+#define uint64_t_be2host(n)		(n)
 
 #endif
Index: kernel/arch/sparc64/include/byteorder.h
===================================================================
--- kernel/arch/sparc64/include/byteorder.h	(revision 058b021e12166270a97cf3aaf8f91a30aedc513c)
+++ kernel/arch/sparc64/include/byteorder.h	(revision c55dd5898c757f39330d775b262957e173319714)
@@ -36,16 +36,11 @@
 #define KERN_sparc64_BYTEORDER_H_
 
-#include <arch/types.h>
 #include <byteorder.h>
 
-static inline uint64_t uint64_t_le2host(uint64_t n)
-{
-	return uint64_t_byteorder_swap(n);
-}
+#define uint32_t_le2host(n)		uint64_t_byteorder_swap(n)
+#define uint64_t_le2host(n)		uint32_t_byteorder_swap(n)
 
-static inline unative_t unative_t_le2host(unative_t n)
-{
-	return uint64_t_byteorder_swap(n);
-}
+#define uint32_t_be2host(n)		(n)
+#define uint64_t_be2host(n)		(n)
 
 #endif
