summaryrefslogtreecommitdiff
path: root/include/asm-mips/types.h
diff options
context:
space:
mode:
authorShinya Kuribayashi <skuribay@ruby.dti.ne.jp>2008-03-25 11:43:17 +0900
committerShinya Kuribayashi <skuribay@ruby.dti.ne.jp>2008-03-25 11:43:17 +0900
commit282223a607c611425fa33f5428f8eae6636972bb (patch)
tree00e55757868b01a1aa7853fdcd9f683a0f631a77 /include/asm-mips/types.h
parente1390801a3c1a2b6d12fa90be368efc19f5b9bfd (diff)
[MIPS] asm headers' updates
Make some asm headers adjusted to the latest Linux kernel. Signed-off-by: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
Diffstat (limited to 'include/asm-mips/types.h')
-rw-r--r--include/asm-mips/types.h30
1 files changed, 26 insertions, 4 deletions
diff --git a/include/asm-mips/types.h b/include/asm-mips/types.h
index 707cbf42d..f49a2176a 100644
--- a/include/asm-mips/types.h
+++ b/include/asm-mips/types.h
@@ -1,5 +1,4 @@
-/* $Id: types.h,v 1.3 1999/08/18 23:37:50 ralf Exp $
- *
+/*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
* for more details.
@@ -10,6 +9,8 @@
#ifndef _ASM_TYPES_H
#define _ASM_TYPES_H
+#ifndef __ASSEMBLY__
+
typedef unsigned short umode_t;
/*
@@ -40,11 +41,17 @@ __extension__ typedef unsigned long long __u64;
#endif
+#endif /* __ASSEMBLY__ */
+
/*
* These aren't exported outside the kernel to avoid name space clashes
*/
#ifdef __KERNEL__
+#define BITS_PER_LONG _MIPS_SZLONG
+
+#ifndef __ASSEMBLY__
+
typedef __signed char s8;
typedef unsigned char u8;
@@ -68,9 +75,24 @@ typedef unsigned long long u64;
#endif
-#define BITS_PER_LONG _MIPS_SZLONG
+#if (defined(CONFIG_HIGHMEM) && defined(CONFIG_64BIT_PHYS_ADDR)) \
+ || defined(CONFIG_64BIT)
+typedef u64 dma_addr_t;
+#else
+typedef u32 dma_addr_t;
+#endif
+typedef u64 dma64_addr_t;
+
+/*
+ * Don't use phys_t. You've been warned.
+ */
+#ifdef CONFIG_64BIT_PHYS_ADDR
+typedef unsigned long long phys_t;
+#else
+typedef unsigned long phys_t;
+#endif
-typedef unsigned long dma_addr_t;
+#endif /* __ASSEMBLY__ */
#endif /* __KERNEL__ */