From patchwork Thu Aug 31 08:10:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lv Zheng X-Patchwork-Id: 9931473 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 1E7D860362 for ; Thu, 31 Aug 2017 08:11:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0598F28893 for ; Thu, 31 Aug 2017 08:11:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ED12D28899; Thu, 31 Aug 2017 08:11:26 +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 6D35928893 for ; Thu, 31 Aug 2017 08:11:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751387AbdHaIKo (ORCPT ); Thu, 31 Aug 2017 04:10:44 -0400 Received: from mga09.intel.com ([134.134.136.24]:14490 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751842AbdHaIKl (ORCPT ); Thu, 31 Aug 2017 04:10:41 -0400 Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 31 Aug 2017 01:10:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,451,1498546800"; d="scan'208";a="1167855587" Received: from lvzheng-moblsp3.sh.intel.com ([10.239.159.38]) by orsmga001.jf.intel.com with ESMTP; 31 Aug 2017 01:10:38 -0700 From: Lv Zheng To: "Rafael J . Wysocki" , "Rafael J . Wysocki" , Len Brown Cc: Lv Zheng , Lv Zheng , linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org Subject: [PATCH v4 3/3] ACPI / EC: Enable noirq stage event detection Date: Thu, 31 Aug 2017 16:10:37 +0800 Message-Id: <64a875783cf29f651261ba7e881cc5ac5c5e0c4b.1504166863.git.lv.zheng@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: References: <99f23db65bbe89ee856018629654584a96734c84.1501141963.git.lv.zheng@intel.com> 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 This patch enables noirq stage event detection for the EC driver. EC is a very special driver, required to detecting events throughout the entire suspend/resume process. Thus this patch enables event detection for EC during noirq stages to meet this requirement. This is done by making sure that the EC sleep APIs: acpi_ec_block_transactions() acpi_ec_unblock_transactions() rather than the EC driver suspend/resume hooks: acpi_ec_suspend() acpi_ec_resume() are the boundary of the EC event handling during suspend/resume, so that the ACPI sleep core can tune their invocation timing to handle special BIOS requirements. If this commit is bisected to be a regression culprit, please report this to bugzilla.kernel.org for further investigation. Link: https://bugzilla.kernel.org/show_bug.cgi?id=196129 Signed-off-by: Lv Zheng Tested-by: Tomislav Ivek --- drivers/acpi/ec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index 9363656..36ce5e7 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c @@ -157,7 +157,7 @@ static bool ec_no_wakeup __read_mostly; module_param(ec_no_wakeup, bool, 0644); MODULE_PARM_DESC(ec_no_wakeup, "Do not wake up from suspend-to-idle"); -static bool ec_detect_noirq_events __read_mostly; +static bool ec_detect_noirq_events __read_mostly = true; module_param(ec_detect_noirq_events, bool, 0644); MODULE_PARM_DESC(ec_detect_noirq_events, "Enabling event detection during noirq stage");