unaligned.h 846 B

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