18c2ecf20Sopenharmony_ci#ifndef __ASM_ARM_UNALIGNED_H
28c2ecf20Sopenharmony_ci#define __ASM_ARM_UNALIGNED_H
38c2ecf20Sopenharmony_ci
48c2ecf20Sopenharmony_ci/*
58c2ecf20Sopenharmony_ci * We generally want to set CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS on ARMv6+,
68c2ecf20Sopenharmony_ci * but we don't want to use linux/unaligned/access_ok.h since that can lead
78c2ecf20Sopenharmony_ci * to traps on unaligned stm/ldm or strd/ldrd.
88c2ecf20Sopenharmony_ci */
98c2ecf20Sopenharmony_ci#include <asm/byteorder.h>
108c2ecf20Sopenharmony_ci
118c2ecf20Sopenharmony_ci#if defined(__LITTLE_ENDIAN)
128c2ecf20Sopenharmony_ci# include <linux/unaligned/le_struct.h>
138c2ecf20Sopenharmony_ci# include <linux/unaligned/be_byteshift.h>
148c2ecf20Sopenharmony_ci# include <linux/unaligned/generic.h>
158c2ecf20Sopenharmony_ci# define get_unaligned	__get_unaligned_le
168c2ecf20Sopenharmony_ci# define put_unaligned	__put_unaligned_le
178c2ecf20Sopenharmony_ci#elif defined(__BIG_ENDIAN)
188c2ecf20Sopenharmony_ci# include <linux/unaligned/be_struct.h>
198c2ecf20Sopenharmony_ci# include <linux/unaligned/le_byteshift.h>
208c2ecf20Sopenharmony_ci# include <linux/unaligned/generic.h>
218c2ecf20Sopenharmony_ci# define get_unaligned	__get_unaligned_be
228c2ecf20Sopenharmony_ci# define put_unaligned	__put_unaligned_be
238c2ecf20Sopenharmony_ci#else
248c2ecf20Sopenharmony_ci# error need to define endianess
258c2ecf20Sopenharmony_ci#endif
268c2ecf20Sopenharmony_ci
278c2ecf20Sopenharmony_ci#endif /* __ASM_ARM_UNALIGNED_H */
28