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