Linux 5.7.7
[linux/fpc-iii.git] / arch / arm / include / asm / unaligned.h
blobab905ffcf1930dd456601b21af4b9cd3b21c9ff6
1 #ifndef __ASM_ARM_UNALIGNED_H
2 #define __ASM_ARM_UNALIGNED_H
4 /*
5 * We generally want to set CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS on ARMv6+,
6 * but we don't want to use linux/unaligned/access_ok.h since that can lead
7 * to traps on unaligned stm/ldm or strd/ldrd.
8 */
9 #include <asm/byteorder.h>
11 #if defined(__LITTLE_ENDIAN)
12 # include <linux/unaligned/le_struct.h>
13 # include <linux/unaligned/be_byteshift.h>
14 # include <linux/unaligned/generic.h>
15 # define get_unaligned __get_unaligned_le
16 # define put_unaligned __put_unaligned_le
17 #elif defined(__BIG_ENDIAN)
18 # include <linux/unaligned/be_struct.h>
19 # include <linux/unaligned/le_byteshift.h>
20 # include <linux/unaligned/generic.h>
21 # define get_unaligned __get_unaligned_be
22 # define put_unaligned __put_unaligned_be
23 #else
24 # error need to define endianess
25 #endif
27 #endif /* __ASM_ARM_UNALIGNED_H */