Resent-Date: Thu, 14 Jan 1999 10:03:25 +0100 (MET)
From: zippel@fh-brandenburg.de (Roman Zippel)
Subject: 2.2.0pre6 small bug
To: linux-m68k@lists.linux-m68k.org
Date: Thu, 14 Jan 1999 10:03:02 +0100 (MET)
Cc: jongk@cs.utwente.nl
Resent-From: linux-m68k@phil.uni-sb.de

Hi,

Yesterday I compiled a kernel with Kars config and the same compiler
and it did still run on my machine :(. So I rechecked everything and
found a small bug during fixing the cache mode for the page tables
in head.S, but it would surprise me a bit, if it would really fix the
crash, since these mappings are nether modified later (except of the
zero page), but that was the only thing I was able to find (the rest
are only cosmetic changes).
Kars, could you try this one?

bye, Roman

--- linux-2.2/arch/m68k/kernel/head.S.org	Mon Jan 11 15:19:50 1999
+++ linux-2.2/arch/m68k/kernel/head.S	Thu Jan 14 00:55:52 1999
@@ -1399,8 +1399,11 @@
 	 * MMU Map algorithm appears to go awry and you need to debug it at the
 	 * entry per entry level.
 	 */
-	movel	#ROOT_TABLE_SIZE-1,%d5
-	movel	%a5@+,%d7		/* Burn an entry to skip the kernel mappings, they work */
+	movel	#ROOT_TABLE_SIZE,%d5
+#if 0
+	movel	%a5@+,%d7		| Burn an entry to skip the kernel mappings,
+	subql	#1,%d5			| they (might) work
+#endif
 1:	tstl	%d5
 	jbeq	mmu_print_done
 	subq	#1,%d5
@@ -2041,7 +2044,6 @@
 
 	dputs	"mmu_fixup_page_mmu_cache"
 	dputn	ARG1
-	dputc	'\n'
 
 	/* Calculate the offset into the root table
 	 */
@@ -2063,7 +2065,7 @@
 	movel	ARG1,%d0
 	moveq	#PAGE_INDEX_SHIFT,%d1
 	lsrl	%d1,%d0
-	andl	#PAGE_TABLE_SIZE-1,%d1
+	andl	#PAGE_TABLE_SIZE-1,%d0
 	mmu_get_page_table_entry	%a0,%d0
 
 	movel	%a0@,%d0
@@ -2071,6 +2073,8 @@
 	orl	%pc@(SYMBOL_NAME(m68k_pgtable_cachemode)),%d0
 	movel	%d0,%a0@
 
+	dputc	'\n'
+
 func_return	mmu_fixup_page_mmu_cache
 
 /*
@@ -2254,15 +2258,16 @@
 	subl	%d2,%sp
 	subl	%d2,ARG0
 	subl	%d2,.Lmemory_start
-	clrl	.Lcustom
 
 func_return	mmu_engage
 
 func_start	mmu_get_root_table_entry,%d0/%a1
 
-|	dputs	"mmu_get_root_table_entry:"
-|	dputn	ARG1
-|	dputs	" ="
+#if 0
+	dputs	"mmu_get_root_table_entry:"
+	dputn	ARG1
+	dputs	" ="
+#endif
 
 	movel	%pc@(.Lkernel_pgdir_ptr),%a0
 	tstl	%a0
@@ -2315,8 +2320,10 @@
 	movel	ARG1,%d0
 	lea	%a0@(%d0*4),%a0
 
-|	dputn	%a0
-|	dputc	'\n'
+#if 0
+	dputn	%a0
+	dputc	'\n'
+#endif
 
 func_return	mmu_get_root_table_entry
 
@@ -2324,10 +2331,12 @@
 
 func_start	mmu_get_ptr_table_entry,%d0/%a1
 
-|	dputs	"mmu_get_ptr_table_entry:"
-|	dputn	ARG1
-|	dputn	ARG2
-|	dputs	" ="
+#if 0
+	dputs	"mmu_get_ptr_table_entry:"
+	dputn	ARG1
+	dputn	ARG2
+	dputs	" ="
+#endif
 
 	movel	ARG1,%a0
 	movel	%a0@,%d0
@@ -2372,18 +2381,22 @@
 	movel	ARG2,%d0
 	lea	%a0@(%d0*4),%a0
 
-|	dputn	%a0
-|	dputc	'\n'
+#if 0
+	dputn	%a0
+	dputc	'\n'
+#endif
 
 func_return	mmu_get_ptr_table_entry
 
 
 func_start	mmu_get_page_table_entry,%d0/%a1
 
-|	dputs	"mmu_get_page_table_entry:"
-|	dputn	ARG1
-|	dputn	ARG2
-|	dputs	" ="
+#if 0
+	dputs	"mmu_get_page_table_entry:"
+	dputn	ARG1
+	dputn	ARG2
+	dputs	" ="
+#endif
 
 	movel	ARG1,%a0
 	movel	%a0@,%d0
@@ -2422,8 +2435,10 @@
 	movel	ARG2,%d0
 	lea	%a0@(%d0*4),%a0
 
-|	dputn	%a0
-|	dputc	'\n'
+#if 0
+	dputn	%a0
+	dputc	'\n'
+#endif
 
 func_return	mmu_get_page_table_entry
 

