From patchwork Wed Oct 28 01:36:50 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhang Rui X-Patchwork-Id: 56201 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n9S1dJQx000569 for ; Wed, 28 Oct 2009 01:39:19 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757158AbZJ1Biy (ORCPT ); Tue, 27 Oct 2009 21:38:54 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757161AbZJ1Biy (ORCPT ); Tue, 27 Oct 2009 21:38:54 -0400 Received: from mga11.intel.com ([192.55.52.93]:58251 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757158AbZJ1Bix (ORCPT ); Tue, 27 Oct 2009 21:38:53 -0400 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 27 Oct 2009 18:25:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.44,636,1249282800"; d="scan'208";a="508218813" Received: from rzhang-dt.sh.intel.com (HELO [10.239.36.60]) ([10.239.36.60]) by fmsmga002.fm.intel.com with ESMTP; 27 Oct 2009 18:30:24 -0700 Subject: Re: [PATCH] ACPI: introduce kernel parameter acpi_sleep=s3_set_sci_en From: Zhang Rui To: "Rafael J. Wysocki" Cc: "Brown, Len" , "linux-acpi@vger.kernel.org" In-Reply-To: <200910270921.42618.rjw@sisk.pl> References: <1256610232.19142.77.camel@rzhang-dt> <200910270921.42618.rjw@sisk.pl> Date: Wed, 28 Oct 2009 09:36:50 +0800 Message-Id: <1256693810.19142.87.camel@rzhang-dt> Mime-Version: 1.0 X-Mailer: Evolution 2.24.1 (2.24.1-2.fc10) Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org Index: linux-2.6/drivers/acpi/sleep.c =================================================================== --- linux-2.6.orig/drivers/acpi/sleep.c +++ linux-2.6/drivers/acpi/sleep.c @@ -182,6 +182,12 @@ static void acpi_pm_end(void) */ static bool set_sci_en_on_resume; +void __init acpi_set_sci_en_on_resume(void) +{ + set_sci_en_on_resume = true; + return 0; +} + extern void do_suspend_lowlevel(void); static u32 acpi_suspend_states[] = { Index: linux-2.6/arch/x86/kernel/acpi/sleep.c =================================================================== --- linux-2.6.orig/arch/x86/kernel/acpi/sleep.c +++ linux-2.6/arch/x86/kernel/acpi/sleep.c @@ -162,6 +162,10 @@ static int __init acpi_sleep_setup(char #endif if (strncmp(str, "old_ordering", 12) == 0) acpi_old_suspend_ordering(); +#ifdef CONFIG_SUSPEND + if (strncmp(str, "s3_set_sci_en", 13) == 0) + acpi_set_sci_en_on_resume(); +#endif /* CONFIG_SUSPEND */ str = strchr(str, ','); if (str != NULL) str += strspn(str, ", \t"); Index: linux-2.6/include/linux/acpi.h =================================================================== --- linux-2.6.orig/include/linux/acpi.h +++ linux-2.6/include/linux/acpi.h @@ -251,6 +251,7 @@ int acpi_check_mem_region(resource_size_ void __init acpi_no_s4_hw_signature(void); void __init acpi_old_suspend_ordering(void); void __init acpi_s4_no_nvs(void); +void __init acpi_set_sci_en_on_resume(void); #endif /* CONFIG_PM_SLEEP */ #define OSC_QUERY_TYPE 0 Index: linux-2.6/Documentation/kernel-parameters.txt =================================================================== --- linux-2.6.orig/Documentation/kernel-parameters.txt +++ linux-2.6/Documentation/kernel-parameters.txt @@ -241,7 +241,7 @@ and is between 256 and 4096 characters. acpi_sleep= [HW,ACPI] Sleep options Format: { s3_bios, s3_mode, s3_beep, s4_nohwsig, - old_ordering, s4_nonvs } + old_ordering, s4_nonvs, s3_set_sci_en } See Documentation/power/video.txt for information on s3_bios and s3_mode. s3_beep is for debugging; it makes the PC's speaker beep @@ -254,6 +254,9 @@ and is between 256 and 4096 characters. of _PTS is used by default). s4_nonvs prevents the kernel from saving/restoring the ACPI NVS memory during hibernation. + s3_set_sci_en causes the kernel to set SCI_EN directly + on resume from S3 (which is against the ACPI specification, + but some broken systems don't work without it). acpi_use_timer_override [HW,ACPI] Use timer override. For some broken Nvidia NF5 boards