Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | #ifndef _PPC_TYPES_H |
| 2 | #define _PPC_TYPES_H |
| 3 | |
| 4 | #ifndef __ASSEMBLY__ |
| 5 | |
| 6 | typedef __signed__ char __s8; |
| 7 | typedef unsigned char __u8; |
| 8 | |
| 9 | typedef __signed__ short __s16; |
| 10 | typedef unsigned short __u16; |
| 11 | |
| 12 | typedef __signed__ int __s32; |
| 13 | typedef unsigned int __u32; |
| 14 | |
| 15 | #if defined(__GNUC__) && !defined(__STRICT_ANSI__) |
| 16 | typedef __signed__ long long __s64; |
| 17 | typedef unsigned long long __u64; |
| 18 | #endif |
| 19 | |
| 20 | typedef struct { |
| 21 | __u32 u[4]; |
| 22 | } __vector128; |
| 23 | |
| 24 | /* |
| 25 | * XXX allowed outside of __KERNEL__ for now, until glibc gets |
| 26 | * a proper set of asm headers of its own. -- paulus |
| 27 | */ |
| 28 | typedef unsigned short umode_t; |
| 29 | |
| 30 | #endif /* __ASSEMBLY__ */ |
| 31 | |
| 32 | #ifdef __KERNEL__ |
| 33 | /* |
| 34 | * These aren't exported outside the kernel to avoid name space clashes |
| 35 | */ |
| 36 | #define BITS_PER_LONG 32 |
| 37 | |
| 38 | #ifndef __ASSEMBLY__ |
| 39 | |
| 40 | #include <linux/config.h> |
| 41 | |
| 42 | typedef signed char s8; |
| 43 | typedef unsigned char u8; |
| 44 | |
| 45 | typedef signed short s16; |
| 46 | typedef unsigned short u16; |
| 47 | |
| 48 | typedef signed int s32; |
| 49 | typedef unsigned int u32; |
| 50 | |
| 51 | typedef signed long long s64; |
| 52 | typedef unsigned long long u64; |
| 53 | |
| 54 | typedef __vector128 vector128; |
| 55 | |
| 56 | /* DMA addresses are 32-bits wide */ |
| 57 | typedef u32 dma_addr_t; |
| 58 | typedef u64 dma64_addr_t; |
| 59 | |
| 60 | #ifdef CONFIG_LBD |
| 61 | typedef u64 sector_t; |
| 62 | #define HAVE_SECTOR_T |
| 63 | #endif |
| 64 | |
| 65 | typedef unsigned int kmem_bufctl_t; |
| 66 | |
| 67 | #endif /* __ASSEMBLY__ */ |
| 68 | |
| 69 | #endif /* __KERNEL__ */ |
| 70 | |
| 71 | #endif |