types.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /*
  2. * include/asm-s390/types.h
  3. *
  4. * S390 version
  5. *
  6. * Derived from "include/asm-i386/types.h"
  7. */
  8. #ifndef _S390_TYPES_H
  9. #define _S390_TYPES_H
  10. #ifndef __s390x__
  11. # include <asm-generic/int-ll64.h>
  12. #else
  13. # include <asm-generic/int-l64.h>
  14. #endif
  15. #ifndef __ASSEMBLY__
  16. typedef unsigned short umode_t;
  17. /* A address type so that arithmetic can be done on it & it can be upgraded to
  18. 64 bit when necessary
  19. */
  20. typedef unsigned long addr_t;
  21. typedef __signed__ long saddr_t;
  22. #endif /* __ASSEMBLY__ */
  23. /*
  24. * These aren't exported outside the kernel to avoid name space clashes
  25. */
  26. #ifdef __KERNEL__
  27. #ifndef __s390x__
  28. #define BITS_PER_LONG 32
  29. #else
  30. #define BITS_PER_LONG 64
  31. #endif
  32. #ifndef __ASSEMBLY__
  33. typedef u64 dma64_addr_t;
  34. #ifdef __s390x__
  35. /* DMA addresses come in 32-bit and 64-bit flavours. */
  36. typedef u64 dma_addr_t;
  37. #else
  38. typedef u32 dma_addr_t;
  39. #endif
  40. #ifndef __s390x__
  41. typedef union {
  42. unsigned long long pair;
  43. struct {
  44. unsigned long even;
  45. unsigned long odd;
  46. } subreg;
  47. } register_pair;
  48. #endif /* ! __s390x__ */
  49. #endif /* __ASSEMBLY__ */
  50. #endif /* __KERNEL__ */
  51. #endif /* _S390_TYPES_H */