From: Arvind Sankar <nivedita@alum.mit.edu>
To: Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
"H. Peter Anvin" <hpa@zytor.com>
Cc: x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 1/3] x86/boot/compressed/32: Simplify calculation of output address
Date: Tue, 7 Jan 2020 14:44:34 -0500 [thread overview]
Message-ID: <20200107194436.2166846-1-nivedita@alum.mit.edu> (raw)
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
next reply other threads:[~2020-01-07 19:44 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-07 19:44 Arvind Sankar [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200107194436.2166846-1-nivedita@alum.mit.edu \
--to=nivedita@alum.mit.edu \
--cc=bp@alien8.de \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).