Becky Bruce | 971dc77 | 2005-10-19 18:45:03 -0500 | [diff] [blame] | 1 | #ifndef _ASM_POWERPC_TYPES_H |
| 2 | #define _ASM_POWERPC_TYPES_H |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 3 | |
Ingo Molnar | fe33332 | 2009-01-06 14:26:03 +0000 | [diff] [blame] | 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__) |
H. Peter Anvin | 3f02c4e | 2008-04-06 10:35:09 -0700 | [diff] [blame] | 10 | # include <asm-generic/int-l64.h> |
| 11 | #else |
| 12 | # include <asm-generic/int-ll64.h> |
| 13 | #endif |
| 14 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 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 | |
Becky Bruce | 971dc77 | 2005-10-19 18:45:03 -0500 | [diff] [blame] | 30 | #ifdef __powerpc64__ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 31 | typedef unsigned int umode_t; |
Becky Bruce | 971dc77 | 2005-10-19 18:45:03 -0500 | [diff] [blame] | 32 | #else |
| 33 | typedef unsigned short umode_t; |
| 34 | #endif |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 35 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 36 | typedef struct { |
| 37 | __u32 u[4]; |
Mike Frysinger | fc624ea | 2007-07-15 13:36:09 +1000 | [diff] [blame] | 38 | } __attribute__((aligned(16))) __vector128; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 39 | |
| 40 | #endif /* __ASSEMBLY__ */ |
| 41 | |
| 42 | #ifdef __KERNEL__ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 43 | #ifndef __ASSEMBLY__ |
| 44 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 45 | typedef __vector128 vector128; |
| 46 | |
Becky Bruce | b957968 | 2008-09-12 10:53:43 +0000 | [diff] [blame] | 47 | #if defined(__powerpc64__) || defined(CONFIG_PHYS_64BIT) |
Stephen Rothwell | 8168f90 | 2005-10-25 16:56:43 +1000 | [diff] [blame] | 48 | typedef u64 dma_addr_t; |
| 49 | #else |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 50 | typedef u32 dma_addr_t; |
Stephen Rothwell | 8168f90 | 2005-10-25 16:56:43 +1000 | [diff] [blame] | 51 | #endif |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 52 | typedef u64 dma64_addr_t; |
| 53 | |
| 54 | typedef struct { |
| 55 | unsigned long entry; |
| 56 | unsigned long toc; |
| 57 | unsigned long env; |
| 58 | } func_descr_t; |
| 59 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 60 | #endif /* __ASSEMBLY__ */ |
| 61 | |
| 62 | #endif /* __KERNEL__ */ |
| 63 | |
Becky Bruce | 971dc77 | 2005-10-19 18:45:03 -0500 | [diff] [blame] | 64 | #endif /* _ASM_POWERPC_TYPES_H */ |