blob: 8c28fde5eaa2a794fd8b31fd4a95e9e00699f3f5 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#ifndef _SPARC_TYPES_H
2#define _SPARC_TYPES_H
Linus Torvalds1da177e2005-04-16 15:20:36 -07003/*
Linus Torvalds1da177e2005-04-16 15:20:36 -07004 * 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 Ravnborgb444b9a2008-06-06 21:35:43 +020010
11#if defined(__sparc__) && defined(__arch64__)
12
13/*** SPARC 64 bit ***/
14#include <asm-generic/int-l64.h>
15
16#ifndef __ASSEMBLY__
17
18typedef 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
30typedef u32 dma_addr_t;
31typedef u64 dma64_addr_t;
32
33#endif /* __ASSEMBLY__ */
34
35#endif /* __KERNEL__ */
36#else
37
38/*** SPARC 32 bit ***/
H. Peter Anvina3727dc2008-04-06 10:35:12 -070039#include <asm-generic/int-ll64.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070040
41#ifndef __ASSEMBLY__
42
43typedef unsigned short umode_t;
44
Linus Torvalds1da177e2005-04-16 15:20:36 -070045#endif /* __ASSEMBLY__ */
46
47#ifdef __KERNEL__
48
49#define BITS_PER_LONG 32
50
51#ifndef __ASSEMBLY__
52
Linus Torvalds1da177e2005-04-16 15:20:36 -070053typedef u32 dma_addr_t;
54typedef u32 dma64_addr_t;
55
Linus Torvalds1da177e2005-04-16 15:20:36 -070056#endif /* __ASSEMBLY__ */
57
58#endif /* __KERNEL__ */
59
Sam Ravnborgb444b9a2008-06-06 21:35:43 +020060#endif /* defined(__sparc__) && defined(__arch64__) */
61
Linus Torvalds1da177e2005-04-16 15:20:36 -070062#endif /* defined(_SPARC_TYPES_H) */