From patchwork Thu Aug 10 23:31:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 9894731 X-Patchwork-Delegate: rjw@sisk.pl 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 C82C460384 for ; Thu, 10 Aug 2017 23:41:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BAAA728BB8 for ; Thu, 10 Aug 2017 23:41:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AFB3D28BBA; Thu, 10 Aug 2017 23:41:10 +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 58DD128BB8 for ; Thu, 10 Aug 2017 23:41:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751732AbdHJXlH (ORCPT ); Thu, 10 Aug 2017 19:41:07 -0400 Received: from cloudserver094114.home.net.pl ([79.96.170.134]:60035 "EHLO cloudserver094114.home.net.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750841AbdHJXlG (ORCPT ); Thu, 10 Aug 2017 19:41:06 -0400 Received: from 79.184.253.199.ipv4.supernova.orange.pl (79.184.253.199) (HELO aspire.rjw.lan) by serwer1319399.home.pl (79.96.170.134) with SMTP (IdeaSmtpServer 0.82) id 23e0a218de2ecc01; Fri, 11 Aug 2017 01:41:04 +0200 From: "Rafael J. Wysocki" To: Linux ACPI Cc: LKML , Srinivas Pandruvada , Linux PM Subject: [PATCH 1/2] ACPI: Add debug statements to acpi_global_event_handler() Date: Fri, 11 Aug 2017 01:31:54 +0200 Message-ID: <1927989.koY9Kj8cp2@aspire.rjw.lan> In-Reply-To: <14884530.U9YM2D2TGn@aspire.rjw.lan> References: <14884530.U9YM2D2TGn@aspire.rjw.lan> MIME-Version: 1.0 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Rafael J. Wysocki It sometimes is useful to examine the timing of ACPI events during certain operations only, like during system suspend/resume, so add pr_debug() statements for that to acpi_global_event_handler(). Signed-off-by: Rafael J. Wysocki --- drivers/acpi/sysfs.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) Index: linux-pm/drivers/acpi/sysfs.c =================================================================== --- linux-pm.orig/drivers/acpi/sysfs.c +++ linux-pm/drivers/acpi/sysfs.c @@ -2,6 +2,8 @@ * sysfs.c - ACPI sysfs interface to userspace. */ +#define pr_fmt(fmt) "ACPI: " fmt + #include #include #include @@ -552,11 +554,15 @@ static void fixed_event_count(u32 event_ static void acpi_global_event_handler(u32 event_type, acpi_handle device, u32 event_number, void *context) { - if (event_type == ACPI_EVENT_TYPE_GPE) + if (event_type == ACPI_EVENT_TYPE_GPE) { gpe_count(event_number); - - if (event_type == ACPI_EVENT_TYPE_FIXED) + pr_debug("GPE event 0x%02x\n", event_number); + } else if (event_type == ACPI_EVENT_TYPE_FIXED) { fixed_event_count(event_number); + pr_debug("Fixed event 0x%02x\n", event_number); + } else { + pr_debug("Other event 0x%02x\n", event_number); + } } static int get_status(u32 index, acpi_event_status *status,