types.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. #ifndef _SPARC_TYPES_H
  2. #define _SPARC_TYPES_H
  3. /*
  4. * This file is never included by application software unless
  5. * explicitly requested (e.g., via linux/types.h) in which case the
  6. * application is Linux specific so (user-) name space pollution is
  7. * not a major issue. However, for interoperability, libraries still
  8. * need to be careful to avoid a name clashes.
  9. */
  10. #if defined(__sparc__) && defined(__arch64__)
  11. /*** SPARC 64 bit ***/
  12. #include <asm-generic/int-l64.h>
  13. #ifndef __ASSEMBLY__
  14. typedef unsigned short umode_t;
  15. #endif /* __ASSEMBLY__ */
  16. #ifdef __KERNEL__
  17. #define BITS_PER_LONG 64
  18. #ifndef __ASSEMBLY__
  19. /* Dma addresses come in generic and 64-bit flavours. */
  20. typedef u32 dma_addr_t;
  21. typedef u64 dma64_addr_t;
  22. #endif /* __ASSEMBLY__ */
  23. #endif /* __KERNEL__ */
  24. #else
  25. /*** SPARC 32 bit ***/
  26. #include <asm-generic/int-ll64.h>
  27. #ifndef __ASSEMBLY__
  28. typedef unsigned short umode_t;
  29. #endif /* __ASSEMBLY__ */
  30. #ifdef __KERNEL__
  31. #define BITS_PER_LONG 32
  32. #ifndef __ASSEMBLY__
  33. typedef u32 dma_addr_t;
  34. typedef u32 dma64_addr_t;
  35. #endif /* __ASSEMBLY__ */
  36. #endif /* __KERNEL__ */
  37. #endif /* defined(__sparc__) && defined(__arch64__) */
  38. #endif /* defined(_SPARC_TYPES_H) */