types.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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. #ifdef __ASSEMBLY__
  13. # define __XTENSA_UL(x) (x)
  14. # define __XTENSA_UL_CONST(x) x
  15. #else
  16. # define __XTENSA_UL(x) ((unsigned long)(x))
  17. # define __XTENSA_UL_CONST(x) x##UL
  18. #endif
  19. #ifndef __ASSEMBLY__
  20. typedef unsigned short umode_t;
  21. /*
  22. * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the
  23. * header files exported to user space
  24. */
  25. typedef __signed__ char __s8;
  26. typedef unsigned char __u8;
  27. typedef __signed__ short __s16;
  28. typedef unsigned short __u16;
  29. typedef __signed__ int __s32;
  30. typedef unsigned int __u32;
  31. #if defined(__GNUC__)
  32. __extension__ typedef __signed__ long long __s64;
  33. __extension__ typedef unsigned long long __u64;
  34. #endif
  35. /*
  36. * These aren't exported outside the kernel to avoid name space clashes
  37. */
  38. #ifdef __KERNEL__
  39. typedef __signed__ char s8;
  40. typedef unsigned char u8;
  41. typedef __signed__ short s16;
  42. typedef unsigned short u16;
  43. typedef __signed__ int s32;
  44. typedef unsigned int u32;
  45. typedef __signed__ long long s64;
  46. typedef unsigned long long u64;
  47. #define BITS_PER_LONG 32
  48. /* Dma addresses are 32-bits wide. */
  49. typedef u32 dma_addr_t;
  50. #endif /* __KERNEL__ */
  51. #endif
  52. #endif /* _XTENSA_TYPES_H */