Resent-Date: Wed, 20 Jan 1999 10:15:42 +0100 (MET)
To: Jes Sorensen <Jes.Sorensen@cern.ch>
Cc: linux-m68k@lists.linux-m68k.org
Subject: Re: 2.2.0-pre6
References: <vyz1zkt0wtk.fsf@issan.cs.uni-dortmund.de> <d31zks7kc8.fsf@valhall.cern.ch> <vyzu2xo8y95.fsf@issan.cs.uni-dortmund.de> <d3vhi4646n.fsf@valhall.cern.ch>
X-Yow: The PINK SOCKS were ORIGINALLY from 1952!!
 But they went to MARS around 1953!!
From: Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
Date: 20 Jan 1999 10:15:21 +0100
Resent-From: linux-m68k@phil.uni-sb.de

Jes Sorensen <Jes.Sorensen@cern.ch> writes:

|> >>>>> "Andreas" == Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> writes:
|> 
|> |> @@ -2137,7 +2155,7 @@
|> |>  	/* Temporary allocate a page table and insert it into the ptr table
|> |>  	 */
|> |>  	movel	%a1@,%d0
|> |> -	addl	#512,%a1@
|> |> +	addl	#PAGE_TABLE_SIZE*4,%a1@
|> |>  	orw	#_PAGE_TABLE+_PAGE_ACCESSED,%d0
|> |>  	movel	%d0,%a0@
|> |>  	dputs	" (new)"
|> 
|> Andreas> Why?  It allocates a _page_ table (third level), not a _ptr_
|> Andreas> table (second level).
|> 
|> Well without this the size allocated it 256 and not 512 and this makes
|> it break on my box at least.

Ok, the problem is that pointer tables must be aligned to 512 bytes on the
'040 and '060.  Let's better document that.

Andreas.


--- linux/arch/m68k/kernel/head.S.~3~	Mon Jan 18 00:13:53 1999
+++ linux/arch/m68k/kernel/head.S	Mon Jan 18 18:24:36 1999
@@ -2155,7 +2155,9 @@
 	/* Temporary allocate a page table and insert it into the ptr table
 	 */
 	movel	%a1@,%d0
-	addl	#PAGE_TABLE_SIZE*4,%a1@
+	/* The 512 should be PAGE_TABLE_SIZE*4, but that violates the
+	   alignment restriction for pointer tables on the '0[46]0.  */
+	addl	#512,%a1@
 	orw	#_PAGE_TABLE+_PAGE_ACCESSED,%d0
 	movel	%d0,%a0@
 	dputs	" (new)"

-- 
Andreas Schwab                                      "And now for something
schwab@issan.cs.uni-dortmund.de                      completely different"
schwab@gnu.org

