[PATCH] kexec, i386, bzImage: Remove unnecessary symbol value get

Zhang Yanfei zhangyanfei.yes at gmail.com
Tue Apr 16 10:19:34 EDT 2013


From: Zhang Yanfei <zhangyanfei at 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 at 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




More information about the kexec mailing list