blob: 8296381ae43294e679976f6a82d3bb936d64921f [file] [log] [blame]
jdl@freescale.coma37c8872005-09-07 15:27:09 -05001#ifndef _ASM_POWERPC_UNALIGNED_H
2#define _ASM_POWERPC_UNALIGNED_H
3
Linus Torvalds1da177e2005-04-16 15:20:36 -07004#ifdef __KERNEL__
Linus Torvalds1da177e2005-04-16 15:20:36 -07005
6/*
Rajesh B Prathipatie8a00ad2013-12-16 18:58:22 +11007 * The PowerPC can do unaligned accesses itself based on its endian mode.
Linus Torvalds1da177e2005-04-16 15:20:36 -07008 */
Harvey Harrison6510d412008-04-29 01:03:30 -07009#include <linux/unaligned/access_ok.h>
10#include <linux/unaligned/generic.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070011
Rajesh B Prathipatie8a00ad2013-12-16 18:58:22 +110012#ifdef __LITTLE_ENDIAN__
13#define get_unaligned __get_unaligned_le
14#define put_unaligned __put_unaligned_le
15#else
Harvey Harrison6510d412008-04-29 01:03:30 -070016#define get_unaligned __get_unaligned_be
17#define put_unaligned __put_unaligned_be
Rajesh B Prathipatie8a00ad2013-12-16 18:58:22 +110018#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -070019
jdl@freescale.coma37c8872005-09-07 15:27:09 -050020#endif /* __KERNEL__ */
21#endif /* _ASM_POWERPC_UNALIGNED_H */