Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3361800imm; Mon, 13 Aug 2018 10:18:26 -0700 (PDT) X-Google-Smtp-Source: AA+uWPxWXoUsR3Bt6LznUg02o4+ZZaZXTMhppsUj9qAfmgBGjVmfVVGrw5fjc9O3kIDoXAPt86Ml X-Received: by 2002:a62:f208:: with SMTP id m8-v6mr19723359pfh.171.1534180706674; Mon, 13 Aug 2018 10:18:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534180706; cv=none; d=google.com; s=arc-20160816; b=VwzAb4qih5x37nlkcIe4qzNDZeXN9F4Boa7DqAg1mZJBPpFzwmzkBRHsEeW1bj2DXZ gTXer5xT+DDmXLrz3TSOw9Lh401WPwHyO9EeN+0tuz4nQgDzHoFc6vIoL4kEcgeGxF04 9AO4mVA1bhdpqc6DihK7/sbGkdy5Z7DdQKY/FSstzITES0dBPtx3YTuUgU82yDoZQeig LE2/6NOZI5bSvyPGBVjvyzKq0dYrh/SBWEPFHBXVE35EHRROKZujxelKkb08H93V/nNS Ukqx0TzyOZquKdBmbAHorzPf0/0M6XLw1/l91n9xQgTMZneLCmB9WpcH3tgbVTeJWbNj /elA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :dlp-reaction:dlp-version:dlp-product:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:arc-authentication-results; bh=7QGcRQsc1cjzSpVL6CZFPakALLLxIrmGohcVKDQDN7o=; b=QXsjGIivIAJFnluhO1wI9FUSPrZ1yN2V07q1OyhIPnojwLW889k4KBRm7WR8K8xQlD QEo0XtHdwY+HMSk77Qkb0D2wTwINYNW5e/v8AKW5u+1fOBadXde4oGnmM7zl4QEJo7ku wgHu+xiJFBD7tD52TgA9FjJ8c0m/vcxizYB7LHtH8LmcXf82mLI37Kr3mcJD3Z6lvOMl C0srirmTrAyOLLKXNpAv7I+Czp2FMPrzKJmdwngdsyxfx7NI/ej0p0xco9G/tfMaxUk0 TRkjkp0bEO+ro9JzaYsWERFRYhkmIyINkJl9NB94fIvztkpKc+7+chB8XYCCtYmGlULa k1zQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r3-v6si17543136pgo.606.2018.08.13.10.18.11; Mon, 13 Aug 2018 10:18:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730375AbeHMT61 convert rfc822-to-8bit (ORCPT + 99 others); Mon, 13 Aug 2018 15:58:27 -0400 Received: from mga07.intel.com ([134.134.136.100]:11236 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729290AbeHMT61 (ORCPT ); Mon, 13 Aug 2018 15:58:27 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Aug 2018 10:15:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,234,1531810800"; d="scan'208";a="83020668" Received: from orsmsx107.amr.corp.intel.com ([10.22.240.5]) by orsmga002.jf.intel.com with ESMTP; 13 Aug 2018 10:15:20 -0700 Received: from orsmsx112.amr.corp.intel.com (10.22.240.13) by ORSMSX107.amr.corp.intel.com (10.22.240.5) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 13 Aug 2018 10:15:20 -0700 Received: from orsmsx110.amr.corp.intel.com ([169.254.10.41]) by ORSMSX112.amr.corp.intel.com ([169.254.3.2]) with mapi id 14.03.0319.002; Mon, 13 Aug 2018 10:15:20 -0700 From: "Schmauss, Erik" To: "Rafael J. Wysocki" , Linux ACPI CC: Paul Menzel , Linux PM , LKML Subject: RE: [PATCH] ACPICA: Clear status of all events when entering sleep states Thread-Topic: [PATCH] ACPICA: Clear status of all events when entering sleep states Thread-Index: AQHUMiqLwP6eT+bgikuipgTaRX9Zg6S97crg Date: Mon, 13 Aug 2018 17:15:19 +0000 Message-ID: References: <1764673.ub23GCSM6t@aspire.rjw.lan> In-Reply-To: <1764673.ub23GCSM6t@aspire.rjw.lan> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMTU0M2ZjNjEtZWZiNi00ZmY5LWIxMGItN2I0NjYzNmQ3NGYzIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoid280OURURHdUa0VzTmRkVmRuSEhGMkt6Y0RsWXNIdzRcL2dcL3kxdDRoVkpWOUczVlpjNjVtY1N0T25UUHVkeTJcLyJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.200.100 dlp-reaction: no-action x-originating-ip: [10.22.254.138] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > -----Original Message----- > From: linux-acpi-owner@vger.kernel.org [mailto:linux-acpi- > owner@vger.kernel.org] On Behalf Of Rafael J. Wysocki > Sent: Sunday, August 12, 2018 3:50 AM > To: Linux ACPI > Cc: Paul Menzel ; Linux PM pm@vger.kernel.org>; LKML ; Schmauss, Erik > > Subject: [PATCH] ACPICA: Clear status of all events when entering sleep states > > From: Rafael J. Wysocki > > Commit fa85015c0d95 (ACPICA: Clear status of all events when entering > S5) made the sleep state entry code in ACPICA clear the status of all ACPI events > when entering S5 to fix a functional regression reported against commit > 18996f2db918 (ACPICA: Events: Stop unconditionally clearing ACPI IRQs during > suspend/resume). However, it is reported now that the regression also affects > system states other than S5 on some systems and causes them to wake up from > sleep prematurely. > > For this reason, make the code in question clear the status of all ACPI events > when entering all sleep states (in addition to S5) to avoid the premature > wakeups (this may cause some wakeup events to be missed in theory, but the > likelihood of that is small and the change here simply restores the previous > behavior of the code). > > Fixes: 18996f2db918 (ACPICA: Events: Stop unconditionally clearing ACPI IRQs > during suspend/resume) > Reported-by: Paul Menzel > Tested-by: Paul Menzel > Cc: 4.17+ # 4.17+: fa85015c0d95 ACPICA: Clear > status ... > Signed-off-by: Rafael J. Wysocki > --- > drivers/acpi/acpica/hwsleep.c | 11 +++-------- > 1 file changed, 3 insertions(+), 8 deletions(-) > > Index: linux-pm/drivers/acpi/acpica/hwsleep.c > ================================================================= > == > --- linux-pm.orig/drivers/acpi/acpica/hwsleep.c > +++ linux-pm/drivers/acpi/acpica/hwsleep.c > @@ -56,14 +56,9 @@ acpi_status acpi_hw_legacy_sleep(u8 slee > if (ACPI_FAILURE(status)) { > return_ACPI_STATUS(status); > } > - /* > - * If the target sleep state is S5, clear all GPEs and fixed events too > - */ > - if (sleep_state == ACPI_STATE_S5) { > - status = acpi_hw_clear_acpi_status(); > - if (ACPI_FAILURE(status)) { > - return_ACPI_STATUS(status); > - } > + status = acpi_hw_clear_acpi_status(); > + if (ACPI_FAILURE(status)) { > + return_ACPI_STATUS(status); > } > acpi_gbl_system_awake_and_running = FALSE; > I'll backport this for the next ACPICA release Thanks, Erik