public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fix strange stack calculation for secondary cpus
@ 2002-12-10 21:00 Dave Hansen
  2002-12-11  1:10 ` Hugh Dickins
  0 siblings, 1 reply; 3+ messages in thread
From: Dave Hansen @ 2002-12-10 21:00 UTC (permalink / raw)
  To: dhow >> David Howells; +Cc: Linux Kernel Mailing List

[-- Attachment #1: Type: text/plain, Size: 396 bytes --]

in arch/i386/kernel/smpboot.c:
stack_start.esp = (void *) (1024 + PAGE_SIZE + (char *)idle);

This causes problems when I switch to 4k stacks?  What is supposed to 
be going on here?  Why point esp into the middle of the stack?  If you 
wanted to do that, why not just use PAGE_SIZE>>2?

In any case, I think THREAD_SIZE needs to be here instead of PAGE_SIZE.
-- 
Dave Hansen
haveblue@us.ibm.com

[-- Attachment #2: fix-esp-2.5.51.patch --]
[-- Type: text/plain, Size: 467 bytes --]

--- linux-2.5.50/arch/i386/kernel/smpboot.c.bad	Tue Dec 10 12:56:10 2002
+++ linux-2.5.50/arch/i386/kernel/smpboot.c	Tue Dec 10 12:56:55 2002
@@ -806,7 +806,7 @@
 
 	/* So we see what's up   */
 	printk("Booting processor %d/%d eip %lx\n", cpu, apicid, start_eip);
-	stack_start.esp = (void *) (1024 + PAGE_SIZE + (char *)idle->thread_info);
+	stack_start.esp = (void *) (THREAD_SIZE + (char *)idle->thread_info);
 
 	/*
 	 * This grunge runs the startup process for

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

end of thread, other threads:[~2002-12-11  1:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-12-10 21:00 [PATCH] fix strange stack calculation for secondary cpus Dave Hansen
2002-12-11  1:10 ` Hugh Dickins
2002-12-11  1:23   ` Dave Hansen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox