[PATCH v3 16/51] x86/32: put real return address on stack in entry code

From: Josh Poimboeuf
Date: Fri Aug 12 2016 - 10:32:03 EST


This standardizes the stacks of idle tasks to be consistent with other
tasks on 32-bit.

Signed-off-by: Josh Poimboeuf <jpoimboe@xxxxxxxxxx>
---
arch/x86/kernel/head_32.S | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/arch/x86/kernel/head_32.S b/arch/x86/kernel/head_32.S
index f2298e9..6fc4f1d 100644
--- a/arch/x86/kernel/head_32.S
+++ b/arch/x86/kernel/head_32.S
@@ -290,7 +290,7 @@ num_subarch_entries = (. - subarch_entries) / 4
ENTRY(start_cpu0)
movl initial_stack, %ecx
movl %ecx, %esp
- jmp *(initial_code)
+ call *(initial_code)
ENDPROC(start_cpu0)
#endif

@@ -471,8 +471,7 @@ is486:
xorl %eax,%eax # Clear LDT
lldt %ax

- pushl $0 # fake return address for unwinder
- jmp *(initial_code)
+ call *(initial_code)

#include "verify_cpu.S"

--
2.7.4