patch-2.0.4 linux/include/asm-ppc/unaligned.h

Next file: linux/include/asm-ppc/unistd.h
Previous file: linux/include/asm-ppc/ppc_machine.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.0.3/linux/include/asm-ppc/unaligned.h linux/include/asm-ppc/unaligned.h
@@ -0,0 +1,16 @@
+#ifndef __PPC_UNALIGNED_H
+#define __PPC_UNALIGNED_H
+
+/*
+ * The PowerPC can do unaligned accesses itself in big endian mode. 
+ *
+ * The strange macros are there to make sure these can't
+ * be misused in a way that makes them not work on other
+ * architectures where unaligned accesses aren't as simple.
+ */
+
+#define get_unaligned(ptr) (*(ptr))
+
+#define put_unaligned(val, ptr) ((void)( *(ptr) = (val) ))
+
+#endif

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov