Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp3432504ybk; Tue, 19 May 2020 04:39:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwh1rGMZRxoit5evQ0lVMciORAJO+nLK0Wi4vltmZRM+hfvWlUhSbW7+C260qUav+seQx5e X-Received: by 2002:a17:906:d10f:: with SMTP id b15mr10062543ejz.227.1589888359846; Tue, 19 May 2020 04:39:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589888359; cv=none; d=google.com; s=arc-20160816; b=iXzG5e4kkwuWJWluL5Bj1u9oU8792Gn+VcLr5O2kjaQt88lV9Jtk2YCYXlxgg8ncTj k64CyKnVvbeoqXE8dlQ3Dq2DVKXJQhvu0GuqJSHEh5alyFchqxQ99ulJHhcoZz5vRos8 zxGaA9OyDjFy3s0ItLFOFKXdzxJhWUX1ZCZp6UXGFwle1HxGfDXhjPwIGaoP0chPrNhz lBaGj43roGxtUrKc6KOV2tASszOc61msX40dsyDLPZkZ7N5JScnMcuwSFAAL9+0BFvuc XN8eZr2kn6GY6MMRCQQIFoxh5kTKitioEySty03J2c1wfcRCvzTZjv4RMpkBjBFA9voJ 8vSw== 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:mime-version :message-id:date:subject:cc:to:from; bh=T5n32kix/vtPQP9/cGs0QGiUwc/5fh2q7HZ2NxPYsHY=; b=mZca8O3pl2Zjore8DZ3x6X9u/Nz7OClIZYguuLKYktshON5fcv2tUOc0aZAS5VULVb b/tXAbKWKVtlNG86R4ySwCW4LVPJm1Ab3Q3mClY+fTy2kJV7vDXI56GQBjuD5TKveajI XVVUj5/9vNWsvtEJsHbj9Cmxxe6P6XVlVX9d+gBEiBsL9lnubjktCzSLQTDLh9DcOia1 BkZotjOqiTgBTq1XTt2vpeIFXQhdysxOAoELhmP2PPMDo8rJ1V3uEZB66ScMRgQXpIVy 0Q7u+1RnvO8ewGkMyQoX57N3VgOHK+AMXq8/iueQaaiVgFGXlZOoibUqyJ8Fc7Ar5L0d yjng== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d1si8342730edl.266.2020.05.19.04.38.55; Tue, 19 May 2020 04:39:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728772AbgESLgw (ORCPT + 99 others); Tue, 19 May 2020 07:36:52 -0400 Received: from cloudserver094114.home.pl ([79.96.170.134]:46862 "EHLO cloudserver094114.home.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726508AbgESLgw (ORCPT ); Tue, 19 May 2020 07:36:52 -0400 Received: from 89-64-84-14.dynamic.chello.pl (89.64.84.14) (HELO kreacher.localnet) by serwer1319399.home.pl (79.96.170.134) with SMTP (IdeaSmtpServer 0.83.415) id a7004566450acdb1; Tue, 19 May 2020 13:36:49 +0200 From: "Rafael J. Wysocki" To: Linux ACPI Cc: Linux PM , LKML , Zhang Rui , Hans de Goede Subject: [PATCH] ACPI: PM: s2idle: Print type of wakeup debug messages Date: Tue, 19 May 2020 13:36:48 +0200 Message-ID: <1709513.f9ygnvZT4z@kreacher> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Rafael J. Wysocki Since acpi_s2idle_wake() knows the category of wakeup causing the system to resume from suspend-to-idle, make it print a unique message for each of them to help diagnose wakeup issues. Signed-off-by: Rafael J. Wysocki --- The patch is on top of the linux-next branch in linux-pm.git. --- drivers/acpi/sleep.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) Index: linux-pm/drivers/acpi/sleep.c =================================================================== --- linux-pm.orig/drivers/acpi/sleep.c +++ linux-pm/drivers/acpi/sleep.c @@ -992,23 +992,31 @@ static bool acpi_s2idle_wake(void) * wakeup is pending anyway and the SCI is not the source of * it). */ - if (irqd_is_wakeup_armed(irq_get_irq_data(acpi_sci_irq))) + if (irqd_is_wakeup_armed(irq_get_irq_data(acpi_sci_irq))) { + pm_pr_dbg("Wakeup unrelated to ACPI SCI\n"); return true; + } /* * If the status bit of any enabled fixed event is set, the * wakeup is regarded as valid. */ - if (acpi_any_fixed_event_status_set()) + if (acpi_any_fixed_event_status_set()) { + pm_pr_dbg("ACPI fixed event wakeup\n"); return true; + } /* Check wakeups from drivers sharing the SCI. */ - if (acpi_check_wakeup_handlers()) + if (acpi_check_wakeup_handlers()) { + pm_pr_dbg("ACPI custom handler wakeup\n"); return true; + } /* Check non-EC GPE wakeups and dispatch the EC GPE. */ - if (acpi_ec_dispatch_gpe()) + if (acpi_ec_dispatch_gpe()) { + pm_pr_dbg("ACPI non-EC GPE wakeup\n"); return true; + } /* * Cancel the SCI wakeup and process all pending events in case @@ -1027,8 +1035,10 @@ static bool acpi_s2idle_wake(void) * are pending here, they must be resulting from the processing * of EC events above or coming from somewhere else. */ - if (pm_wakeup_pending()) + if (pm_wakeup_pending()) { + pm_pr_dbg("Wakeup after ACPI Notify sync\n"); return true; + } rearm_wake_irq(acpi_sci_irq); }