Skip to contentSkip to conversation

powerpc: compat: 32 bit little endian machine name is ppcle, not ppc

PATCH New Anton Blanchard 1 participant 1 message Mar 6, 2014 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc: compat: 32 bit little endian machine name is ppcle, not ppc

I noticed this when testing setarch. No, we don't magically support a big endian userspace on a little endian kernel.

---

arch/powerpc/include/asm/compat.h +4 -0
index 84fdf68..ef22898 100644
@@ -8,7 +8,11 @@
 #include <linux/sched.h>
 
 #define COMPAT_USER_HZ		100
+#ifdef __BIG_ENDIAN__
 #define COMPAT_UTS_MACHINE	"ppc\0\0"
+#else
+#define COMPAT_UTS_MACHINE	"ppcle\0\0"
+#endif
 
 typedef u32		compat_size_t;
 typedef s32		compat_ssize_t;