summaryrefslogtreecommitdiffstats
path: root/arch/mips/mm/init.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1998-03-22 23:27:12 +0000
committerRalf Baechle <ralf@linux-mips.org>1998-03-22 23:27:12 +0000
commit6dd778f9528c1acc17dbfca685f51bd5c3750d45 (patch)
tree45c8be9edc454b787dd06d3d4aee79dccea0a979 /arch/mips/mm/init.c
parentf1382dc4850bb459d24a81c6cb0ef93ea7bd4a79 (diff)
o Fix handling of interrupted syscalls.
o Just count missed heartbeats on Indys but don't print a messages. This was a bug by itself. o Fix a crash in exit_mmap(). o Fix scanmem(). o Fix clear_active_bh(), a ~ was missing causing weak performance. o Remove experimental cache instructions from stackframe.h. It wasn't improving performance as I was hoping. o Shrink the size of the exception handler routines in uaccess.h. o Cleanup, remove dead code in various files.
Diffstat (limited to 'arch/mips/mm/init.c')
-rw-r--r--arch/mips/mm/init.c59
1 files changed, 8 insertions, 51 deletions
diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c
index 9cb47cefa..3e309e438 100644
--- a/arch/mips/mm/init.c
+++ b/arch/mips/mm/init.c
@@ -1,8 +1,11 @@
/*
- * arch/mips/mm/init.c
+ * 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) 1991, 1992, 1993, 1994 Linus Torvalds
- * Ported to MIPS by Ralf Baechle
+ * Copyright (C) 1994, 1995, 1996 by Ralf Baechle
+ *
+ * $Id: init.c,v 1.4 1998/03/21 08:01:45 ralf Exp $
*/
#include <linux/config.h>
#include <linux/signal.h>
@@ -113,58 +116,12 @@ pte_t * __bad_pagetable(void)
return (pte_t *)page;
}
-static inline void
-__zeropage(unsigned long page)
-{
- unsigned long dummy1, dummy2;
-
-#if (_MIPS_ISA == _MIPS_ISA_MIPS3) || (_MIPS_ISA == _MIPS_ISA_MIPS4)
- /*
- * Use 64bit code even for Linux/MIPS 32bit on R4000
- */
- __asm__ __volatile__(
- ".set\tnoreorder\n"
- ".set\tnoat\n\t"
- ".set\tmips3\n"
- "1:\tsd\t$0,(%0)\n\t"
- "subu\t%1,1\n\t"
- "bnez\t%1,1b\n\t"
- "addiu\t%0,8\n\t"
- ".set\tmips0\n\t"
- ".set\tat\n"
- ".set\treorder"
- :"=r" (dummy1),
- "=r" (dummy2)
- :"0" (page),
- "1" (PAGE_SIZE/8));
-#else /* (_MIPS_ISA == _MIPS_ISA_MIPS1) || (_MIPS_ISA == _MIPS_ISA_MIPS2) */
- __asm__ __volatile__(
- ".set\tnoreorder\n"
- "1:\tsw\t$0,(%0)\n\t"
- "subu\t%1,1\n\t"
- "bnez\t%1,1b\n\t"
- "addiu\t%0,4\n\t"
- ".set\treorder"
- :"=r" (dummy1),
- "=r" (dummy2)
- :"0" (page),
- "1" (PAGE_SIZE/4));
-#endif
-}
-
-static inline void
-zeropage(unsigned long page)
-{
- flush_page_to_ram(page);
- __zeropage(page);
-}
-
pte_t __bad_page(void)
{
extern char empty_bad_page[PAGE_SIZE];
unsigned long page = (unsigned long)empty_bad_page;
- zeropage(page);
+ clear_page(page);
return pte_mkdirty(mk_pte(page, PAGE_SHARED));
}
@@ -221,7 +178,7 @@ void mem_init(unsigned long start_mem, unsigned long end_mem)
high_memory = (void *)end_mem;
/* clear the zero-page */
- memset(empty_zero_page, 0, PAGE_SIZE);
+ clear_page(empty_zero_page);
/* mark usable pages in the mem_map[] */
start_mem = PAGE_ALIGN(start_mem);