Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2364621ybb; Fri, 27 Mar 2020 04:15:29 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtA8g1KLbElZ5xHuHcn3C3qqTcTl0AjqdEg+iUnYRYlX1Go5YmdIMgnrPuw743H1B58Dhww X-Received: by 2002:a54:4e8b:: with SMTP id c11mr3597767oiy.136.1585307729492; Fri, 27 Mar 2020 04:15:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585307729; cv=none; d=google.com; s=arc-20160816; b=MI3U12utq6cTlrJ+4/Rd4tEM20z7i6qXfmLT104aAkCtHYsZyuNd5+7/qNfWw6GfC+ rtk9Kp8fzgNSv2jOjybosW0bPa47oqoBf/QCPURcZNAIyA1jGKVkmm8kRFQ1p5ER3lFE iiAUQt9qNQsuBdX7CFE41Qk2vzOJAIVOJspA7BRlUfW1h3x65CFUd5KA4uJnymw2eXO+ T+eeNk/MmDRpBNuVnMsbVyej5dqHejNBQdp8YN3hff3sue/9EN/dG6l+FrJzAy6p4We+ RMPE9Vf0ER2PBhaM2DMr5a1epQT1FE+Cl8hERpTVujeSPF5Dw0puFcRh3dZaYvXNBfhp SEfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :ironport-sdr:ironport-sdr; bh=+6QyaVOXzVLkO1s8MtRURVF9juV6WFzyzv2v1T1vBo0=; b=d3y1PlMulY6zw2EJ2LwHBx62zEnRAtEnwNNdey5ZNmy5Oed4imWYl1oK454ceLPL// //Txm182XMWJZvgfH2F1idgbDgD0wiKIPwKlZwnNUXZZ/SxYJOGXG7aPWtv8aHs44b4f N+vM7cNU+XJCBsyiwTPWedamafHi6DoNnqUBAAqeMG5v8LpjVp2gzWGTTDi+poUOINsf eIU6ABawixXqj6VaffM/VayamGqw36UAxt1gXv6HIgSvPywdJ4+wtumDhy8r1mC1wmeq PuC6wteJB1jlrI3uYmpmRf6QngRnJd4F8KqipdloxNHL7zRO4r111XDl5Gj936n2Yx/v 5v4w== 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 q4si1144166ooo.92.2020.03.27.04.15.15; Fri, 27 Mar 2020 04:15:29 -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 S1726739AbgC0LNa (ORCPT + 99 others); Fri, 27 Mar 2020 07:13:30 -0400 Received: from mga06.intel.com ([134.134.136.31]:65535 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726217AbgC0LNa (ORCPT ); Fri, 27 Mar 2020 07:13:30 -0400 IronPort-SDR: 5mjP/eToJptF8XXS5ET8vWaZummJ0kMenL1I1P/2o0XsuxHnDZzcqfsS+D8G5YyICgox8m3sbx POOqDJW9xEqw== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Mar 2020 04:13:29 -0700 IronPort-SDR: 1TMMu0bX7LuJ4UwoUGRyHRf7VQ5nlu/6g+WiYeRMJZo1fivt+FUk4Ryr2Nt3AW5nK7X87H6Ptg Iu4ikqUsaBqg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,312,1580803200"; d="scan'208";a="247854794" Received: from chenyu-office.sh.intel.com ([10.239.158.173]) by orsmga003.jf.intel.com with ESMTP; 27 Mar 2020 04:13:27 -0700 From: Chen Yu To: linux-pm@vger.kernel.org Cc: Pavel Machek , linux-kernel@vger.kernel.org, Chen Yu , "Rafael J. Wysocki" , Len Brown , Andy Shevchenko Subject: [PATCH] PM / sleep: Add pm_debug_messages boot command control Date: Fri, 27 Mar 2020 19:11:41 +0800 Message-Id: <20200327111141.14324-1-yu.c.chen@intel.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Debug messages from the system suspend/hibernation infrastructure is disabled by default, and can only be enabled after the system has boot up via /sys/power/pm_debug_messages. This makes the hibernation resume hard to track as it involves system boot up across hibernation. There's no chance for software_resume() to track the resume process, eg. Turning on the pm_debug_messages during boot up by appending 'pm_debug_message'. Cc: "Rafael J. Wysocki" Cc: Len Brown Cc: Andy Shevchenko Signed-off-by: Chen Yu --- kernel/power/main.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/kernel/power/main.c b/kernel/power/main.c index 69b7a8aeca3b..1da3d7c15e03 100644 --- a/kernel/power/main.c +++ b/kernel/power/main.c @@ -535,6 +535,13 @@ static ssize_t pm_debug_messages_store(struct kobject *kobj, power_attr(pm_debug_messages); +static int __init pm_debug_message_setup(char *str) +{ + pm_debug_messages_on = true; + return 1; +} +__setup("pm_debug_message", pm_debug_message_setup); + /** * __pm_pr_dbg - Print a suspend debug message to the kernel log. * @defer: Whether or not to use printk_deferred() to print the message. -- 2.17.1