Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland...
[sfrench/cifs-2.6.git] / arch / sparc / include / asm / types.h
1 #ifndef _SPARC_TYPES_H
2 #define _SPARC_TYPES_H
3 /*
4  * This file is never included by application software unless
5  * explicitly requested (e.g., via linux/types.h) in which case the
6  * application is Linux specific so (user-) name space pollution is
7  * not a major issue.  However, for interoperability, libraries still
8  * need to be careful to avoid a name clashes.
9  */
10
11 #if defined(__sparc__) && defined(__arch64__)
12
13 /*** SPARC 64 bit ***/
14 #include <asm-generic/int-ll64.h>
15
16 #ifndef __ASSEMBLY__
17
18 typedef unsigned short umode_t;
19
20 #endif /* __ASSEMBLY__ */
21
22 #ifdef __KERNEL__
23
24 #define BITS_PER_LONG 64
25
26 #ifndef __ASSEMBLY__
27
28 /* Dma addresses come in generic and 64-bit flavours.  */
29
30 typedef u32 dma_addr_t;
31 typedef u64 dma64_addr_t;
32
33 #endif /* __ASSEMBLY__ */
34
35 #endif /* __KERNEL__ */
36 #else
37
38 /*** SPARC 32 bit ***/
39 #include <asm-generic/int-ll64.h>
40
41 #ifndef __ASSEMBLY__
42
43 typedef unsigned short umode_t;
44
45 #endif /* __ASSEMBLY__ */
46
47 #ifdef __KERNEL__
48
49 #define BITS_PER_LONG 32
50
51 #ifndef __ASSEMBLY__
52
53 typedef u32 dma_addr_t;
54 typedef u32 dma64_addr_t;
55
56 #endif /* __ASSEMBLY__ */
57
58 #endif /* __KERNEL__ */
59
60 #endif /* defined(__sparc__) && defined(__arch64__) */
61
62 #endif /* defined(_SPARC_TYPES_H) */