types.h 982 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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 u32 dma_addr_t;
  34. #ifndef __s390x__
  35. typedef union {
  36. unsigned long long pair;
  37. struct {
  38. unsigned long even;
  39. unsigned long odd;
  40. } subreg;
  41. } register_pair;
  42. #endif /* ! __s390x__ */
  43. #endif /* __ASSEMBLY__ */
  44. #endif /* __KERNEL__ */
  45. #endif /* _S390_TYPES_H */