types.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /*
  2. * This file is subject to the terms and conditions of the GNU General Public
  3. * License. See the file "COPYING" in the main directory of this archive
  4. * for more details.
  5. *
  6. * Copyright (C) 1994, 1995, 1996, 1999 by Ralf Baechle
  7. * Copyright (C) 1999 Silicon Graphics, Inc.
  8. */
  9. #ifndef _ASM_TYPES_H
  10. #define _ASM_TYPES_H
  11. #if _MIPS_SZLONG == 64
  12. # include <asm-generic/int-l64.h>
  13. #else
  14. # include <asm-generic/int-ll64.h>
  15. #endif
  16. #ifndef __ASSEMBLY__
  17. typedef unsigned short umode_t;
  18. #endif
  19. #endif /* __ASSEMBLY__ */
  20. /*
  21. * These aren't exported outside the kernel to avoid name space clashes
  22. */
  23. #ifdef __KERNEL__
  24. #define BITS_PER_LONG _MIPS_SZLONG
  25. #ifndef __ASSEMBLY__
  26. #if (defined(CONFIG_HIGHMEM) && defined(CONFIG_64BIT_PHYS_ADDR)) \
  27. || defined(CONFIG_64BIT)
  28. typedef u64 dma_addr_t;
  29. #else
  30. typedef u32 dma_addr_t;
  31. #endif
  32. typedef u64 dma64_addr_t;
  33. /*
  34. * Don't use phys_t. You've been warned.
  35. */
  36. #ifdef CONFIG_64BIT_PHYS_ADDR
  37. typedef unsigned long long phys_t;
  38. #else
  39. typedef unsigned long phys_t;
  40. #endif
  41. #endif /* __ASSEMBLY__ */
  42. #endif /* __KERNEL__ */
  43. #endif /* _ASM_TYPES_H */