All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zhang Yanfei <zhangyanfei.yes@gmail.com>
To: Simon Horman <horms@verge.net.au>,
	"kexec@lists.infradead.org" <kexec@lists.infradead.org>
Subject: [PATCH] kexec, i386, bzImage: Remove unnecessary symbol value get
Date: Tue, 16 Apr 2013 22:19:34 +0800	[thread overview]
Message-ID: <516D5DF6.8060906@gmail.com> (raw)

From: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>

We needn't get the initial values for every regs in regs32
from symbol entry32_regs for we will manually initialize them
one by one next:

        /*  
         * Initialize the 32bit start information.
         */
        regs32.eax = 0; /* unused */
        regs32.ebx = 0; /* 0 == boot not AP processor start */
        regs32.ecx = 0; /* unused */
        regs32.edx = 0; /* unused */
        regs32.esi = setup_base; /* kernel parameters */
        regs32.edi = 0; /* unused */
        regs32.esp = elf_rel_get_addr(&info->rhdr, "stack_end"); /* stack, unused */
        regs32.ebp = 0; /* unused */
        regs32.eip = kernel32_load_addr; /* kernel entry point */

Signed-off-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
---
 kexec/arch/i386/kexec-bzImage.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/kexec/arch/i386/kexec-bzImage.c b/kexec/arch/i386/kexec-bzImage.c
index 39452a4..6a34279 100644
--- a/kexec/arch/i386/kexec-bzImage.c
+++ b/kexec/arch/i386/kexec-bzImage.c
@@ -310,9 +310,8 @@ int do_bzImage_load(struct kexec_info *info,
 	if (real_mode_entry)
 		elf_rel_get_symbol(&info->rhdr, "entry16_regs",
 					 &regs16, sizeof(regs16));
-	elf_rel_get_symbol(&info->rhdr, "entry32_regs", &regs32, sizeof(regs32));
-	/*
 
+	/*
 	 * Initialize the 32bit start information.
 	 */
 	regs32.eax = 0; /* unused */
-- 
1.7.1


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

             reply	other threads:[~2013-04-16 14:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-16 14:19 Zhang Yanfei [this message]
2013-04-17  0:17 ` [PATCH] kexec, i386, bzImage: Remove unnecessary symbol value get Simon Horman

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=516D5DF6.8060906@gmail.com \
    --to=zhangyanfei.yes@gmail.com \
    --cc=horms@verge.net.au \
    --cc=kexec@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.