linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] x86/boot/compressed/32: Simplify calculation of output address
@ 2020-01-07 19:44 Arvind Sankar
  2020-01-07 19:44 ` [PATCH 2/3] x86/boot/compressed/64: Use leal to initialize boot stack pointer Arvind Sankar
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Arvind Sankar @ 2020-01-07 19:44 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, Borislav Petkov, H. Peter Anvin
  Cc: x86, linux-kernel

Condense the calculation of decompressed kernel start a little.

Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu>
---
 arch/x86/boot/compressed/head_32.S | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/arch/x86/boot/compressed/head_32.S b/arch/x86/boot/compressed/head_32.S
index f2dfd6d083ef..1cc55c79d1d0 100644
--- a/arch/x86/boot/compressed/head_32.S
+++ b/arch/x86/boot/compressed/head_32.S
@@ -240,11 +240,9 @@ SYM_FUNC_START_LOCAL_NOALIGN(.Lrelocated)
 				/* push arguments for extract_kernel: */
 	pushl	$z_output_len	/* decompressed length, end of relocs */
 
-	movl    BP_init_size(%esi), %eax
-	subl    $_end, %eax
-	movl    %ebx, %ebp
-	subl    %eax, %ebp
-	pushl	%ebp		/* output address */
+	leal	_end(%ebx), %eax
+	subl    BP_init_size(%esi), %eax
+	pushl	%eax		/* output address */
 
 	pushl	$z_input_len	/* input_len */
 	leal	input_data(%ebx), %eax
-- 
2.24.1


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

end of thread, other threads:[~2020-02-12 12:04 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-07 19:44 [PATCH 1/3] x86/boot/compressed/32: Simplify calculation of output address Arvind Sankar
2020-01-07 19:44 ` [PATCH 2/3] x86/boot/compressed/64: Use leal to initialize boot stack pointer Arvind Sankar
2020-02-12 12:04   ` [tip: x86/boot] x86/boot/compressed/64: Use LEA " tip-bot2 for Arvind Sankar
2020-01-07 19:44 ` [PATCH 3/3] x86/boot/compressed/64: Use 32-bit move for z_output_len Arvind Sankar
2020-02-11 16:17   ` Borislav Petkov
2020-02-11 17:33     ` [PATCH v2] x86/boot: Use 32-bit (zero-extended) " Arvind Sankar
2020-02-11 18:15       ` Borislav Petkov
2020-02-11 19:27         ` Arvind Sankar
2020-02-12  9:47           ` Borislav Petkov
2020-02-12 12:04       ` [tip: x86/boot] x86/boot/compressed/64: Use 32-bit (zero-extended) MOV " tip-bot2 for Arvind Sankar
2020-01-23 11:04 ` [tip: x86/asm] x86/boot: Simplify calculation of output address tip-bot2 for Arvind Sankar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).