Resent-Date: Thu, 22 Apr 1999 18:42:50 +0200 (MET DST)
From: zippel@fh-brandenburg.de (Roman Zippel)
Subject: small 2.2.3 mmu fix
To: Jes.Sorensen@cern.ch, linux-m68k@lists.linux-m68k.org
Date: Thu, 22 Apr 1999 18:41:43 +0200 (MET DST)
Resent-From: linux-m68k@phil.uni-sb.de

Hi,

Here is a small the patch, that fixes hopefully the last mmu problem,
the mac people did badly need this patch.

bye, Roman


--- linux-2.2.3/arch/m68k/mm/init.c.old	Mon Mar 29 21:54:30 1999
+++ linux-2.2.3/arch/m68k/mm/init.c	Tue Apr 20 14:11:17 1999
@@ -146,9 +146,13 @@
 		unsigned long pmd, last;
 		int i;
 
+		/* Find the last ptr table that was used in head.S and
+		 * reuse the remaining space in that page for further
+		 * ptr tables.
+		 */
 		last = (unsigned long)kernel_pg_dir;
 		for (i = 0; i < PTRS_PER_PGD; i++) {
-			if (!pgd_val(kernel_pg_dir[i]))
+			if (!pgd_present(kernel_pg_dir[i]))
 				continue;
 			pmd = pgd_page(kernel_pg_dir[i]);
 			if (pmd > last)

