bitfield.h 766 B

123456789101112131415161718192021222324252627282930
  1. /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
  2. /*
  3. * This file is subject to the terms and conditions of the GNU General Public
  4. * License. See the file "COPYING" in the main directory of this archive
  5. * for more details.
  6. *
  7. * Copyright (C) 2014 by Ralf Baechle <[email protected]>
  8. */
  9. #ifndef __UAPI_ASM_BITFIELD_H
  10. #define __UAPI_ASM_BITFIELD_H
  11. /*
  12. * * Damn ... bitfields depend from byteorder :-(
  13. * */
  14. #ifdef __MIPSEB__
  15. #define __BITFIELD_FIELD(field, more) \
  16. field; \
  17. more
  18. #elif defined(__MIPSEL__)
  19. #define __BITFIELD_FIELD(field, more) \
  20. more \
  21. field;
  22. #else /* !defined (__MIPSEB__) && !defined (__MIPSEL__) */
  23. #error "MIPS but neither __MIPSEL__ nor __MIPSEB__?"
  24. #endif
  25. #endif /* __UAPI_ASM_BITFIELD_H */