linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ppc32: fix CONFIG_TASK_SIZE handling on 44x
@ 2005-05-18 10:21 Eugene Surovegin
  2005-05-18 14:14 ` Dan Malek
  0 siblings, 1 reply; 5+ messages in thread
From: Eugene Surovegin @ 2005-05-18 10:21 UTC (permalink / raw)
  To: linuxppc-embedded

Hi!

This patch fixed CONFIG_TASK_SIZE handling on 44x. Currently 
head_44x.S hardcodes 0x80000000, which breaks if user chooses to 
change TASK_SIZE (e.g. for 3G user-space). Tested on Ocotea in 3G/1G 
configuration.

Signed-off-by: Eugene Surovegin <ebs@ebshome.net>

Index: arch/ppc/kernel/head_44x.S
===================================================================
--- 59c3218467807e1793fb4fc5d90141e072ab2212/arch/ppc/kernel/head_44x.S  (mode:100644)
+++ uncommitted/arch/ppc/kernel/head_44x.S  (mode:100644)
@@ -330,8 +330,9 @@
 	/* If we are faulting a kernel address, we have to use the
 	 * kernel page tables.
 	 */
-	andis.	r11, r10, 0x8000
-	beq	3f
+	lis	r11, TASK_SIZE@h
+	cmplw	r10, r11
+	blt+	3f
 	lis	r11, swapper_pg_dir@h
 	ori	r11, r11, swapper_pg_dir@l
 
@@ -464,8 +465,9 @@
 	/* If we are faulting a kernel address, we have to use the
 	 * kernel page tables.
 	 */
-	andis.	r11, r10, 0x8000
-	beq	3f
+	lis	r11, TASK_SIZE@h
+	cmplw	r10, r11
+	blt+	3f
 	lis	r11, swapper_pg_dir@h
 	ori	r11, r11, swapper_pg_dir@l
 
@@ -533,8 +535,9 @@
 	/* If we are faulting a kernel address, we have to use the
 	 * kernel page tables.
 	 */
-	andis.	r11, r10, 0x8000
-	beq	3f
+	lis	r11, TASK_SIZE@h 
+	cmplw	r10, r11
+	blt+	3f
 	lis	r11, swapper_pg_dir@h
 	ori	r11, r11, swapper_pg_dir@l
 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-05-18 16:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-18 10:21 [PATCH] ppc32: fix CONFIG_TASK_SIZE handling on 44x Eugene Surovegin
2005-05-18 14:14 ` Dan Malek
2005-05-18 16:19   ` Kumar Gala
2005-05-18 16:34     ` Matt Porter
2005-05-18 16:48     ` Dan Malek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).