Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp402279pxu; Fri, 23 Oct 2020 04:04:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzZlxGr0rVPFYBXWMBQei0rASd30ZIRmKUV2DOeJgT8fOYfTO1fwx3oJBhrufqUFNVN3ZX+ X-Received: by 2002:a05:6402:135a:: with SMTP id y26mr1598460edw.114.1603451085572; Fri, 23 Oct 2020 04:04:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603451085; cv=none; d=google.com; s=arc-20160816; b=RwxKJXB/cORFAX7T8qB6TiwxJjjVXzfsSCWPWlWbEEsU9+FbeXFaJOkWSqIgqsZsMv wfhRvXXzszZqoUtTSZ1xMJjHXhVqA5+1V+D5PAj7zB3voWx3933u7HDtYhuis7yB2ugk kiOcRsfJoh+rK9NMJL0qP971fO0nTlFfPgtzNtHuUwC1tvTHQCo7/lAgdbnn9BP8izL+ 4flImhYdswCYR6JQsB2xAcTayp8w2DrLylWK/sxkOn/8fUpnUwk+QWjetF3zQDQVne/B /CuJlU8C/RFPdLqT8i3kVKFQPsWyRIzqJ2W+TKO9V5HpU0d41v16RKAuShobDT3ZCGQk gtrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from:ironport-sdr :ironport-sdr; bh=AsORonehjIw/1PUpLOafVfS8St/N0f2z71Ic/Gt2fT0=; b=e7KWj8LCvK2PyiOsTRQgHjAcSxX2R1uuoOYOk1kJiqEns5VXh+/DntlvtlPzDv4f0i YofXetXakOsueoILSY6Imo1MMp5mkNT2GT9ZDoLFCpag6wbkWYi5Aqc0DyNpfCeYBes7 laHz3dG6ZKtAKAx5QzsLq7XzuZ/xdXPJYnKmwfetTo0Fy6w9Lo5Vlc2mS9FDXS7K+igh lFipA4U2Am6SVk3q8A9GCyoXjPuZJ5JRm7i0JZKBhwMOxWtpGGYDepCxsk6GXc2Iscp3 0V3Ft2Ftmt2QdGbdjG7INewM6yWpsV5MoXzaGOQtqVMat0LCOruwUwa4AzBvI8XGg62E XFgw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p5si623713ejb.630.2020.10.23.04.04.22; Fri, 23 Oct 2020 04:04:45 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S462630AbgJWLCe (ORCPT + 99 others); Fri, 23 Oct 2020 07:02:34 -0400 Received: from mga03.intel.com ([134.134.136.65]:19444 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S462539AbgJWLCd (ORCPT ); Fri, 23 Oct 2020 07:02:33 -0400 IronPort-SDR: Qsn5xa3gojx3LSZk5pbzwitAUuhQ2zjsInc4HZk+D8HK9r0QmsMJHMxUeRXCHtEi7DO+78fElo VrZDBX54kxmA== X-IronPort-AV: E=McAfee;i="6000,8403,9782"; a="167753448" X-IronPort-AV: E=Sophos;i="5.77,408,1596524400"; d="scan'208";a="167753448" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Oct 2020 04:02:26 -0700 IronPort-SDR: q1FWg+45L7+JkuPeQzL7GskBvC56WcPpAtJIQ+EkNjdvTM9Dh9u5PgR6XEjHN/EE8o3NmYIuAE xP3aAIuHSXPA== X-IronPort-AV: E=Sophos;i="5.77,408,1596524400"; d="scan'208";a="534359413" Received: from chenyu-office.sh.intel.com ([10.239.158.173]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Oct 2020 04:02:23 -0700 From: Chen Yu To: "Rafael J. Wysocki" , Len Brown , Greg Kroah-Hartman Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Chen Yu Subject: [PATCH] PM / suspend: Print the driver flags of device during suspend resume Date: Fri, 23 Oct 2020 19:02:54 +0800 Message-Id: <20201023110254.26360-1-yu.c.chen@intel.com> X-Mailer: git-send-email 2.17.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Currently there are 4 driver flags to control system suspend/resume behavior: DPM_FLAG_NO_DIRECT_COMPLETE, DPM_FLAG_SMART_PREPARE, DPM_FLAG_SMART_SUSPEND and DPM_FLAG_MAY_SKIP_RESUME. Print these flags during suspend resume so as to get a brief understanding of the expected behavior of each device, and to facilitate suspend/resume debugging/tuning. To enable this tracing: echo 'file drivers/base/power/main.c +p' > /sys/kernel/debug/dynamic_debug/control Signed-off-by: Chen Yu --- drivers/base/power/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c index 205a06752ca9..be6744bdfc93 100644 --- a/drivers/base/power/main.c +++ b/drivers/base/power/main.c @@ -442,9 +442,9 @@ static pm_callback_t pm_noirq_op(const struct dev_pm_ops *ops, pm_message_t stat static void pm_dev_dbg(struct device *dev, pm_message_t state, const char *info) { - dev_dbg(dev, "%s%s%s\n", info, pm_verb(state.event), + dev_dbg(dev, "%s%s%s driver flags: %x\n", info, pm_verb(state.event), ((state.event & PM_EVENT_SLEEP) && device_may_wakeup(dev)) ? - ", may wakeup" : ""); + ", may wakeup" : "", dev->power.driver_flags); } static void pm_dev_err(struct device *dev, pm_message_t state, const char *info, -- 2.17.1