From patchwork Fri Aug 11 05:57:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lv Zheng X-Patchwork-Id: 9894983 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 40CF060236 for ; Fri, 11 Aug 2017 05:57:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 31B1728BE2 for ; Fri, 11 Aug 2017 05:57:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 265F628BFB; Fri, 11 Aug 2017 05:57:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 87FEB28BE2 for ; Fri, 11 Aug 2017 05:57:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751873AbdHKF5j (ORCPT ); Fri, 11 Aug 2017 01:57:39 -0400 Received: from mga05.intel.com ([192.55.52.43]:62303 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750815AbdHKF5g (ORCPT ); Fri, 11 Aug 2017 01:57:36 -0400 Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga105.fm.intel.com with ESMTP; 10 Aug 2017 22:57:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,356,1498546800"; d="scan'208";a="1002479508" Received: from unknown (HELO lvzheng-MOBLsp3.sh.intel.com) ([10.239.159.74]) by orsmga003.jf.intel.com with ESMTP; 10 Aug 2017 22:57:34 -0700 From: Lv Zheng To: "Rafael J . Wysocki" , Len Brown , Robert Moore , Lv Zheng , "David E . Box" Cc: Lv Zheng , linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, devel@acpica.org Subject: [PATCH 1/2] ACPICA: Events: Stop unconditionally clearing ACPI IRQs during suspend/resume Date: Fri, 11 Aug 2017 13:57:32 +0800 Message-Id: <51eda0b8aad7a7578802b966fd406498a25fe004.1502430636.git.lv.zheng@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: References: Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Unconditionally clearing ACPI IRQs during suspend/resume can lead to unexpected IRQ losts. This patch fixes this issue by removing such IRQ clearing code. If this patch triggers regression, the regression should be in the GPE handlers that cannot correctly determine some spurious triggered events as no-ops. Please report any regression related to this commit to the ACPI component on kernel bugzilla. Reported by Eric Bakula-Davis, fixed by Lv Zheng. Link: https://bugzilla.kernel.org/show_bug.cgi?id=196249 Signed-off-by: Lv Zheng Reported-and-tested-by: Eric Bakula-Davis Tested-by: Mika Westerberg --- drivers/acpi/acpica/evgpe.c | 7 ------- drivers/acpi/acpica/hwgpe.c | 1 - drivers/acpi/acpica/hwsleep.c | 11 ++--------- drivers/acpi/acpica/hwxfsleep.c | 2 +- 4 files changed, 3 insertions(+), 18 deletions(-) diff --git a/drivers/acpi/acpica/evgpe.c b/drivers/acpi/acpica/evgpe.c index 2293820..390a5ce 100644 --- a/drivers/acpi/acpica/evgpe.c +++ b/drivers/acpi/acpica/evgpe.c @@ -115,13 +115,6 @@ acpi_status acpi_ev_enable_gpe(struct acpi_gpe_event_info *gpe_event_info) ACPI_FUNCTION_TRACE(ev_enable_gpe); - /* Clear the GPE (of stale events) */ - - status = acpi_hw_clear_gpe(gpe_event_info); - if (ACPI_FAILURE(status)) { - return_ACPI_STATUS(status); - } - /* Enable the requested GPE */ status = acpi_hw_low_set_gpe(gpe_event_info, ACPI_GPE_ENABLE); diff --git a/drivers/acpi/acpica/hwgpe.c b/drivers/acpi/acpica/hwgpe.c index 5eb11b3..e004d5f 100644 --- a/drivers/acpi/acpica/hwgpe.c +++ b/drivers/acpi/acpica/hwgpe.c @@ -497,7 +497,6 @@ acpi_status acpi_hw_disable_all_gpes(void) ACPI_FUNCTION_TRACE(hw_disable_all_gpes); status = acpi_ev_walk_gpe_list(acpi_hw_disable_gpe_block, NULL); - status = acpi_ev_walk_gpe_list(acpi_hw_clear_gpe_block, NULL); return_ACPI_STATUS(status); } diff --git a/drivers/acpi/acpica/hwsleep.c b/drivers/acpi/acpica/hwsleep.c index 1fe7387..8f54af6 100644 --- a/drivers/acpi/acpica/hwsleep.c +++ b/drivers/acpi/acpica/hwsleep.c @@ -85,15 +85,8 @@ acpi_status acpi_hw_legacy_sleep(u8 sleep_state) return_ACPI_STATUS(status); } - /* Clear all fixed and general purpose status bits */ - - status = acpi_hw_clear_acpi_status(); - if (ACPI_FAILURE(status)) { - return_ACPI_STATUS(status); - } - /* - * 1) Disable/Clear all GPEs + * 1) Disable all GPEs * 2) Enable all wakeup GPEs */ status = acpi_hw_disable_all_gpes(); @@ -299,7 +292,7 @@ acpi_status acpi_hw_legacy_wake(u8 sleep_state) * might get fired there * * Restore the GPEs: - * 1) Disable/Clear all GPEs + * 1) Disable all GPEs * 2) Enable all runtime GPEs */ status = acpi_hw_disable_all_gpes(); diff --git a/drivers/acpi/acpica/hwxfsleep.c b/drivers/acpi/acpica/hwxfsleep.c index 7ef1393..1888107 100644 --- a/drivers/acpi/acpica/hwxfsleep.c +++ b/drivers/acpi/acpica/hwxfsleep.c @@ -206,7 +206,7 @@ acpi_status acpi_enter_sleep_state_s4bios(void) } /* - * 1) Disable/Clear all GPEs + * 1) Disable all GPEs * 2) Enable all wakeup GPEs */ status = acpi_hw_disable_all_gpes();