Commit | Line | Data |
---|---|---|
971dc77b BB |
1 | #ifndef _ASM_POWERPC_TYPES_H |
2 | #define _ASM_POWERPC_TYPES_H | |
1da177e4 | 3 | |
3f02c4e0 PA |
4 | #ifdef __powerpc64__ |
5 | # include <asm-generic/int-l64.h> | |
6 | #else | |
7 | # include <asm-generic/int-ll64.h> | |
8 | #endif | |
9 | ||
1da177e4 LT |
10 | #ifndef __ASSEMBLY__ |
11 | ||
12 | /* | |
13 | * This file is never included by application software unless | |
14 | * explicitly requested (e.g., via linux/types.h) in which case the | |
15 | * application is Linux specific so (user-) name space pollution is | |
16 | * not a major issue. However, for interoperability, libraries still | |
17 | * need to be careful to avoid a name clashes. | |
18 | * | |
19 | * This program is free software; you can redistribute it and/or | |
20 | * modify it under the terms of the GNU General Public License | |
21 | * as published by the Free Software Foundation; either version | |
22 | * 2 of the License, or (at your option) any later version. | |
23 | */ | |
24 | ||
971dc77b | 25 | #ifdef __powerpc64__ |
1da177e4 | 26 | typedef unsigned int umode_t; |
971dc77b BB |
27 | #else |
28 | typedef unsigned short umode_t; | |
29 | #endif | |
1da177e4 | 30 | |
1da177e4 LT |
31 | typedef struct { |
32 | __u32 u[4]; | |
fc624eae | 33 | } __attribute__((aligned(16))) __vector128; |
1da177e4 LT |
34 | |
35 | #endif /* __ASSEMBLY__ */ | |
36 | ||
37 | #ifdef __KERNEL__ | |
38 | /* | |
39 | * These aren't exported outside the kernel to avoid name space clashes | |
40 | */ | |
971dc77b | 41 | #ifdef __powerpc64__ |
1da177e4 | 42 | #define BITS_PER_LONG 64 |
971dc77b BB |
43 | #else |
44 | #define BITS_PER_LONG 32 | |
45 | #endif | |
1da177e4 LT |
46 | |
47 | #ifndef __ASSEMBLY__ | |
48 | ||
1da177e4 LT |
49 | typedef __vector128 vector128; |
50 | ||
d04ceb3f KG |
51 | /* Physical address used by some IO functions */ |
52 | #if defined(CONFIG_PPC64) || defined(CONFIG_PHYS_64BIT) | |
53 | typedef u64 phys_addr_t; | |
54 | #else | |
55 | typedef u32 phys_addr_t; | |
56 | #endif | |
57 | ||
8168f902 SR |
58 | #ifdef __powerpc64__ |
59 | typedef u64 dma_addr_t; | |
60 | #else | |
1da177e4 | 61 | typedef u32 dma_addr_t; |
8168f902 | 62 | #endif |
1da177e4 LT |
63 | typedef u64 dma64_addr_t; |
64 | ||
65 | typedef struct { | |
66 | unsigned long entry; | |
67 | unsigned long toc; | |
68 | unsigned long env; | |
69 | } func_descr_t; | |
70 | ||
1da177e4 LT |
71 | #endif /* __ASSEMBLY__ */ |
72 | ||
73 | #endif /* __KERNEL__ */ | |
74 | ||
971dc77b | 75 | #endif /* _ASM_POWERPC_TYPES_H */ |