types.h 657 B

123456789101112131415161718192021222324252627282930313233343536
  1. #ifndef ASM_X86__TYPES_H
  2. #define ASM_X86__TYPES_H
  3. #include <asm-generic/int-ll64.h>
  4. #ifndef __ASSEMBLY__
  5. typedef unsigned short umode_t;
  6. #endif /* __ASSEMBLY__ */
  7. /*
  8. * These aren't exported outside the kernel to avoid name space clashes
  9. */
  10. #ifdef __KERNEL__
  11. #ifdef CONFIG_X86_32
  12. # define BITS_PER_LONG 32
  13. #else
  14. # define BITS_PER_LONG 64
  15. #endif
  16. #ifndef __ASSEMBLY__
  17. typedef u64 dma64_addr_t;
  18. #if defined(CONFIG_X86_64) || defined(CONFIG_HIGHMEM64G)
  19. /* DMA addresses come in 32-bit and 64-bit flavours. */
  20. typedef u64 dma_addr_t;
  21. #else
  22. typedef u32 dma_addr_t;
  23. #endif
  24. #endif /* __ASSEMBLY__ */
  25. #endif /* __KERNEL__ */
  26. #endif /* ASM_X86__TYPES_H */