summaryrefslogtreecommitdiffstats
path: root/arch/mips/mm
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/mm')
-rw-r--r--arch/mips/mm/Makefile2
-rw-r--r--arch/mips/mm/fault.c2
-rw-r--r--arch/mips/mm/r4xx0.c40
-rw-r--r--arch/mips/mm/stack.c27
4 files changed, 11 insertions, 60 deletions
diff --git a/arch/mips/mm/Makefile b/arch/mips/mm/Makefile
index d12159903..1205b2bf3 100644
--- a/arch/mips/mm/Makefile
+++ b/arch/mips/mm/Makefile
@@ -9,6 +9,6 @@
O_TARGET := mm.o
O_OBJS := extable.o init.o fault.o r4xx0.o r2300.o r6000.o tfp.o \
- andes.o loadmmu.o stack.o
+ andes.o loadmmu.o
include $(TOPDIR)/Rules.make
diff --git a/arch/mips/mm/fault.c b/arch/mips/mm/fault.c
index 4fdd98155..3ad703b1f 100644
--- a/arch/mips/mm/fault.c
+++ b/arch/mips/mm/fault.c
@@ -70,7 +70,7 @@ good_area:
if (!(vma->vm_flags & (VM_READ | VM_EXEC)))
goto bad_area;
}
- handle_mm_fault(vma, address, writeaccess);
+ handle_mm_fault(tsk, vma, address, writeaccess);
up(&mm->mmap_sem);
goto out;
diff --git a/arch/mips/mm/r4xx0.c b/arch/mips/mm/r4xx0.c
index 5f1bcbfa6..f83f41df8 100644
--- a/arch/mips/mm/r4xx0.c
+++ b/arch/mips/mm/r4xx0.c
@@ -1,4 +1,4 @@
-/* $Id: r4xx0.c,v 1.19 1996/08/02 11:11:36 dm Exp $
+/*
* r4xx0.c: R4000 processor variant specific MMU/Cache routines.
*
* Copyright (C) 1996 David S. Miller (dm@engr.sgi.com)
@@ -325,28 +325,6 @@ static inline void r4k_flush_cache_all_d32i32(void)
restore_flags(flags);
}
-static inline struct vm_area_struct *
-find_mm_vma(struct mm_struct *mm, unsigned long addr)
-{
- struct vm_area_struct * result = NULL;
-
- if (mm) {
- struct vm_area_struct * tree = mm->mmap_avl;
- for (;;) {
- if (tree == avl_empty)
- break;
- if (tree->vm_end > addr) {
- result = tree;
- if (tree->vm_start <= addr)
- break;
- tree = tree->vm_avl_left;
- } else
- tree = tree->vm_avl_right;
- }
- }
- return result;
-}
-
static void
r4k_flush_cache_range_s16d16i16(struct mm_struct *mm,
unsigned long start,
@@ -362,7 +340,7 @@ r4k_flush_cache_range_s16d16i16(struct mm_struct *mm,
#ifdef DEBUG_CACHE
printk("crange[%d,%08lx,%08lx]", (int)mm->context, start, end);
#endif
- vma = find_mm_vma(mm, start);
+ vma = find_vma(mm, start);
if(vma) {
if(mm->context != current->mm->context) {
r4k_flush_cache_all_s16d16i16();
@@ -407,7 +385,7 @@ r4k_flush_cache_range_s32d16i16(struct mm_struct *mm,
#ifdef DEBUG_CACHE
printk("crange[%d,%08lx,%08lx]", (int)mm->context, start, end);
#endif
- vma = find_mm_vma(mm, start);
+ vma = find_vma(mm, start);
if(vma) {
if(mm->context != current->mm->context) {
r4k_flush_cache_all_s32d16i16();
@@ -451,7 +429,7 @@ static void r4k_flush_cache_range_s64d16i16(struct mm_struct *mm,
#ifdef DEBUG_CACHE
printk("crange[%d,%08lx,%08lx]", (int)mm->context, start, end);
#endif
- vma = find_mm_vma(mm, start);
+ vma = find_vma(mm, start);
if(vma) {
if(mm->context != current->mm->context) {
r4k_flush_cache_all_s64d16i16();
@@ -495,7 +473,7 @@ static void r4k_flush_cache_range_s128d16i16(struct mm_struct *mm,
#ifdef DEBUG_CACHE
printk("crange[%d,%08lx,%08lx]", (int)mm->context, start, end);
#endif
- vma = find_mm_vma(mm, start);
+ vma = find_vma(mm, start);
if(vma) {
if(mm->context != current->mm->context) {
r4k_flush_cache_all_s128d16i16();
@@ -539,7 +517,7 @@ static void r4k_flush_cache_range_s16d32i32(struct mm_struct *mm,
#ifdef DEBUG_CACHE
printk("crange[%d,%08lx,%08lx]", (int)mm->context, start, end);
#endif
- vma = find_mm_vma(mm, start);
+ vma = find_vma(mm, start);
if(vma) {
if(mm->context != current->mm->context) {
r4k_flush_cache_all_s16d32i32();
@@ -583,7 +561,7 @@ static void r4k_flush_cache_range_s32d32i32(struct mm_struct *mm,
#ifdef DEBUG_CACHE
printk("crange[%d,%08lx,%08lx]", (int)mm->context, start, end);
#endif
- vma = find_mm_vma(mm, start);
+ vma = find_vma(mm, start);
if(vma) {
if(mm->context != current->mm->context) {
r4k_flush_cache_all_s32d32i32();
@@ -627,7 +605,7 @@ static void r4k_flush_cache_range_s64d32i32(struct mm_struct *mm,
#ifdef DEBUG_CACHE
printk("crange[%d,%08lx,%08lx]", (int)mm->context, start, end);
#endif
- vma = find_mm_vma(mm, start);
+ vma = find_vma(mm, start);
if(vma) {
if(mm->context != current->mm->context) {
r4k_flush_cache_all_s64d32i32();
@@ -671,7 +649,7 @@ static void r4k_flush_cache_range_s128d32i32(struct mm_struct *mm,
#ifdef DEBUG_CACHE
printk("crange[%d,%08lx,%08lx]", (int)mm->context, start, end);
#endif
- vma = find_mm_vma(mm, start);
+ vma = find_vma(mm, start);
if(vma) {
if(mm->context != current->mm->context) {
r4k_flush_cache_all_s128d32i32();
diff --git a/arch/mips/mm/stack.c b/arch/mips/mm/stack.c
deleted file mode 100644
index 89fb6dc64..000000000
--- a/arch/mips/mm/stack.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Kernel stack allocation/deallocation
- *
- * 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) 1996, 1997 by Ralf Baechle
- *
- * (This is _bad_ if the free page pool is fragmented ...)
- */
-#include <linux/sched.h>
-#include <linux/mm.h>
-#include <asm/processor.h>
-
-extern unsigned long alloc_kernel_stack(struct task_struct *tsk)
-{
- unsigned long stack;
- stack = __get_free_pages(GFP_KERNEL, 1, 0);
-
- return stack;
-}
-
-extern void free_kernel_stack(unsigned long stack)
-{
- free_pages(stack, 1);
-}