types.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /*
  2. * include/asm-xtensa/types.h
  3. *
  4. * This file is subject to the terms and conditions of the GNU General Public
  5. * License. See the file "COPYING" in the main directory of this archive
  6. * for more details.
  7. *
  8. * Copyright (C) 2001 - 2005 Tensilica Inc.
  9. */
  10. #ifndef _XTENSA_TYPES_H
  11. #define _XTENSA_TYPES_H
  12. #ifndef __ASSEMBLY__
  13. typedef unsigned short umode_t;
  14. /*
  15. * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the
  16. * header files exported to user space
  17. */
  18. typedef __signed__ char __s8;
  19. typedef unsigned char __u8;
  20. typedef __signed__ short __s16;
  21. typedef unsigned short __u16;
  22. typedef __signed__ int __s32;
  23. typedef unsigned int __u32;
  24. #if defined(__GNUC__) && !defined(__STRICT_ANSI__)
  25. typedef __signed__ long long __s64;
  26. typedef unsigned long long __u64;
  27. #endif
  28. /*
  29. * These aren't exported outside the kernel to avoid name space clashes
  30. */
  31. #ifdef __KERNEL__
  32. typedef __signed__ char s8;
  33. typedef unsigned char u8;
  34. typedef __signed__ short s16;
  35. typedef unsigned short u16;
  36. typedef __signed__ int s32;
  37. typedef unsigned int u32;
  38. typedef __signed__ long long s64;
  39. typedef unsigned long long u64;
  40. #define BITS_PER_LONG 32
  41. /* Dma addresses are 32-bits wide. */
  42. typedef u32 dma_addr_t;
  43. #endif /* __KERNEL__ */
  44. #endif
  45. #endif /* _XTENSA_TYPES_H */