types.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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 /* __ASSEMBLY__ */
  19. /*
  20. * These aren't exported outside the kernel to avoid name space clashes
  21. */
  22. #ifdef __KERNEL__
  23. #define BITS_PER_LONG _MIPS_SZLONG
  24. #ifndef __ASSEMBLY__
  25. #if (defined(CONFIG_HIGHMEM) && defined(CONFIG_64BIT_PHYS_ADDR)) \
  26. || defined(CONFIG_64BIT)
  27. typedef u64 dma_addr_t;
  28. #else
  29. typedef u32 dma_addr_t;
  30. #endif
  31. typedef u64 dma64_addr_t;
  32. /*
  33. * Don't use phys_t. You've been warned.
  34. */
  35. #ifdef CONFIG_64BIT_PHYS_ADDR
  36. typedef unsigned long long phys_t;
  37. #else
  38. typedef unsigned long phys_t;
  39. #endif
  40. #endif /* __ASSEMBLY__ */
  41. #endif /* __KERNEL__ */
  42. #endif /* _ASM_TYPES_H */