patch-2.1.115 linux/arch/mips/mm/init.c

Next file: linux/arch/mips/mm/r4xx0.c
Previous file: linux/arch/mips/lib/memset.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.114/linux/arch/mips/mm/init.c linux/arch/mips/mm/init.c
@@ -5,7 +5,7 @@
  *
  * Copyright (C) 1994, 1995, 1996 by Ralf Baechle
  *
- * $Id: init.c,v 1.14 1998/05/01 01:34:53 ralf Exp $
+ * $Id: init.c,v 1.15 1998/08/04 20:48:30 davem Exp $
  */
 #include <linux/config.h>
 #include <linux/init.h>
@@ -45,6 +45,22 @@
 	/* XXX Just get it working for now... */
 	flush_cache_all();
 	return 0;
+}
+
+int do_check_pgt_cache(int low, int high)
+{
+	int freed = 0;
+	if(pgtable_cache_size > high) {
+		do {
+			if(pgd_quicklist)
+				free_pgd_slow(get_pgd_fast()), freed++;
+			if(pmd_quicklist)
+				free_pmd_slow(get_pmd_fast()), freed++;
+			if(pte_quicklist)
+				free_pte_slow(get_pte_fast()), freed++;
+		} while(pgtable_cache_size > low);
+	}
+	return freed;
 }
 
 /*

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov