lkml.org 
[lkml]   [2002]   [Dec]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] fix strange stack calculation for secondary cpus
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
--- 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
\
 
 \ /
  Last update: 2005-03-22 13:31    [W:0.080 / U:0.528 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site