Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 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 | |
H. Peter Anvin | 23cf11d | 2008-04-06 10:35:06 -0700 | [diff] [blame] | 12 | #if _MIPS_SZLONG == 64 |
| 13 | # include <asm-generic/int-l64.h> |
| 14 | #else |
| 15 | # include <asm-generic/int-ll64.h> |
| 16 | #endif |
| 17 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 18 | #ifndef __ASSEMBLY__ |
| 19 | |
| 20 | typedef unsigned short umode_t; |
| 21 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 22 | #endif /* __ASSEMBLY__ */ |
| 23 | |
| 24 | /* |
| 25 | * These aren't exported outside the kernel to avoid name space clashes |
| 26 | */ |
| 27 | #ifdef __KERNEL__ |
| 28 | |
| 29 | #define BITS_PER_LONG _MIPS_SZLONG |
| 30 | |
| 31 | #ifndef __ASSEMBLY__ |
| 32 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 33 | #if (defined(CONFIG_HIGHMEM) && defined(CONFIG_64BIT_PHYS_ADDR)) \ |
Ralf Baechle | 875d43e | 2005-09-03 15:56:16 -0700 | [diff] [blame] | 34 | || defined(CONFIG_64BIT) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 35 | typedef u64 dma_addr_t; |
| 36 | #else |
| 37 | typedef u32 dma_addr_t; |
| 38 | #endif |
| 39 | typedef u64 dma64_addr_t; |
| 40 | |
| 41 | /* |
| 42 | * Don't use phys_t. You've been warned. |
| 43 | */ |
| 44 | #ifdef CONFIG_64BIT_PHYS_ADDR |
| 45 | typedef unsigned long long phys_t; |
| 46 | #else |
| 47 | typedef unsigned long phys_t; |
| 48 | #endif |
| 49 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 50 | #endif /* __ASSEMBLY__ */ |
| 51 | |
| 52 | #endif /* __KERNEL__ */ |
| 53 | |
| 54 | #endif /* _ASM_TYPES_H */ |