blob: 2b52e180c6f25d75c28911ca68affdf41164afff [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 1994, 1995, 1996, 1999 by Ralf Baechle
7 * Copyright (C) 1999 Silicon Graphics, Inc.
8 */
9#ifndef _ASM_TYPES_H
10#define _ASM_TYPES_H
11
12#ifndef __ASSEMBLY__
13
14typedef unsigned short umode_t;
15
16/*
17 * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the
18 * header files exported to user space
19 */
20
21typedef __signed__ char __s8;
22typedef unsigned char __u8;
23
24typedef __signed__ short __s16;
25typedef unsigned short __u16;
26
27typedef __signed__ int __s32;
28typedef unsigned int __u32;
29
30#if (_MIPS_SZLONG == 64)
31
32typedef __signed__ long __s64;
33typedef unsigned long __u64;
34
35#else
36
37#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
38typedef __signed__ long long __s64;
39typedef unsigned long long __u64;
40#endif
41
42#endif
43
44#endif /* __ASSEMBLY__ */
45
46/*
47 * These aren't exported outside the kernel to avoid name space clashes
48 */
49#ifdef __KERNEL__
50
51#define BITS_PER_LONG _MIPS_SZLONG
52
53#ifndef __ASSEMBLY__
54
Linus Torvalds1da177e2005-04-16 15:20:36 -070055
56typedef __signed char s8;
57typedef unsigned char u8;
58
59typedef __signed short s16;
60typedef unsigned short u16;
61
62typedef __signed int s32;
63typedef unsigned int u32;
64
65#if (_MIPS_SZLONG == 64)
66
67typedef __signed__ long s64;
68typedef unsigned long u64;
69
70#else
71
72#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
73typedef __signed__ long long s64;
74typedef unsigned long long u64;
75#endif
76
77#endif
78
79#if (defined(CONFIG_HIGHMEM) && defined(CONFIG_64BIT_PHYS_ADDR)) \
Ralf Baechle875d43e2005-09-03 15:56:16 -070080 || defined(CONFIG_64BIT)
Linus Torvalds1da177e2005-04-16 15:20:36 -070081typedef u64 dma_addr_t;
82#else
83typedef u32 dma_addr_t;
84#endif
85typedef u64 dma64_addr_t;
86
87/*
88 * Don't use phys_t. You've been warned.
89 */
90#ifdef CONFIG_64BIT_PHYS_ADDR
91typedef unsigned long long phys_t;
92#else
93typedef unsigned long phys_t;
94#endif
95
96#ifdef CONFIG_LBD
97typedef u64 sector_t;
98#define HAVE_SECTOR_T
99#endif
100
Takashi Satoa0f62ac2006-03-26 01:37:52 -0800101#ifdef CONFIG_LSF
102typedef u64 blkcnt_t;
103#define HAVE_BLKCNT_T
104#endif
105
Linus Torvalds1da177e2005-04-16 15:20:36 -0700106#endif /* __ASSEMBLY__ */
107
108#endif /* __KERNEL__ */
109
110#endif /* _ASM_TYPES_H */