Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3206579imm; Tue, 17 Jul 2018 00:24:14 -0700 (PDT) X-Google-Smtp-Source: AAOMgpec+txKBwLN1OpbFElwaWZJ6kyQhcpJDqmSmPzr2m+8q5HxSVCYUIlAxixJsVZ4Y3Mx2AOw X-Received: by 2002:a65:608b:: with SMTP id t11-v6mr465577pgu.259.1531812254300; Tue, 17 Jul 2018 00:24:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531812254; cv=none; d=google.com; s=arc-20160816; b=Ggqw5GOcV0GxWjOhP2NCSUlhA1oa3hUIOxj1CGtWAP9rN2MiXsHlnuhPPRsFbg6KSI Pc08zdFwz5XFfxPHFRpKbyPHpFJyKeDdiSHeKDzL+l4MPWXnRD4uohYil/2nxKj9bujw ixPXbhNReOCjk0tcjVetrA0taYx4Pqv34guzRrOxtus7IyCrpsJ2uEja1R0thHzKpSgc qR8PqWRfF9SbSVXXqJVTJn7Zr5ra/1wiWzNGXIeSRcXGkTYjOojvvpDl/AB4a/8wSiHu lgEBG3xkwO9oVmABN0nrg9lkbz4ZF5VaSKlWmmdcgaVr9fiwCSuNUKfNwRL97xxtgs9g AqSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:references:in-reply-to:mime-version :dkim-signature:arc-authentication-results; bh=el7ejpWXstJDyd+qyxw0SMZcUiX9w1BBKOxZq/mVX/4=; b=f2pEFIeoYh/8/Rj+KvHeDRW8GXYKSWe4DKN5Yz96tU1qT7FlynErs8A6I2FC/2R4VU UBA1Se29an5stOZcaaIn5vT/glij9AJQTFTPOiobvaWSD/VFaYXJtpr3pBpV0QakJs+E 9zrOjiiVreaQUq0qv8cycilUeRLSp+qwzOWOh/h5xFN/n3e3R8psil+/CYLjt2Xhaf/C PMUtUq8Ys6CNfx9+SkGW+02cEfstCFFbw4yjkL7D/XPS9lDYb1MbzTg1nMROIeuFcQzX yAcqLCCMnLcZNvp5C20eGLjsLbYsEacRdM5VnVNI/OD5m7W6q0QVuMAdm7xCrmRwwYVX zk1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=H2H+TLs5; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n11-v6si236946plk.225.2018.07.17.00.23.59; Tue, 17 Jul 2018 00:24:14 -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; dkim=fail header.i=@gmail.com header.s=20161025 header.b=H2H+TLs5; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729508AbeGQHyf (ORCPT + 99 others); Tue, 17 Jul 2018 03:54:35 -0400 Received: from mail-oi0-f67.google.com ([209.85.218.67]:39036 "EHLO mail-oi0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728024AbeGQHyf (ORCPT ); Tue, 17 Jul 2018 03:54:35 -0400 Received: by mail-oi0-f67.google.com with SMTP id d189-v6so197246oib.6; Tue, 17 Jul 2018 00:23:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-transfer-encoding; bh=el7ejpWXstJDyd+qyxw0SMZcUiX9w1BBKOxZq/mVX/4=; b=H2H+TLs5Kuv1UlErNkAqFzh6ypheugyID4jCaSKhe9nWmWXTcQzbPLtNZV4cVyKvpg YhRrHQrQDuLMuP2sbLQEt7u9/kpyeKMopKs8Cjqi34xrhKQUG8L/+JRw1yTMnGylZ+yv CfTlI9pO4zL+6mPMhnkcq7HRg7w/STLyY3YfZZxY7H++ifiK8NW9XfQ4/YVgsugmR34G sew9jCeLVhNiyCVfqRIYKeVtULtfOwvag4yTH32J+mPp5y0ZJ9MidBaKlwSf2KmJm2S4 NDxZwwURdFUBWkDcPyXPAU7UjmISzu7zycsbTVny3TvFg8soliNQg0ALq7SpyaXbe4LC Z3sg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-transfer-encoding; bh=el7ejpWXstJDyd+qyxw0SMZcUiX9w1BBKOxZq/mVX/4=; b=qt8fsTEbz75eanAMB6C/hMAB5xQHCFJOjMMWonNwTo9kvwBDVdPskGxwZBcYg2entc /o1ogud+W4Eip2cTZN/W15dacxzdbxIj0zf0dBJR436hV0Bp55D2plBtfB2CR7WZE9h6 gny8Qup8+UyhPcSk2asV9eN2Tii7c5C+/2jB1J7LeSP9Tz1ILdoUwDOvMTnm553uvv1X kU09kzHZGrZye1oTJTkZ4CT2wJw3N5cWsNXG2DZBXujvyEyNd9wVSWYhEHyN26Tc8y+0 Jc3myLF2N38tzceuK0sEDgkOUkmjWXacA3aCwyfra0d37jfBlQUTccxfGc88dpmxIgJ9 cObA== X-Gm-Message-State: AOUpUlG1fL6Ttp+9xiBSO2FVsHJ7k+d89J852YvuzjEQXFyNqBWHKJq1 qb+bW/o1isG5rdo3GX1Fmdwj7q8SGLL/dM5rB8s= X-Received: by 2002:aca:42:: with SMTP id 63-v6mr454245oia.154.1531812203814; Tue, 17 Jul 2018 00:23:23 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a9d:63d2:0:0:0:0:0 with HTTP; Tue, 17 Jul 2018 00:23:23 -0700 (PDT) In-Reply-To: References: <1704080.gFTvVrrZA1@aspire.rjw.lan> <6f01a906-b27c-0e1a-e9f6-fa27c015faa3@cosifan.de> <2396867.eZQXUlvGZn@aspire.rjw.lan> From: "Rafael J. Wysocki" Date: Tue, 17 Jul 2018 09:23:23 +0200 X-Google-Sender-Auth: 0p8VSuK3hJDx8BBpjffHq5LFbXM Message-ID: Subject: Re: [PATCH] ACPICA: Clear status of all events when entering S5 To: "Schmauss, Erik" Cc: "Rafael J. Wysocki" , Linux ACPI , =?UTF-8?Q?Thomas_H=C3=A4nig?= , Takashi Iwai , Linux PM , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 16, 2018 at 7:59 PM, Schmauss, Erik w= rote: > >> -----Original Message----- >> From: Rafael J. Wysocki [mailto:rjw@rjwysocki.net] >> Sent: Sunday, July 8, 2018 2:10 AM >> To: Linux ACPI >> Cc: Thomas H=C3=A4nig ; Takashi Iwai ; >> Schmauss, Erik ; Linux PM > pm@vger.kernel.org>; Linux Kernel Mailing List >> Subject: [PATCH] ACPICA: Clear status of all events when entering S5 >> >> From: Rafael J. Wysocki >> >> After commit 18996f2db918 (ACPICA: Events: Stop unconditionally clearing= ACPI >> IRQs during suspend/resume) the status of ACPI events is not cleared any= more >> when entering the ACPI S5 system state (power >> off) which causes some systems to power up immediately after turing off = power >> in certain situations. >> >> That is a functional regression, so address it by making the code clear = the status >> of all ACPI events again when entering S5 (for system-wide suspend or >> hibernation the clearing of the status of all events is not desirable, a= s it might >> cause the kernel to miss wakeup events sometimes). >> >> Fixes: 18996f2db918 (ACPICA: Events: Stop unconditionally clearing ACPI = IRQs >> during suspend/resume) >> Reported-by: Takashi Iwai >> Tested-by: Thomas H=C3=A4nig >> Signed-off-by: Rafael J. Wysocki >> --- >> >> Resend https://patchwork.kernel.org/patch/10511451/ with a changelig and >> tags. >> >> --- >> drivers/acpi/acpica/hwsleep.c | 15 +++++++++++---- >> 1 file changed, 11 insertions(+), 4 deletions(-) >> >> Index: linux-pm/drivers/acpi/acpica/hwsleep.c >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >> =3D=3D >> --- linux-pm.orig/drivers/acpi/acpica/hwsleep.c >> +++ linux-pm/drivers/acpi/acpica/hwsleep.c >> @@ -51,16 +51,23 @@ acpi_status acpi_hw_legacy_sleep(u8 slee >> return_ACPI_STATUS(status); >> } >> >> - /* >> - * 1) Disable all GPEs >> - * 2) Enable all wakeup GPEs >> - */ >> + /* Disable all GPEs */ >> status =3D acpi_hw_disable_all_gpes(); >> if (ACPI_FAILURE(status)) { >> return_ACPI_STATUS(status); >> } >> + /* >> + * If the target sleep state is S5, clear all GPEs and fixed event= s too >> + */ >> + if (sleep_state =3D=3D ACPI_STATE_S5) { >> + status =3D acpi_hw_clear_acpi_status(); >> + if (ACPI_FAILURE(status)) { >> + return_ACPI_STATUS(status); >> + } >> + } >> acpi_gbl_system_awake_and_running =3D FALSE; >> >> + /* Enable all wakeup GPEs */ >> status =3D acpi_hw_enable_all_wakeup_gpes(); >> if (ACPI_FAILURE(status)) { >> return_ACPI_STATUS(status); > > Rafael, I've created an ACPICA pull request containing this patch. OK, thanks! The patch is in the mainline kernel tree already at this point, so that's an upstream only thing. Can you please also do likewise for https://patchwork.kernel.org/patch/10495943/ ? Thanks, Rafael