From patchwork Fri Jul 27 00:34:48 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Len Brown X-Patchwork-Id: 1246661 Return-Path: X-Original-To: patchwork-linux-acpi@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 98F40DFFCE for ; Fri, 27 Jul 2012 00:35:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752810Ab2G0AfB (ORCPT ); Thu, 26 Jul 2012 20:35:01 -0400 Received: from mail-vb0-f46.google.com ([209.85.212.46]:64504 "EHLO mail-vb0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752621Ab2G0AfB (ORCPT ); Thu, 26 Jul 2012 20:35:01 -0400 Received: by mail-vb0-f46.google.com with SMTP id ff1so2252729vbb.19 for ; Thu, 26 Jul 2012 17:35:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:reply-to:organization; bh=XfyQZq0v3Xtm820au8BIBZagFaZSfEsoky3Q0iMC9fs=; b=0lsJ+RpLcLhg++XLhuj9UGzAmd9ThcrcSk57ubEi6nt6Tq1Z6HP64ceeTSfl8ZoMx1 DgQvSJUDIaP++o0vd2/2iwOV79kGjgywk4C7s/s5zW/kAg8dIzpmk3XObunxuBGVeZ70 HiTYvpd1jo473RdYuJaK4x6ppUFf17v3vsKoQqIJFCep7ptqBmb+ZW+5+IKYLqRg6kaM vz3iyQ5W2dZ+EY6yYJ60xIV+sgKCcdHH2BodeIYPs3ep3FhcGDTZdudcWFfzQT/r6ii+ mzYrc9dMmuDmD2fRPft6fIcjEFcuoOX5/Jop8iy5hO4ysFTjchf/6qf72n32qus84Ftf iXjg== Received: by 10.52.90.130 with SMTP id bw2mr515731vdb.131.1343349300779; Thu, 26 Jul 2012 17:35:00 -0700 (PDT) Received: from x980.localdomain6 (h184-61-125-197.altnnh.dsl.dynamic.tds.net. [184.61.125.197]) by mx.google.com with ESMTPS id d11sm744127vdf.15.2012.07.26.17.34.59 (version=SSLv3 cipher=OTHER); Thu, 26 Jul 2012 17:35:00 -0700 (PDT) From: Len Brown To: linux-acpi@vger.kernel.org, x86@kernel.org Cc: Len Brown , Konrad Rzeszutek Wilk , "H. Peter Anvin" Subject: [PATCH 1/2] ACPI/x86: revert 'x86, acpi: Call acpi_enter_sleep_state via an asmlinkage C function from assembler' Date: Thu, 26 Jul 2012 20:34:48 -0400 Message-Id: X-Mailer: git-send-email 1.7.12.rc0 In-Reply-To: <1343349289-31179-1-git-send-email-lenb@kernel.org> References: <1343349289-31179-1-git-send-email-lenb@kernel.org> Reply-To: Len Brown Organization: Intel Open Source Technology Center Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org From: Len Brown cd74257b974d6d26442c97891c4d05772748b177 patched up GTS/BFS -- a feature we want to remove. So revert it (by hand, due to conflict in sleep.h) to prepare for GTS/BFS removal. Signed-off-by: Len Brown Cc: Konrad Rzeszutek Wilk Cc: H. Peter Anvin --- arch/x86/kernel/acpi/sleep.c | 4 ---- arch/x86/kernel/acpi/sleep.h | 2 -- arch/x86/kernel/acpi/wakeup_32.S | 4 +++- arch/x86/kernel/acpi/wakeup_64.S | 4 +++- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/arch/x86/kernel/acpi/sleep.c b/arch/x86/kernel/acpi/sleep.c index 95bf99d..1b8e5a0 100644 --- a/arch/x86/kernel/acpi/sleep.c +++ b/arch/x86/kernel/acpi/sleep.c @@ -25,10 +25,6 @@ unsigned long acpi_realmode_flags; static char temp_stack[4096]; #endif -asmlinkage void acpi_enter_s3(void) -{ - acpi_enter_sleep_state(3, wake_sleep_flags); -} /** * acpi_suspend_lowlevel - save kernel state * diff --git a/arch/x86/kernel/acpi/sleep.h b/arch/x86/kernel/acpi/sleep.h index 5653a57..67f59f8 100644 --- a/arch/x86/kernel/acpi/sleep.h +++ b/arch/x86/kernel/acpi/sleep.h @@ -2,7 +2,6 @@ * Variables and functions used by the code in sleep.c */ -#include #include extern unsigned long saved_video_mode; @@ -11,7 +10,6 @@ extern long saved_magic; extern int wakeup_pmode_return; extern u8 wake_sleep_flags; -extern asmlinkage void acpi_enter_s3(void); extern unsigned long acpi_copy_wakeup_routine(unsigned long); extern void wakeup_long64(void); diff --git a/arch/x86/kernel/acpi/wakeup_32.S b/arch/x86/kernel/acpi/wakeup_32.S index 7261083..13ab720 100644 --- a/arch/x86/kernel/acpi/wakeup_32.S +++ b/arch/x86/kernel/acpi/wakeup_32.S @@ -74,7 +74,9 @@ restore_registers: ENTRY(do_suspend_lowlevel) call save_processor_state call save_registers - call acpi_enter_s3 + pushl $3 + call acpi_enter_sleep_state + addl $4, %esp # In case of S3 failure, we'll emerge here. Jump # to ret_point to recover diff --git a/arch/x86/kernel/acpi/wakeup_64.S b/arch/x86/kernel/acpi/wakeup_64.S index 014d1d2..8ea5164 100644 --- a/arch/x86/kernel/acpi/wakeup_64.S +++ b/arch/x86/kernel/acpi/wakeup_64.S @@ -71,7 +71,9 @@ ENTRY(do_suspend_lowlevel) movq %rsi, saved_rsi addq $8, %rsp - call acpi_enter_s3 + movl $3, %edi + xorl %eax, %eax + call acpi_enter_sleep_state /* in case something went wrong, restore the machine status and go on */ jmp resume_point