diff options
author | Michal Simek <monstr@monstr.eu> | 2009-03-27 09:25:32 -0400 |
---|---|---|
committer | Michal Simek <monstr@monstr.eu> | 2009-03-27 09:25:32 -0400 |
commit | 6d9c3f20858039d98da30074b487f2059450a9b1 (patch) | |
tree | 91056995a50da75c1857567202535987f2eafd83 /arch | |
parent | 8c4f92fe02394f7bc4c079d0ab943d4aea893f14 (diff) |
microblaze_v8: definitions of types
Reviewed-by: Ingo Molnar <mingo@elte.hu>
Acked-by: John Linn <john.linn@xilinx.com>
Acked-by: Stephen Neuendorffer <stephen.neuendorffer@xilinx.com>
Acked-by: John Williams <john.williams@petalogix.com>
Signed-off-by: Michal Simek <monstr@monstr.eu>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/microblaze/include/asm/posix_types.h | 73 | ||||
-rw-r--r-- | arch/microblaze/include/asm/types.h | 38 |
2 files changed, 111 insertions, 0 deletions
diff --git a/arch/microblaze/include/asm/posix_types.h b/arch/microblaze/include/asm/posix_types.h new file mode 100644 index 000000000000..b4df41c5dde2 --- /dev/null +++ b/arch/microblaze/include/asm/posix_types.h | |||
@@ -0,0 +1,73 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2006 Atmark Techno, Inc. | ||
3 | * | ||
4 | * This file is subject to the terms and conditions of the GNU General Public | ||
5 | * License. See the file "COPYING" in the main directory of this archive | ||
6 | * for more details. | ||
7 | */ | ||
8 | |||
9 | #ifndef _ASM_MICROBLAZE_POSIX_TYPES_H | ||
10 | #define _ASM_MICROBLAZE_POSIX_TYPES_H | ||
11 | |||
12 | /* | ||
13 | * This file is generally used by user-level software, so you need to | ||
14 | * be a little careful about namespace pollution etc. Also, we cannot | ||
15 | * assume GCC is being used. | ||
16 | */ | ||
17 | |||
18 | typedef unsigned long __kernel_ino_t; | ||
19 | typedef unsigned int __kernel_mode_t; | ||
20 | typedef unsigned int __kernel_nlink_t; | ||
21 | typedef long __kernel_off_t; | ||
22 | typedef int __kernel_pid_t; | ||
23 | typedef unsigned int __kernel_ipc_pid_t; | ||
24 | typedef unsigned int __kernel_uid_t; | ||
25 | typedef unsigned int __kernel_gid_t; | ||
26 | typedef unsigned long __kernel_size_t; | ||
27 | typedef long __kernel_ssize_t; | ||
28 | typedef int __kernel_ptrdiff_t; | ||
29 | typedef long __kernel_time_t; | ||
30 | typedef long __kernel_suseconds_t; | ||
31 | typedef long __kernel_clock_t; | ||
32 | typedef int __kernel_timer_t; | ||
33 | typedef int __kernel_clockid_t; | ||
34 | typedef int __kernel_daddr_t; | ||
35 | typedef char *__kernel_caddr_t; | ||
36 | typedef unsigned short __kernel_uid16_t; | ||
37 | typedef unsigned short __kernel_gid16_t; | ||
38 | typedef unsigned int __kernel_uid32_t; | ||
39 | typedef unsigned int __kernel_gid32_t; | ||
40 | |||
41 | typedef unsigned int __kernel_old_uid_t; | ||
42 | typedef unsigned int __kernel_old_gid_t; | ||
43 | typedef unsigned int __kernel_old_dev_t; | ||
44 | |||
45 | #ifdef __GNUC__ | ||
46 | typedef long long __kernel_loff_t; | ||
47 | #endif | ||
48 | |||
49 | typedef struct { | ||
50 | #if defined(__KERNEL__) || defined(__USE_ALL) | ||
51 | int val[2]; | ||
52 | #else /* !defined(__KERNEL__) && !defined(__USE_ALL) */ | ||
53 | int __val[2]; | ||
54 | #endif /* !defined(__KERNEL__) && !defined(__USE_ALL) */ | ||
55 | } __kernel_fsid_t; | ||
56 | |||
57 | #if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) | ||
58 | |||
59 | #undef __FD_SET | ||
60 | #define __FD_SET(d, set) ((set)->fds_bits[__FDELT(d)] |= __FDMASK(d)) | ||
61 | |||
62 | #undef __FD_CLR | ||
63 | #define __FD_CLR(d, set) ((set)->fds_bits[__FDELT(d)] &= ~__FDMASK(d)) | ||
64 | |||
65 | #undef __FD_ISSET | ||
66 | #define __FD_ISSET(d, set) (!!((set)->fds_bits[__FDELT(d)] & __FDMASK(d))) | ||
67 | |||
68 | #undef __FD_ZERO | ||
69 | #define __FD_ZERO(fdsetp) (memset(fdsetp, 0, sizeof(*(fd_set *)fdsetp))) | ||
70 | |||
71 | #endif /* defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) */ | ||
72 | |||
73 | #endif /* _ASM_MICROBLAZE_POSIX_TYPES_H */ | ||
diff --git a/arch/microblaze/include/asm/types.h b/arch/microblaze/include/asm/types.h new file mode 100644 index 000000000000..bebc018318f5 --- /dev/null +++ b/arch/microblaze/include/asm/types.h | |||
@@ -0,0 +1,38 @@ | |||
1 | /* | ||
2 | * Copyright (C) Atmark Techno, Inc. | ||
3 | * | ||
4 | * This file is subject to the terms and conditions of the GNU General Public | ||
5 | * License. See the file "COPYING" in the main directory of this archive | ||
6 | * for more details. | ||
7 | */ | ||
8 | |||
9 | #ifndef _ASM_MICROBLAZE_TYPES_H | ||
10 | #define _ASM_MICROBLAZE_TYPES_H | ||
11 | |||
12 | /* | ||
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. | ||
18 | */ | ||
19 | |||
20 | #include <asm-generic/int-ll64.h> | ||
21 | |||
22 | # ifndef __ASSEMBLY__ | ||
23 | |||
24 | typedef unsigned short umode_t; | ||
25 | |||
26 | /* | ||
27 | * These aren't exported outside the kernel to avoid name space clashes | ||
28 | */ | ||
29 | # ifdef __KERNEL__ | ||
30 | # define BITS_PER_LONG 32 | ||
31 | |||
32 | /* Dma addresses are 32-bits wide. */ | ||
33 | |||
34 | typedef u32 dma_addr_t; | ||
35 | |||
36 | # endif/* __KERNEL__ */ | ||
37 | # endif /* __ASSEMBLY__ */ | ||
38 | #endif /* _ASM_MICROBLAZE_TYPES_H */ | ||