aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/asm-powerpc/types.h (renamed from include/asm-ppc64/types.h)31
-rw-r--r--include/asm-ppc/types.h69
2 files changed, 28 insertions, 72 deletions
diff --git a/include/asm-ppc64/types.h b/include/asm-powerpc/types.h
index bf294c1761b2..7d803cb547bb 100644
--- a/include/asm-ppc64/types.h
+++ b/include/asm-powerpc/types.h
@@ -1,5 +1,5 @@
1#ifndef _PPC64_TYPES_H 1#ifndef _ASM_POWERPC_TYPES_H
2#define _PPC64_TYPES_H 2#define _ASM_POWERPC_TYPES_H
3 3
4#ifndef __ASSEMBLY__ 4#ifndef __ASSEMBLY__
5 5
@@ -16,7 +16,11 @@
16 * 2 of the License, or (at your option) any later version. 16 * 2 of the License, or (at your option) any later version.
17 */ 17 */
18 18
19#ifdef __powerpc64__
19typedef unsigned int umode_t; 20typedef unsigned int umode_t;
21#else
22typedef unsigned short umode_t;
23#endif
20 24
21/* 25/*
22 * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the 26 * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the
@@ -32,8 +36,15 @@ typedef unsigned short __u16;
32typedef __signed__ int __s32; 36typedef __signed__ int __s32;
33typedef unsigned int __u32; 37typedef unsigned int __u32;
34 38
39#ifdef __powerpc64__
35typedef __signed__ long __s64; 40typedef __signed__ long __s64;
36typedef unsigned long __u64; 41typedef unsigned long __u64;
42#else
43#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
44typedef __signed__ long long __s64;
45typedef unsigned long long __u64;
46#endif
47#endif /* __powerpc64__ */
37 48
38typedef struct { 49typedef struct {
39 __u32 u[4]; 50 __u32 u[4];
@@ -45,7 +56,11 @@ typedef struct {
45/* 56/*
46 * These aren't exported outside the kernel to avoid name space clashes 57 * These aren't exported outside the kernel to avoid name space clashes
47 */ 58 */
59#ifdef __powerpc64__
48#define BITS_PER_LONG 64 60#define BITS_PER_LONG 64
61#else
62#define BITS_PER_LONG 32
63#endif
49 64
50#ifndef __ASSEMBLY__ 65#ifndef __ASSEMBLY__
51 66
@@ -58,8 +73,13 @@ typedef unsigned short u16;
58typedef signed int s32; 73typedef signed int s32;
59typedef unsigned int u32; 74typedef unsigned int u32;
60 75
76#ifdef __powerpc64__
61typedef signed long s64; 77typedef signed long s64;
62typedef unsigned long u64; 78typedef unsigned long u64;
79#else
80typedef signed long long s64;
81typedef unsigned long long u64;
82#endif
63 83
64typedef __vector128 vector128; 84typedef __vector128 vector128;
65 85
@@ -72,8 +92,13 @@ typedef struct {
72 unsigned long env; 92 unsigned long env;
73} func_descr_t; 93} func_descr_t;
74 94
95#ifdef CONFIG_LBD
96typedef u64 sector_t;
97#define HAVE_SECTOR_T
98#endif
99
75#endif /* __ASSEMBLY__ */ 100#endif /* __ASSEMBLY__ */
76 101
77#endif /* __KERNEL__ */ 102#endif /* __KERNEL__ */
78 103
79#endif /* _PPC64_TYPES_H */ 104#endif /* _ASM_POWERPC_TYPES_H */
diff --git a/include/asm-ppc/types.h b/include/asm-ppc/types.h
deleted file mode 100644
index 77dc24d7d2ad..000000000000
--- a/include/asm-ppc/types.h
+++ /dev/null
@@ -1,69 +0,0 @@
1#ifndef _PPC_TYPES_H
2#define _PPC_TYPES_H
3
4#ifndef __ASSEMBLY__
5
6typedef __signed__ char __s8;
7typedef unsigned char __u8;
8
9typedef __signed__ short __s16;
10typedef unsigned short __u16;
11
12typedef __signed__ int __s32;
13typedef unsigned int __u32;
14
15#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
16typedef __signed__ long long __s64;
17typedef unsigned long long __u64;
18#endif
19
20typedef 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 */
28typedef 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
42typedef signed char s8;
43typedef unsigned char u8;
44
45typedef signed short s16;
46typedef unsigned short u16;
47
48typedef signed int s32;
49typedef unsigned int u32;
50
51typedef signed long long s64;
52typedef unsigned long long u64;
53
54typedef __vector128 vector128;
55
56/* DMA addresses are 32-bits wide */
57typedef u32 dma_addr_t;
58typedef u64 dma64_addr_t;
59
60#ifdef CONFIG_LBD
61typedef u64 sector_t;
62#define HAVE_SECTOR_T
63#endif
64
65#endif /* __ASSEMBLY__ */
66
67#endif /* __KERNEL__ */
68
69#endif