Skip to contentSkip to conversation

tile: set up initial stack top to honor STACK_TOP_DELTA

PATCH New Chris Metcalf 1 participant 1 message May 5, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tile: set up initial stack top to honor STACK_TOP_DELTA

For some reason this was never changed to match the rest of the code where we always initialize the kernel sp 64 bytes below the top of the page. This is generally harmless, but it does mean that if you do a dump_stack() early on in kernel boot you see a bogus warning about stack overrun.

---
 arch/tile/kernel/setup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/tile/kernel/setup.c +1 -1
index 6873f006f7d0..2c8304c8a2cd 100644
@@ -71,7 +71,7 @@ static unsigned long __initdata node_percpu[MAX_NUMNODES];
  * per-CPU stack and boot info.
  */
 DEFINE_PER_CPU(unsigned long, boot_sp) =
-	(unsigned long)init_stack + THREAD_SIZE;
+	(unsigned long)init_stack + THREAD_SIZE - STACK_TOP_DELTA;
 
 #ifdef CONFIG_SMP
 DEFINE_PER_CPU(unsigned long, boot_pc) = (unsigned long)start_kernel;
Signature · 1 line
2.1.2