1/*
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#include <linux/config.h>
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/*
45 * These aren't exported outside the kernel to avoid name space clashes
46 */
47#ifdef __KERNEL__
48
49typedef __signed char s8;
50typedef unsigned char u8;
51
52typedef __signed short s16;
53typedef unsigned short u16;
54
55typedef __signed int s32;
56typedef unsigned int u32;
57
58#if _MIPS_SZLONG == 64
59
60typedef __signed__ long s64;
61typedef unsigned long u64;
62
63#else
64
65#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
66typedef __signed__ long long s64;
67typedef unsigned long long u64;
68#endif
69
70#endif
71
72#define BITS_PER_LONG _MIPS_SZLONG
73
74#if defined(CONFIG_HIGHMEM) && defined(CONFIG_64BIT_PHYS_ADDR)
75typedef u64 dma_addr_t;
76#else
77typedef u32 dma_addr_t;
78#endif
79typedef u64 dma64_addr_t;
80
81#ifdef CONFIG_64BIT_PHYS_ADDR
82typedef unsigned long long phys_t;
83#else
84typedef unsigned long phys_t;
85#endif
86
87#endif /* __KERNEL__ */
88
89#endif /* _ASM_TYPES_H */
90