Update of /cvsroot/linux-mips/linux/include/asm-mips
In directory usw-pr-cvs1:/tmp/cvs-serv6295/include/asm-mips
Modified Files:
bootinfo.h pgtable.h
Added Files:
types.h
Log Message:
More fixes for highmem at physical addresss above 4gb.
--- NEW FILE: types.h ---
/*
* 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.
*
* Copyright (C) 1994, 1995, 1996, 1999 by Ralf Baechle
* Copyright (C) 1999 Silicon Graphics, Inc.
*/
#ifndef _ASM_TYPES_H
#define _ASM_TYPES_H
typedef unsigned short umode_t;
/*
* __xx is ok: it doesn't pollute the POSIX namespace. Use these in the
* header files exported to user space
*/
typedef __signed__ char __s8;
typedef unsigned char __u8;
typedef __signed__ short __s16;
typedef unsigned short __u16;
typedef __signed__ int __s32;
typedef unsigned int __u32;
#if (_MIPS_SZLONG == 64)
typedef __signed__ long __s64;
typedef unsigned long __u64;
#else
#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
typedef __signed__ long long __s64;
typedef unsigned long long __u64;
#endif
#endif
/*
* These aren't exported outside the kernel to avoid name space clashes
*/
#ifdef __KERNEL__
typedef __signed char s8;
typedef unsigned char u8;
typedef __signed short s16;
typedef unsigned short u16;
typedef __signed int s32;
typedef unsigned int u32;
#if (_MIPS_SZLONG == 64)
typedef __signed__ long s64;
typedef unsigned long u64;
#else
#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
typedef __signed__ long long s64;
typedef unsigned long long u64;
#endif
#endif
#define BITS_PER_LONG _MIPS_SZLONG
typedef u32 dma_addr_t;
typedef u64 dma64_addr_t;
#ifdef CONFIG_64BIT_PHYS_ADDR
typedef unsigned long long phys_t;
#else
typedef unsigned long phys_t;
#endif
#endif /* __KERNEL__ */
#endif /* _ASM_TYPES_H */
Index: bootinfo.h
===================================================================
RCS file: /cvsroot/linux-mips/linux/include/asm-mips/bootinfo.h,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- bootinfo.h 18 Jan 2002 21:22:23 -0000 1.25
+++ bootinfo.h 12 Feb 2002 18:14:19 -0000 1.26
@@ -9,6 +9,8 @@
#ifndef _ASM_BOOTINFO_H
#define _ASM_BOOTINFO_H
+#include <linux/types.h>
+
/*
* Values for machgroup
*/
@@ -192,15 +194,14 @@
struct boot_mem_map {
int nr_map;
struct {
- unsigned long addr; /* start of memory segment */
- unsigned long size; /* size of memory segment */
+ phys_t addr; /* start of memory segment */
+ phys_t size; /* size of memory segment */
long type; /* type of memory segment */
} map[BOOT_MEM_MAP_MAX];
};
extern struct boot_mem_map boot_mem_map;
-extern void add_memory_region(unsigned long start, unsigned long size,
- long type);
+extern void add_memory_region(phys_t start, phys_t size, long type);
#endif /* _ASM_BOOTINFO_H */
Index: pgtable.h
===================================================================
RCS file: /cvsroot/linux-mips/linux/include/asm-mips/pgtable.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- pgtable.h 5 Feb 2002 17:34:13 -0000 1.12
+++ pgtable.h 12 Feb 2002 18:14:20 -0000 1.13
@@ -444,12 +444,13 @@
* Conversion functions: convert a page and protection to a page entry,
* and a page entry and page directory to the page they refer to.
*/
+
#ifdef CONFIG_CPU_VR41XX
#define mk_pte(page, pgprot) \
({ \
pte_t __pte; \
\
- pte_val(__pte) = ((unsigned long)(page - mem_map) << (PAGE_SHIFT + 2)) | \
+ pte_val(__pte) = ((phys_t)(page - mem_map) << (PAGE_SHIFT + 2)) | \
pgprot_val(pgprot); \
\
__pte; \
@@ -459,14 +460,14 @@
({ \
pte_t __pte; \
\
- pte_val(__pte) = ((unsigned long)(page - mem_map) << PAGE_SHIFT) | \
+ pte_val(__pte) = ((phys_t)(page - mem_map) << PAGE_SHIFT) | \
pgprot_val(pgprot); \
\
__pte; \
})
#endif
-static inline pte_t mk_pte_phys(unsigned long physpage, pgprot_t pgprot)
+static inline pte_t mk_pte_phys(phys_t physpage, pgprot_t pgprot)
{
#ifdef CONFIG_CPU_VR41XX
return __pte((physpage << 2) | pgprot_val(pgprot));
|