blob: 544a2854598f0d6558269beb298fe839e161ea08 [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
Ralf Baechle12e22e82009-03-30 14:49:41 +02007 * Copyright (C) 2008 Wind River Systems,
8 * written by Ralf Baechle
Linus Torvalds1da177e2005-04-16 15:20:36 -07009 * Copyright (C) 1999 Silicon Graphics, Inc.
10 */
11#ifndef _ASM_TYPES_H
12#define _ASM_TYPES_H
13
Ralf Baechle12e22e82009-03-30 14:49:41 +020014/*
15 * We don't use int-l64.h for the kernel anymore but still use it for
16 * userspace to avoid code changes.
17 */
18#if (_MIPS_SZLONG == 64) && !defined(__KERNEL__)
H. Peter Anvin23cf11d2008-04-06 10:35:06 -070019# include <asm-generic/int-l64.h>
20#else
21# include <asm-generic/int-ll64.h>
22#endif
23
Linus Torvalds1da177e2005-04-16 15:20:36 -070024#ifndef __ASSEMBLY__
25
26typedef unsigned short umode_t;
27
Linus Torvalds1da177e2005-04-16 15:20:36 -070028#endif /* __ASSEMBLY__ */
29
30/*
31 * These aren't exported outside the kernel to avoid name space clashes
32 */
33#ifdef __KERNEL__
Linus Torvalds1da177e2005-04-16 15:20:36 -070034#ifndef __ASSEMBLY__
35
Linus Torvalds1da177e2005-04-16 15:20:36 -070036#if (defined(CONFIG_HIGHMEM) && defined(CONFIG_64BIT_PHYS_ADDR)) \
Ralf Baechle875d43e2005-09-03 15:56:16 -070037 || defined(CONFIG_64BIT)
Linus Torvalds1da177e2005-04-16 15:20:36 -070038typedef u64 dma_addr_t;
39#else
40typedef u32 dma_addr_t;
41#endif
42typedef u64 dma64_addr_t;
43
44/*
45 * Don't use phys_t. You've been warned.
46 */
47#ifdef CONFIG_64BIT_PHYS_ADDR
48typedef unsigned long long phys_t;
49#else
50typedef unsigned long phys_t;
51#endif
52
Linus Torvalds1da177e2005-04-16 15:20:36 -070053#endif /* __ASSEMBLY__ */
54
55#endif /* __KERNEL__ */
56
57#endif /* _ASM_TYPES_H */