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 #ifndef __ASSEMBLY__ 13 14 typedef unsigned short umode_t; 15 16 typedef __signed__ char __s8; 17 typedef unsigned char __u8; 18 19 typedef __signed__ short __s16; 20 typedef unsigned short __u16; 21 22 typedef __signed__ int __s32; 23 typedef unsigned int __u32; 24 25 #if _MIPS_SZLONG == 64 26 27 typedef __signed__ long __s64; 28 typedef unsigned long __u64; 29 30 #else 31 32 #ifdef __GNUC__ 33 typedef __signed__ long long __s64; 34 typedef unsigned long long __u64; 35 #endif 36 37 #endif 38 39 #endif /* __ASSEMBLY__ */ 40 41 /* 42 * These aren't exported outside the kernel to avoid name space clashes 43 */ 44 #ifdef __KERNEL__ 45 46 #define BITS_PER_LONG _MIPS_SZLONG 47 48 #ifndef __ASSEMBLY__ 49 50 #if (defined(CONFIG_HIGHMEM) && defined(CONFIG_64BIT_PHYS_ADDR)) \ 51 || defined(CONFIG_64BIT) 52 typedef u64 dma_addr_t; 53 #else 54 typedef u32 dma_addr_t; 55 #endif 56 typedef u64 dma64_addr_t; 57 58 /* 59 * Don't use phys_t. You've been warned. 60 */ 61 #ifdef CONFIG_64BIT_PHYS_ADDR 62 typedef unsigned long long phys_t; 63 #else 64 typedef unsigned long phys_t; 65 #endif 66 67 #endif /* __ASSEMBLY__ */ 68 69 70 #endif /* __KERNEL__ */ 71 72 73 74 #endif /* _ASM_TYPES_H */ 75