blob: 5b8c2cfa11382248105b00937eec2d245411ac3c [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#ifndef _PPC64_TYPES_H
2#define _PPC64_TYPES_H
3
4#ifndef __ASSEMBLY__
5
6/*
7 * This file is never included by application software unless
8 * explicitly requested (e.g., via linux/types.h) in which case the
9 * application is Linux specific so (user-) name space pollution is
10 * not a major issue. However, for interoperability, libraries still
11 * need to be careful to avoid a name clashes.
12 *
13 * This program is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU General Public License
15 * as published by the Free Software Foundation; either version
16 * 2 of the License, or (at your option) any later version.
17 */
18
19typedef unsigned int umode_t;
20
21/*
22 * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the
23 * header files exported to user space
24 */
25
26typedef __signed__ char __s8;
27typedef unsigned char __u8;
28
29typedef __signed__ short __s16;
30typedef unsigned short __u16;
31
32typedef __signed__ int __s32;
33typedef unsigned int __u32;
34
35typedef __signed__ long __s64;
36typedef unsigned long __u64;
37
38typedef struct {
39 __u32 u[4];
40} __attribute((aligned(16))) __vector128;
41
42#endif /* __ASSEMBLY__ */
43
44#ifdef __KERNEL__
45/*
46 * These aren't exported outside the kernel to avoid name space clashes
47 */
48#define BITS_PER_LONG 64
49
50#ifndef __ASSEMBLY__
51
52typedef signed char s8;
53typedef unsigned char u8;
54
55typedef signed short s16;
56typedef unsigned short u16;
57
58typedef signed int s32;
59typedef unsigned int u32;
60
61typedef signed long s64;
62typedef unsigned long u64;
63
64typedef __vector128 vector128;
65
66typedef u32 dma_addr_t;
67typedef u64 dma64_addr_t;
68
69typedef struct {
70 unsigned long entry;
71 unsigned long toc;
72 unsigned long env;
73} func_descr_t;
74
75typedef unsigned int kmem_bufctl_t;
76#endif /* __ASSEMBLY__ */
77
78#endif /* __KERNEL__ */
79
80#endif /* _PPC64_TYPES_H */