Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | #ifndef _SPARC_TYPES_H |
| 2 | #define _SPARC_TYPES_H |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 3 | /* |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 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 | */ |
Sam Ravnborg | b444b9a | 2008-06-06 21:35:43 +0200 | [diff] [blame] | 10 | |
| 11 | #if defined(__sparc__) && defined(__arch64__) |
| 12 | |
| 13 | /*** SPARC 64 bit ***/ |
| 14 | #include <asm-generic/int-l64.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 ***/ |
H. Peter Anvin | a3727dc | 2008-04-06 10:35:12 -0700 | [diff] [blame] | 39 | #include <asm-generic/int-ll64.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 40 | |
| 41 | #ifndef __ASSEMBLY__ |
| 42 | |
| 43 | typedef unsigned short umode_t; |
| 44 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 45 | #endif /* __ASSEMBLY__ */ |
| 46 | |
| 47 | #ifdef __KERNEL__ |
| 48 | |
| 49 | #define BITS_PER_LONG 32 |
| 50 | |
| 51 | #ifndef __ASSEMBLY__ |
| 52 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 53 | typedef u32 dma_addr_t; |
| 54 | typedef u32 dma64_addr_t; |
| 55 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 56 | #endif /* __ASSEMBLY__ */ |
| 57 | |
| 58 | #endif /* __KERNEL__ */ |
| 59 | |
Sam Ravnborg | b444b9a | 2008-06-06 21:35:43 +0200 | [diff] [blame] | 60 | #endif /* defined(__sparc__) && defined(__arch64__) */ |
| 61 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 62 | #endif /* defined(_SPARC_TYPES_H) */ |