unaligned.h 452 B

123456789101112131415161718
  1. #ifdef __KERNEL__
  2. #ifndef __PPC_UNALIGNED_H
  3. #define __PPC_UNALIGNED_H
  4. /*
  5. * The PowerPC can do unaligned accesses itself in big endian mode.
  6. *
  7. * The strange macros are there to make sure these can't
  8. * be misused in a way that makes them not work on other
  9. * architectures where unaligned accesses aren't as simple.
  10. */
  11. #define get_unaligned(ptr) (*(ptr))
  12. #define put_unaligned(val, ptr) ((void)( *(ptr) = (val) ))
  13. #endif
  14. #endif /* __KERNEL__ */