types.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. #ifndef __ASM_SH64_TYPES_H
  2. #define __ASM_SH64_TYPES_H
  3. /*
  4. * This file is subject to the terms and conditions of the GNU General Public
  5. * License. See the file "COPYING" in the main directory of this archive
  6. * for more details.
  7. *
  8. * include/asm-sh64/types.h
  9. *
  10. * Copyright (C) 2000, 2001 Paolo Alberelli
  11. *
  12. */
  13. #ifndef __ASSEMBLY__
  14. typedef unsigned short umode_t;
  15. /*
  16. * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the
  17. * header files exported to user space
  18. */
  19. typedef __signed__ char __s8;
  20. typedef unsigned char __u8;
  21. typedef __signed__ short __s16;
  22. typedef unsigned short __u16;
  23. typedef __signed__ int __s32;
  24. typedef unsigned int __u32;
  25. #if defined(__GNUC__) && !defined(__STRICT_ANSI__)
  26. typedef __signed__ long long __s64;
  27. typedef unsigned long long __u64;
  28. #endif
  29. #endif /* __ASSEMBLY__ */
  30. /*
  31. * These aren't exported outside the kernel to avoid name space clashes
  32. */
  33. #ifdef __KERNEL__
  34. #ifndef __ASSEMBLY__
  35. typedef __signed__ char s8;
  36. typedef unsigned char u8;
  37. typedef __signed__ short s16;
  38. typedef unsigned short u16;
  39. typedef __signed__ int s32;
  40. typedef unsigned int u32;
  41. typedef __signed__ long long s64;
  42. typedef unsigned long long u64;
  43. /* DMA addresses come in generic and 64-bit flavours. */
  44. #ifdef CONFIG_HIGHMEM64G
  45. typedef u64 dma_addr_t;
  46. #else
  47. typedef u32 dma_addr_t;
  48. #endif
  49. typedef u64 dma64_addr_t;
  50. #endif /* __ASSEMBLY__ */
  51. #define BITS_PER_LONG 32
  52. #endif /* __KERNEL__ */
  53. #endif /* __ASM_SH64_TYPES_H */