Merge branch 'core-v28-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / arch / powerpc / include / asm / types.h
blobc004c13f291e771fa63a6f842094b3faacee7037
1 #ifndef _ASM_POWERPC_TYPES_H
2 #define _ASM_POWERPC_TYPES_H
4 #ifdef __powerpc64__
5 # include <asm-generic/int-l64.h>
6 #else
7 # include <asm-generic/int-ll64.h>
8 #endif
10 #ifndef __ASSEMBLY__
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.
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.
25 #ifdef __powerpc64__
26 typedef unsigned int umode_t;
27 #else
28 typedef unsigned short umode_t;
29 #endif
31 typedef struct {
32 __u32 u[4];
33 } __attribute__((aligned(16))) __vector128;
35 #endif /* __ASSEMBLY__ */
37 #ifdef __KERNEL__
39 * These aren't exported outside the kernel to avoid name space clashes
41 #ifdef __powerpc64__
42 #define BITS_PER_LONG 64
43 #else
44 #define BITS_PER_LONG 32
45 #endif
47 #ifndef __ASSEMBLY__
49 typedef __vector128 vector128;
51 #if defined(__powerpc64__) || defined(CONFIG_PHYS_64BIT)
52 typedef u64 dma_addr_t;
53 #else
54 typedef u32 dma_addr_t;
55 #endif
56 typedef u64 dma64_addr_t;
58 typedef struct {
59 unsigned long entry;
60 unsigned long toc;
61 unsigned long env;
62 } func_descr_t;
64 #endif /* __ASSEMBLY__ */
66 #endif /* __KERNEL__ */
68 #endif /* _ASM_POWERPC_TYPES_H */