From patchwork Mon Aug 31 07:16:15 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Zhang, Rui" X-Patchwork-Id: 44810 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 n7V7IJst023056 for ; Mon, 31 Aug 2009 07:18:19 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750822AbZHaHSP (ORCPT ); Mon, 31 Aug 2009 03:18:15 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1750927AbZHaHSP (ORCPT ); Mon, 31 Aug 2009 03:18:15 -0400 Received: from mga02.intel.com ([134.134.136.20]:58529 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750822AbZHaHSP (ORCPT ); Mon, 31 Aug 2009 03:18:15 -0400 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 31 Aug 2009 00:05:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.44,304,1249282800"; d="scan'208";a="444144048" Received: from rzhang-dt.sh.intel.com (HELO [10.239.36.60]) ([10.239.36.60]) by orsmga002.jf.intel.com with ESMTP; 31 Aug 2009 00:24:34 -0700 Subject: [PATCH] ACPI: introduce kernel parameter acpi_sleep=s3_sci_enable From: Zhang Rui To: Len Brown Cc: linux-acpi , "Rafael J. Wysocki" , "Zhang, Rui" Date: Mon, 31 Aug 2009 15:16:15 +0800 Message-Id: <1251702975.3483.140.camel@rzhang-dt> Mime-Version: 1.0 X-Mailer: Evolution 2.22.1 (2.22.1-2.fc9) Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org Introduce kernel parameter acpi_sleep=s3_sci_enable some laptop requires SCI_EN being set directly on resume, or else they hung somewhere in the resume code path. We already have a blacklist for these lattops but we still need this option, especially when debugging some suspend/resume problems. Signed-off-by: Zhang Rui --- Documentation/kernel-parameters.txt | 3 ++- arch/x86/kernel/acpi/sleep.c | 4 ++++ drivers/acpi/sleep.c | 6 ++++++ include/linux/acpi.h | 3 +++ 4 files changed, 15 insertions(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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_sci_enable", 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 @@ -255,6 +255,9 @@ 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); +#ifdef CONFIG_SUSPEND +void __init acpi_set_sci_en_on_resume(void); +#endif /* CONFIG_SUSPEND*/ #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 @@ -240,7 +240,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_sci_enable } 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 @@ -253,6 +253,7 @@ 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_sci_enable sets SCI_EN directly on resume. acpi_use_timer_override [HW,ACPI] Use timer override. For some broken Nvidia NF5 boards