x86, boot: set up the decompression stack as early as possible

Set up the decompression stack as soon as we know where it needs to
go.  That way we have a full-service stack as soon as possible, rather
than relying on the BP_scratch field.

Note that the stack does need to be empty during bss zeroing (or
else the stack needs to be moved out of the bss segment, which is also
an option.)

[ Impact: cleanup, minor paranoia ]

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
diff --git a/arch/x86/boot/compressed/head_32.S b/arch/x86/boot/compressed/head_32.S
index 59425e1..d7245cf 100644
--- a/arch/x86/boot/compressed/head_32.S
+++ b/arch/x86/boot/compressed/head_32.S
@@ -88,6 +88,9 @@
 	addl	$4095, %ebx
 	andl	$~4095, %ebx
 
+	/* Set up the stack */
+	leal	boot_stack_end(%ebx), %esp
+
 /*
  * Copy the compressed kernel to the end of our buffer
  * where decompression in place becomes safe.
@@ -122,7 +125,7 @@
 relocated:
 
 /*
- * Clear BSS
+ * Clear BSS (stack is currently empty)
  */
 	xorl	%eax, %eax
 	leal	_bss(%ebx), %edi
@@ -132,11 +135,6 @@
 	rep	stosb
 
 /*
- * Setup the stack for the decompressor
- */
-	leal	boot_stack_end(%ebx), %esp
-
-/*
  * Do the decompression, and jump to the new kernel..
  */
 	movl	output_len(%ebx), %eax