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