Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755488AbbGCUI4 (ORCPT ); Fri, 3 Jul 2015 16:08:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46564 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755591AbbGCUIk (ORCPT ); Fri, 3 Jul 2015 16:08:40 -0400 From: Denys Vlasenko To: Ingo Molnar Cc: Denys Vlasenko , Pavel Machek , Linus Torvalds , Steven Rostedt , Borislav Petkov , "H. Peter Anvin" , Andy Lutomirski , Oleg Nesterov , Frederic Weisbecker , Alexei Starovoitov , Will Drewry , Kees Cook , x86@kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/3 RESEND] x86, acpi: Eliminate saved_eip global variable Date: Fri, 3 Jul 2015 22:08:33 +0200 Message-Id: <1435954115-1800-1-git-send-email-dvlasenk@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1887 Lines: 74 Get rid of the global variable saved_eip as it is only written to. Jump directly to ret_point instead. No functionality change. Run-tested. Signed-off-by: Denys Vlasenko CC: Pavel Machek CC: Linus Torvalds CC: Steven Rostedt CC: Ingo Molnar CC: Borislav Petkov CC: "H. Peter Anvin" CC: Andy Lutomirski CC: Oleg Nesterov CC: Frederic Weisbecker CC: Alexei Starovoitov CC: Will Drewry CC: Kees Cook CC: x86@kernel.org CC: linux-kernel@vger.kernel.org --- All three patches are a resend. They still apply cleanly to mingo/tip.git arch/x86/kernel/acpi/wakeup_32.S | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/arch/x86/kernel/acpi/wakeup_32.S b/arch/x86/kernel/acpi/wakeup_32.S index 665c6b7..eef2bd3 100644 --- a/arch/x86/kernel/acpi/wakeup_32.S +++ b/arch/x86/kernel/acpi/wakeup_32.S @@ -31,17 +31,11 @@ wakeup_pmode_return: movl %cs:saved_magic, %eax cmpl $0x12345678, %eax - jne bogus_magic - - # jump to place where we left off - movl saved_eip, %eax - jmp *%eax - + je ret_point bogus_magic: jmp bogus_magic - save_registers: sidt saved_idt sldt saved_ldt @@ -56,7 +50,6 @@ save_registers: pushfl popl saved_context_eflags - movl $ret_point, saved_eip ret @@ -88,7 +81,6 @@ ret_point: .data ALIGN ENTRY(saved_magic) .long 0 -ENTRY(saved_eip) .long 0 # saved registers saved_idt: .long 0,0 -- 1.8.1.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/