From patchwork Tue Apr 14 02:38:16 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Zhao, Yakui" X-Patchwork-Id: 18004 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 n3E2av6s013651 for ; Tue, 14 Apr 2009 02:36:58 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750721AbZDNCg5 (ORCPT ); Mon, 13 Apr 2009 22:36:57 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752439AbZDNCg5 (ORCPT ); Mon, 13 Apr 2009 22:36:57 -0400 Received: from mga14.intel.com ([143.182.124.37]:37650 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750721AbZDNCg4 (ORCPT ); Mon, 13 Apr 2009 22:36:56 -0400 Received: from azsmga001.ch.intel.com ([10.2.17.19]) by azsmga102.ch.intel.com with ESMTP; 13 Apr 2009 19:36:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.40,182,1239001200"; d="scan'208";a="131103313" Received: from yakui_zhao.sh.intel.com (HELO [10.239.36.130]) ([10.239.36.130]) by azsmga001.ch.intel.com with ESMTP; 13 Apr 2009 19:36:55 -0700 Subject: [PATCH]: ACPI: Delete the evaluation of _GTS/_BFS object From: yakui_zhao To: lenb@kernel.org Cc: linux-acpi@vger.kernel.org Organization: Intel Open Source Technology Center Date: Tue, 14 Apr 2009 10:38:16 +0800 Message-Id: <1239676696.5564.57.camel@localhost.localdomain> 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 From: Zhao Yakui According to the ACPI 3.0b spec the _GTS/_BFS object is defined, in which the specific function can be performed. And the _GTS object should be evaluated just prior to setting the SLP_EN register. But on most boxes there is no _GTS/_BFS object. And even when they exists, they won't be evaluated on windows XP/Vista. At the same time on one box there exists the _GTS object, in which the EC is accessed. If EC access is deleted in _GTS object, the S3/S4/S5 can work well. In fact this bug is also related with the incorrect EC working mode. In the course of suspend/resume/shutdown the polling mode should be used and the udelay should be used instead of msleep because the timer interrupt is disabled. But it will be easier to delete the _GTS/_BFS object. http://bugzilla.kernel.org/show_bug.cgi?id=13041 Signed-off-by: Zhao Yakui --- drivers/acpi/acpica/hwsleep.c | 27 --------------------------- 1 file changed, 27 deletions(-) -- 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/acpica/hwsleep.c =================================================================== --- linux-2.6.orig/drivers/acpi/acpica/hwsleep.c 2009-04-09 14:09:25.000000000 +0800 +++ linux-2.6/drivers/acpi/acpica/hwsleep.c 2009-04-13 10:14:08.000000000 +0800 @@ -230,8 +230,6 @@ struct acpi_bit_register_info *sleep_type_reg_info; struct acpi_bit_register_info *sleep_enable_reg_info; u32 in_value; - struct acpi_object_list arg_list; - union acpi_object arg; acpi_status status; ACPI_FUNCTION_TRACE(acpi_enter_sleep_state); @@ -278,17 +276,6 @@ return_ACPI_STATUS(status); } - /* Execute the _GTS method */ - - arg_list.count = 1; - arg_list.pointer = &arg; - arg.type = ACPI_TYPE_INTEGER; - arg.integer.value = sleep_state; - - status = acpi_evaluate_object(NULL, METHOD_NAME__GTS, &arg_list, NULL); - if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) { - return_ACPI_STATUS(status); - } /* Get current value of PM1A control */ @@ -462,8 +449,6 @@ ******************************************************************************/ acpi_status acpi_leave_sleep_state_prep(u8 sleep_state) { - struct acpi_object_list arg_list; - union acpi_object arg; acpi_status status; struct acpi_bit_register_info *sleep_type_reg_info; struct acpi_bit_register_info *sleep_enable_reg_info; @@ -513,18 +498,6 @@ } } - /* Execute the _BFS method */ - - arg_list.count = 1; - arg_list.pointer = &arg; - arg.type = ACPI_TYPE_INTEGER; - arg.integer.value = sleep_state; - - status = acpi_evaluate_object(NULL, METHOD_NAME__BFS, &arg_list, NULL); - if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) { - ACPI_EXCEPTION((AE_INFO, status, "During Method _BFS")); - } - return_ACPI_STATUS(status); }