types.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #ifndef _ASM_GENERIC_TYPES_H
  2. #define _ASM_GENERIC_TYPES_H
  3. /*
  4. * int-ll64 is used practically everywhere now,
  5. * so use it as a reasonable default.
  6. */
  7. #include <asm-generic/int-ll64.h>
  8. #ifndef __ASSEMBLY__
  9. typedef unsigned short umode_t;
  10. #endif /* __ASSEMBLY__ */
  11. /*
  12. * These aren't exported outside the kernel to avoid name space clashes
  13. */
  14. #ifdef __KERNEL__
  15. #ifndef __ASSEMBLY__
  16. /*
  17. * DMA addresses may be very different from physical addresses
  18. * and pointers. i386 and powerpc may have 64 bit DMA on 32 bit
  19. * systems, while sparc64 uses 32 bit DMA addresses for 64 bit
  20. * physical addresses.
  21. * This default defines dma_addr_t to have the same size as
  22. * phys_addr_t, which is the most common way.
  23. * Do not define the dma64_addr_t type, which never really
  24. * worked.
  25. */
  26. #ifndef dma_addr_t
  27. #ifdef CONFIG_PHYS_ADDR_T_64BIT
  28. typedef u64 dma_addr_t;
  29. #else
  30. typedef u32 dma_addr_t;
  31. #endif /* CONFIG_PHYS_ADDR_T_64BIT */
  32. #endif /* dma_addr_t */
  33. #endif /* __ASSEMBLY__ */
  34. #endif /* __KERNEL__ */
  35. #endif /* _ASM_GENERIC_TYPES_H */