From patchwork Fri Jun 2 07:30:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mario Limonciello X-Patchwork-Id: 689127 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 16BBCC7EE24 for ; Fri, 2 Jun 2023 19:32:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235309AbjFBTc6 (ORCPT ); Fri, 2 Jun 2023 15:32:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38330 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234300AbjFBTc4 (ORCPT ); Fri, 2 Jun 2023 15:32:56 -0400 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2085.outbound.protection.outlook.com [40.107.94.85]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 04545CE; Fri, 2 Jun 2023 12:32:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Es38AhNk6YzVmNOZ2eiUeyZBKJviSatKwpnYd/lyPIydBAozSbl/5ueIPHvm2YBYw8jJp5h3KQSm63Kn9DrCxaQnN/qyQGE7+FpCJMffw2xxxpxBBuM6aPzCjf2XGzCOd4ReR60jqVfMosdtrOgEv4aizPkFJ8NNh4W+MhyQryNUyH5eKLja0RQ4P/Lmcz5CoBA+GOCfy2PlpvMLpZ5l0kq6Va6Z3GHIQ77CAl5ChEufJ4xF3bgDvMCTR/6rjfUn4420TTW5dGXVdRplAZewRcRDckqOX95JUCLk5dsfmDcKaSGOQ0+rOyaBbc/8RowrNambHn3/uYc43Hc+DH6Lxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=5jW3Os9uP2+hla3vlGDL/LlGtwxxwgiHpW066e9D7Hc=; b=TfdS+wyTE55WAVL3+wPb1hF+/tK2zfCZ2tDo8QmWdjFXuZUUW7zEm+c2EVsiR9EqCI6k3U/h9fI4u/e69SId6Pmy4YizXXkitTejOUkDL8FBAdbGNBZXo4CBm3Re2rSdGuEGoueGwavoR51ViBe3zWXFeBXmvVEkTD4BppApX5IdwHEtnpUh3cvZK2CbvR/ZVYCsR651hxZwnD2yKUNgmay8cTG87cBn2Bw4ZEupmBG4rErL/nAk5BfApuZUr8I8Rpl5TgvYQwAUsV3lnrCyFu6cdeQBvPx717155QsVw29xy7VvV6REndSfzhxiSaDMMD7ZDNO946VD1bIKL6koxQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5jW3Os9uP2+hla3vlGDL/LlGtwxxwgiHpW066e9D7Hc=; b=vE8FEIjuda1AaBeAI8FpH2ExssMKpQke3IdcKxfNFcGCmID17GLI+sJtXKyb+D5I0KxGwTrXJk8v6PKad9WuxhUit4TIozNlvtgREaY/1PPz/X3nuiadeG4+IC2ybVgKdJH+4cXKZnfhpQR1AQO2sPl4tSDtBGmOWZnS7J3yJkE= Received: from MW4PR02CA0001.namprd02.prod.outlook.com (2603:10b6:303:16d::21) by BN9PR12MB5163.namprd12.prod.outlook.com (2603:10b6:408:11c::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.26; Fri, 2 Jun 2023 19:32:51 +0000 Received: from CO1NAM11FT026.eop-nam11.prod.protection.outlook.com (2603:10b6:303:16d:cafe::db) by MW4PR02CA0001.outlook.office365.com (2603:10b6:303:16d::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.24 via Frontend Transport; Fri, 2 Jun 2023 19:32:51 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by CO1NAM11FT026.mail.protection.outlook.com (10.13.175.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6455.24 via Frontend Transport; Fri, 2 Jun 2023 19:32:51 +0000 Received: from SITE-L-T34-2.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Fri, 2 Jun 2023 14:32:49 -0500 From: Mario Limonciello To: Rafael Wysocki , , CC: , , , , , , , Mario Limonciello Subject: [PATCH v4 1/4] include/linux/suspend.h: Only show pm_pr_dbg messages at suspend/resume Date: Fri, 2 Jun 2023 02:30:22 -0500 Message-ID: <20230602073025.22884-1-mario.limonciello@amd.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1NAM11FT026:EE_|BN9PR12MB5163:EE_ X-MS-Office365-Filtering-Correlation-Id: 22670920-0de5-416d-b4bd-08db63a027bd X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: f7chVz3UcVPnCJwo7MIVIAYyc3lui1fKkobs6vRLCqcBXzmgY0HNXY9lVx6uV5UuBfTSU5ekX7yQ3Ce0KLHVtcsTnlPzVHa5KRG5Uzo/6EvAqQ+rF2hlwxbV+W3D168t4vPb0EGMHwkgw4byCnwPbB4frZxETDo6ibcE+MhyTbMg5IlnaxOwNc4gH8wdMOfQsQJ3pjKT1a4XNLeaC6yR3hyCnuhnkhAJZCWJ8fOblJ2DkVBWzSXlxu2O8KXBzVdtM3eRM9+NkSNdk1h8txYpaUSXVL/05VN8Vh3rjpO2yAKWWTjUXkhKBAXbGcw9OpPl4obxPkKOjcRe1q1E2R1ysstZEbOvJ0OCGR37Wes4GMi3RBosJr4jJekzeY+ZmC1JIr7zDqlIMhRD2YDLtfUZDVNLSd7JfVC0WxewBL6U/ElzaM6zPsbw1u8YfLjnDS2ff2bLodHXb7UrJUOcoB0XV9BsxZ5aI0pe2DZ3KLURd7Y2epXv59QRyYTSJVU3fjP3+ZzX9M7IaGOmgj88yQqmrCLoTSflqhw5pawXDONtaOxr1rCaEfMsWWUhmegJRIURwJh5MgpmIysM9FZ0c5Fg0Vrat/gvB47RjT7/v9AQUkLz2qnmqOML0qiE9unduC2APY9OTsv82t9HRwUF9jiSBkdmOTwZLuEX2HHi60rh+k+vHE3F9xzn9hHYzOA54zLbUMxmlp6H2shiJre2v2hiFEOBv+LhJvCJK/GzkVhwo9vyWxXsAZXOzmVNzXUa8sN22RB72wbF//i6Zx3Q8DziyA== X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230028)(4636009)(136003)(376002)(396003)(39860400002)(346002)(451199021)(36840700001)(40470700004)(46966006)(1076003)(86362001)(70206006)(186003)(70586007)(16526019)(4326008)(15650500001)(2616005)(5660300002)(426003)(336012)(8936002)(8676002)(47076005)(478600001)(83380400001)(2906002)(7696005)(82310400005)(36860700001)(356005)(82740400003)(81166007)(316002)(44832011)(54906003)(40460700003)(110136005)(40480700001)(41300700001)(6666004)(26005)(36756003)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Jun 2023 19:32:51.3687 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 22670920-0de5-416d-b4bd-08db63a027bd X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT026.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN9PR12MB5163 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org All uses in the kernel are currently already oriented around suspend/resume. As some other parts of the kernel may also use these messages in functions that could also be used outside of suspend/resume, only enable in suspend/resume path. Signed-off-by: Mario Limonciello --- v3->v4: * add back do/while as it wasn't pointless. It fixes a warning. --- include/linux/suspend.h | 8 +++++--- kernel/power/main.c | 6 ++++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/include/linux/suspend.h b/include/linux/suspend.h index 1a0426e6761c..74f406c53ac0 100644 --- a/include/linux/suspend.h +++ b/include/linux/suspend.h @@ -555,6 +555,7 @@ static inline void unlock_system_sleep(unsigned int flags) {} #ifdef CONFIG_PM_SLEEP_DEBUG extern bool pm_print_times_enabled; extern bool pm_debug_messages_on; +extern bool pm_debug_messages_should_print(void); static inline int pm_dyn_debug_messages_on(void) { #ifdef CONFIG_DYNAMIC_DEBUG @@ -568,14 +569,14 @@ static inline int pm_dyn_debug_messages_on(void) #endif #define __pm_pr_dbg(fmt, ...) \ do { \ - if (pm_debug_messages_on) \ + if (pm_debug_messages_should_print()) \ printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__); \ else if (pm_dyn_debug_messages_on()) \ pr_debug(fmt, ##__VA_ARGS__); \ } while (0) #define __pm_deferred_pr_dbg(fmt, ...) \ do { \ - if (pm_debug_messages_on) \ + if (pm_debug_messages_should_print()) \ printk_deferred(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__); \ } while (0) #else @@ -593,7 +594,8 @@ static inline int pm_dyn_debug_messages_on(void) /** * pm_pr_dbg - print pm sleep debug messages * - * If pm_debug_messages_on is enabled, print message. + * If pm_debug_messages_on is enabled and the system is entering/leaving + * suspend, print message. * If pm_debug_messages_on is disabled and CONFIG_DYNAMIC_DEBUG is enabled, * print message only from instances explicitly enabled on dynamic debug's * control. diff --git a/kernel/power/main.c b/kernel/power/main.c index 3113ec2f1db4..daa535012e51 100644 --- a/kernel/power/main.c +++ b/kernel/power/main.c @@ -556,6 +556,12 @@ power_attr_ro(pm_wakeup_irq); bool pm_debug_messages_on __read_mostly; +bool pm_debug_messages_should_print(void) +{ + return pm_debug_messages_on && pm_suspend_target_state != PM_SUSPEND_ON; +} +EXPORT_SYMBOL_GPL(pm_debug_messages_should_print); + static ssize_t pm_debug_messages_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf) { From patchwork Fri Jun 2 07:30:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mario Limonciello X-Patchwork-Id: 688549 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D8E70C7EE2D for ; Fri, 2 Jun 2023 19:32:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235503AbjFBTc7 (ORCPT ); Fri, 2 Jun 2023 15:32:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38338 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235152AbjFBTc5 (ORCPT ); Fri, 2 Jun 2023 15:32:57 -0400 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2048.outbound.protection.outlook.com [40.107.243.48]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2CFE7198; Fri, 2 Jun 2023 12:32:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PhJyb9gPtVOQafF0vbT+mH1Xiy3yBHQOVxs/ETlWPRr0dgdipjfZ6M19Mf75QyONtx6u9kiJlCJ6rOKe7G2vJindjlc62r0QcRc+bjTt+lBSkw52HK34sZ03sD1RaaGDoQxgNnkkZJ3NW3S3GreG5qMgUN2uY+xP4H31dd1AxB/jzuvgtEoYVHAryAW00TGXlpYx5Fy0sOhpvYuWpFX8eF+phNwzWFIp38WXxa0fYUs2QnULxmSWVpojNRa0k3TeRRxInYNlMb2r3lLbDfhXG77r0iecXLzerc0Z1+4PyoxxLW9csXxqd3a5UQX0/qPslFLClaw2tk9C56IL5EM8qQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=WIGYex2gmnwg9s/SxVexBqG3eOxNY8IcDlv1varSqJM=; b=lCMchnAJE8OmzvoT1472mtg0Te4YCB3z8xOMJ10bkmv4q+2/Cnftn1uxINEXiwOn52wsXNeriIOy/481nu5up20RjJOVfjDVKHyanFgNxsuWZSTFh4aBllA1nSU91AQkz8oLlBz2Z0SF4vbeTryL9DTJwIxWw2XRBjoSFqgU0U4Q8krrc/yT+XRwZ4AUtgfLGwRQYYDBA5wwxxEssXXOzpLOYfVgUfhnJ8P7C1kUL9qjBK10bJ3Vw2ykr7Lt4quPzV0DvaASbYCuZ8F8p63533py0Iqn2iZVN1+3Z1EHBuMut147NQWN0eV3ctQj6xLLAvg/YLgIVRSBH2CT/itBVw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=WIGYex2gmnwg9s/SxVexBqG3eOxNY8IcDlv1varSqJM=; b=0JHACOrErqNxZmu22Y/CJO+SpnpfXeff6naSd64KeXtNVV0XxvRhMZG1WOLzqidglmfZgXXplSYYMedO0BKfx8u0aaWOx++DNdNN2BT6kBg28Fv5R62IdYdiydEG6NTmUeIPgHqxeohOWPVB+IGwmljUNM8LzDaJuGbkdu7MtSw= Received: from MW4PR02CA0001.namprd02.prod.outlook.com (2603:10b6:303:16d::21) by DS0PR12MB8455.namprd12.prod.outlook.com (2603:10b6:8:158::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.26; Fri, 2 Jun 2023 19:32:54 +0000 Received: from CO1NAM11FT026.eop-nam11.prod.protection.outlook.com (2603:10b6:303:16d:cafe::8d) by MW4PR02CA0001.outlook.office365.com (2603:10b6:303:16d::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.24 via Frontend Transport; Fri, 2 Jun 2023 19:32:52 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by CO1NAM11FT026.mail.protection.outlook.com (10.13.175.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6455.24 via Frontend Transport; Fri, 2 Jun 2023 19:32:52 +0000 Received: from SITE-L-T34-2.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Fri, 2 Jun 2023 14:32:50 -0500 From: Mario Limonciello To: Rafael Wysocki , , CC: , , , , , , , Mario Limonciello Subject: [PATCH v4 2/4] ACPI: x86: Add pm_debug_messages for LPS0 _DSM state tracking Date: Fri, 2 Jun 2023 02:30:23 -0500 Message-ID: <20230602073025.22884-2-mario.limonciello@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230602073025.22884-1-mario.limonciello@amd.com> References: <20230602073025.22884-1-mario.limonciello@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1NAM11FT026:EE_|DS0PR12MB8455:EE_ X-MS-Office365-Filtering-Correlation-Id: 8942d042-21e6-4bc7-1f89-08db63a0286e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Zq2pulCN3UNFQ+AfttmfJDrBiUaibh+ALtxIWsOa1jyWt8GuWshk1x+BvXslqH5HL0vSAKUY/9kfITkVh6a11oRgy0I2Vss9klsr8+GZEemoqbwAp8MxXba34SR+TIMWQWpFiagjACALySxw21q7UIzLaPeZeePnjnJuv+oa2qaDhNSTnPvz4wTIa44UeS6IhUVpC9Ix9b5nbY2GIm7PXi6tnOsQm+kvqoIZafSib8omfCNLU7vvk58N+PRAY1RTRnHlHmuxqvkdCXMMdjjVK875DR0qbT39qkOVMLqSvw9xmU0it7zOSTF3sZdsdTC+V0x9cGSDy8PurpiByCMH9l1/5mqa1fr4J4MMI0OY31uVuN/ri3ecjVbkSHQ8Pa9cQFB+ViUZWBr/zvOdgCW3fCuXW2uGQvyNC+epTs5nqEMQIC8fMKd3iOrQL53JK/lP1wns4zgdvwcFFHKoUr/62yRdSrcmEQ/6oOBpHwK3XInKIuXulh88HCB1Qzp6JKirDXJO8MeDRskFhYSB0aWjYmJAeDPchfLOSD92VDrN2hpnZfsdBI51w1KgngP+7LNnAgOlNOebnAEvzfKD9xhX3MAxC8YytkFf3j03BtGns7Bnc4K7DY3eUW3F6OrncOC722z4POLVFFbgFf85cckfn4SGoO0FQ2OtGcQkuBJWOQ2etnUZpkYg0UFlDoXrmSI3XmEgjLQuGrc9CQdt4G8Lpqty5khZBurrQg1AA+hLkKAgAbQmM5MtspzrnQzPhj7ECq4twFvB1TXBy8a/ATv2Bg== X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230028)(4636009)(136003)(346002)(39860400002)(396003)(376002)(451199021)(40470700004)(36840700001)(46966006)(82310400005)(45080400002)(478600001)(70586007)(7696005)(40460700003)(70206006)(4326008)(6666004)(36756003)(54906003)(316002)(86362001)(110136005)(26005)(83380400001)(40480700001)(336012)(1076003)(16526019)(2616005)(186003)(81166007)(426003)(356005)(82740400003)(5660300002)(41300700001)(2906002)(8936002)(8676002)(44832011)(47076005)(36860700001)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Jun 2023 19:32:52.1342 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8942d042-21e6-4bc7-1f89-08db63a0286e X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT026.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB8455 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org Enabling debugging messages for the state requires turning on dynamic debugging for the file. To make it more accessible, use `pm_debug_messages` and clearer strings for what is happening. Signed-off-by: Mario Limonciello --- drivers/acpi/x86/s2idle.c | 52 ++++++++++++++++++++++++++++++++++----- 1 file changed, 46 insertions(+), 6 deletions(-) diff --git a/drivers/acpi/x86/s2idle.c b/drivers/acpi/x86/s2idle.c index e499c60c4579..7681f6ecab67 100644 --- a/drivers/acpi/x86/s2idle.c +++ b/drivers/acpi/x86/s2idle.c @@ -59,6 +59,7 @@ static int lps0_dsm_func_mask; static guid_t lps0_dsm_guid_microsoft; static int lps0_dsm_func_mask_microsoft; +static int lps0_dsm_state; /* Device constraint entry structure */ struct lpi_device_info { @@ -320,6 +321,44 @@ static void lpi_check_constraints(void) } } +static bool acpi_s2idle_vendor_amd(void) +{ + return boot_cpu_data.x86_vendor == X86_VENDOR_AMD; +} + +static const char *acpi_sleep_dsm_state_to_str(unsigned int state) +{ + if (lps0_dsm_func_mask_microsoft || !acpi_s2idle_vendor_amd()) { + switch (state) { + case ACPI_LPS0_SCREEN_OFF: + return "screen off"; + case ACPI_LPS0_SCREEN_ON: + return "screen on"; + case ACPI_LPS0_ENTRY: + return "lps0 entry"; + case ACPI_LPS0_EXIT: + return "lps0 exit"; + case ACPI_LPS0_MS_ENTRY: + return "lps0 ms entry"; + case ACPI_LPS0_MS_EXIT: + return "lps0 ms exit"; + } + } else { + switch (state) { + case ACPI_LPS0_SCREEN_ON_AMD: + return "screen on"; + case ACPI_LPS0_SCREEN_OFF_AMD: + return "screen off"; + case ACPI_LPS0_ENTRY_AMD: + return "lps0 entry"; + case ACPI_LPS0_EXIT_AMD: + return "lps0 exit"; + } + } + + return "unknown"; +} + static void acpi_sleep_run_lps0_dsm(unsigned int func, unsigned int func_mask, guid_t dsm_guid) { union acpi_object *out_obj; @@ -331,14 +370,15 @@ static void acpi_sleep_run_lps0_dsm(unsigned int func, unsigned int func_mask, g rev_id, func, NULL); ACPI_FREE(out_obj); - acpi_handle_debug(lps0_device_handle, "_DSM function %u evaluation %s\n", - func, out_obj ? "successful" : "failed"); + lps0_dsm_state = func; + if (pm_debug_messages_on) { + acpi_handle_info(lps0_device_handle, + "%s transitioned to state %s\n", + out_obj ? "Successfully" : "Failed to", + acpi_sleep_dsm_state_to_str(lps0_dsm_state)); + } } -static bool acpi_s2idle_vendor_amd(void) -{ - return boot_cpu_data.x86_vendor == X86_VENDOR_AMD; -} static int validate_dsm(acpi_handle handle, const char *uuid, int rev, guid_t *dsm_guid) { From patchwork Fri Jun 2 07:30:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mario Limonciello X-Patchwork-Id: 689126 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DCA1BC7EE32 for ; Fri, 2 Jun 2023 19:33:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235646AbjFBTc7 (ORCPT ); Fri, 2 Jun 2023 15:32:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38344 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235251AbjFBTc5 (ORCPT ); Fri, 2 Jun 2023 15:32:57 -0400 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2054.outbound.protection.outlook.com [40.107.93.54]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EF9E11A2; Fri, 2 Jun 2023 12:32:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=klh2MnTCFtv575mGWFsO+A1xamp16JnRaAuNi4/NzjxtlZ6zXA+BkTMP9xp8WChbc4jpTw5rHgLpIw6Q271jq9D4sGHSOZ1thjQ7oUgIyZQPHn8geDllfOzM0GWRZcM94g+hSrzq3/U2Uyv4lOhoGovWSn5mJ6MzSbOPFytSsyxBwEod2X62O5NgOTHKtJ4Xg6dC58Jx/WJByJq3GZbionzyViwCMGtvpGNn7GHLNsx2yM59AIIzPWh6QVL07IuOG2qqcceHIRi5upyyVvTiAkydXw2abn+EA5uu5b5hjhh9jlZ7ho+eyGZigYM+RnqTYnKIzLabOWUk3rUhZs9kGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=HCtaCSh2xp3TLU3Jn9duTu+a0ilJ5rZJIXMRb1Vd+cU=; b=G3ovVtXOtv51LL6Erux8hqlIbAtWWHq3YbzAsZiY7d3KuvoBP7EnRF1so76mI33PjcWbkG30Qnp7HQawTdHnzTySfIgoer4ISjupxt9rTahNuNFTlzwEzX122Jh4o0k6gjWDirlwyGpNXxKT80MhfREAFsnGQKE7KEhqgcjFdBaTVj1StSXgssQTh2ljke++0VSIavsKeisK6ssa1jEBp9wR/D/0dLaxjKSMTMnMGkT7j244cjAunPCSo/v7dZpSTVNySX6nlMdkNprPuLRewysMOxbclpIa/WiM5pOPV0OUZTlTRkuX+SsdMKsrcUAQ2Vtx1lUMgebAU7KTwCoRzQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=HCtaCSh2xp3TLU3Jn9duTu+a0ilJ5rZJIXMRb1Vd+cU=; b=5i6MhecCySXX+HQSj8vKnQiIF567FBROJf30+cx5Sd3bZpq+RWp1ELGV2yFI6KpiLG2BKs0jEk17LeCrIY2Ymr85jBCv08WEM0BbrmtvLMfAkBJM5oPOTyKA0zxf3xIrcq+M1wk/Rf2nXgZbu/AOO4kbiDp3NEalHWrxEN2jZkg= Received: from MW4PR02CA0017.namprd02.prod.outlook.com (2603:10b6:303:16d::24) by DS0PR12MB7928.namprd12.prod.outlook.com (2603:10b6:8:14c::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.23; Fri, 2 Jun 2023 19:32:55 +0000 Received: from CO1NAM11FT026.eop-nam11.prod.protection.outlook.com (2603:10b6:303:16d:cafe::de) by MW4PR02CA0017.outlook.office365.com (2603:10b6:303:16d::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.26 via Frontend Transport; Fri, 2 Jun 2023 19:32:54 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by CO1NAM11FT026.mail.protection.outlook.com (10.13.175.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6455.24 via Frontend Transport; Fri, 2 Jun 2023 19:32:54 +0000 Received: from SITE-L-T34-2.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Fri, 2 Jun 2023 14:32:51 -0500 From: Mario Limonciello To: Rafael Wysocki , , CC: , , , , , , , Mario Limonciello Subject: [PATCH v4 3/4] pinctrl: amd: Use pm_pr_dbg to show debugging messages Date: Fri, 2 Jun 2023 02:30:24 -0500 Message-ID: <20230602073025.22884-3-mario.limonciello@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230602073025.22884-1-mario.limonciello@amd.com> References: <20230602073025.22884-1-mario.limonciello@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1NAM11FT026:EE_|DS0PR12MB7928:EE_ X-MS-Office365-Filtering-Correlation-Id: 7277e61a-f0a3-4069-bdb1-08db63a02995 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0FoX+0mkawxQiDJnKdLE9qFGbdBZljPAEvii1cZ3C6Y5wsgy3+S6bOySgJn8oQSdMlkcBzTmSyF+tXxXORXtG0SFYPpjP8sf6FXuIxTds0C3SrrBDeHb2NBZJNpVuF+NR4YD7u53Kkcl6NRzlZpCptsp5HZuTfVBfg3GCkOmr8LGt7o94MiC6pxuYPtgHrTEy7uV1mMZoroew3UYSYhZzAxEQjjk3/Ku+86tRm9OfzanjvIwVEYq9fru8iWgMAbuOTHJMyVaZa5dkf84L+MKrnlzIq7wobqfvN4xqxGMT1UnHRSgOr2lNrqUjwOPO4QjmDOdDDuWUxiBUwnvpI8zKrc+wcojp6XkxstxPXFheQnjyokHYTl4l1Czc+QrjuTqxuJQ+Wigc/sx3pH+JAytOYTt/fKSBcAu7brwkZB1933J0IYMbnCmFn3rP9/5t54MPcarhzCU1UH6+k92ikUqzM+jNI9b841iYyAdMaOIG8erC1/J0SG7ka1j/7CiIE3kjydWGs9uziBvmDyqvm8oUuYSx84vcoA4v5w3HslV/+Kiq/2fPGlTg/GO4kbTW16nc46F++0OjTFm1uVLzpUwkiI+UqqMZyJYrkHdQW8AYZBjphAjszPHpWO67xlMQz26GZe1VWqbpUY0JpKGEOJZ/Ie8NaA0GwPRm/Emm/jLGrrFCH2vfec8UHN8IYhuBFW7TS/k7LyOSSwjo3OUHf4aoVEHXTcME8Z+0Fv2aQIpgo6KBYck0w17fN8kDqMW2+OI66+qArCCu5aJt9vQWUuQvQ== X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230028)(4636009)(396003)(136003)(376002)(39860400002)(346002)(451199021)(40470700004)(46966006)(36840700001)(40460700003)(426003)(16526019)(47076005)(83380400001)(186003)(15650500001)(2616005)(36860700001)(6666004)(4326008)(7696005)(478600001)(316002)(70206006)(70586007)(110136005)(54906003)(2906002)(26005)(44832011)(5660300002)(1076003)(8676002)(41300700001)(8936002)(336012)(40480700001)(356005)(81166007)(36756003)(82310400005)(86362001)(82740400003)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Jun 2023 19:32:54.5091 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7277e61a-f0a3-4069-bdb1-08db63a02995 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT026.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB7928 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org To make the GPIO tracking around suspend easier for end users to use, link it with pm_debug_messages. This will make discovering sources of spurious GPIOs around suspend easier. Signed-off-by: Mario Limonciello Acked-by: Linus Walleij --- drivers/pinctrl/pinctrl-amd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/pinctrl/pinctrl-amd.c b/drivers/pinctrl/pinctrl-amd.c index f279b360c20d..43d3530bab48 100644 --- a/drivers/pinctrl/pinctrl-amd.c +++ b/drivers/pinctrl/pinctrl-amd.c @@ -30,6 +30,7 @@ #include #include #include +#include #include "core.h" #include "pinctrl-utils.h" @@ -636,9 +637,8 @@ static bool do_amd_gpio_irq_handler(int irq, void *dev_id) regval = readl(regs + i); if (regval & PIN_IRQ_PENDING) - dev_dbg(&gpio_dev->pdev->dev, - "GPIO %d is active: 0x%x", - irqnr + i, regval); + pm_pr_dbg("GPIO %d is active: 0x%x", + irqnr + i, regval); /* caused wake on resume context for shared IRQ */ if (irq < 0 && (regval & BIT(WAKE_STS_OFF))) From patchwork Fri Jun 2 07:30:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mario Limonciello X-Patchwork-Id: 688548 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DE592C7EE43 for ; Fri, 2 Jun 2023 19:33:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235697AbjFBTdB (ORCPT ); Fri, 2 Jun 2023 15:33:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38350 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234300AbjFBTc7 (ORCPT ); Fri, 2 Jun 2023 15:32:59 -0400 Received: from NAM02-DM3-obe.outbound.protection.outlook.com (mail-dm3nam02on2073.outbound.protection.outlook.com [40.107.95.73]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A52D1CE; Fri, 2 Jun 2023 12:32:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eE0EzxJu2hlFbKBtenbzr7x5v4Pjesy88Ial9Ij/9fYOZ2EUE789hi+vUKdytoOjmifNyi6P9hDLYiyKNeLw4wpVuKdmBgJrFJRc5aWRN6tNGJvSL1lAld9tkgOjh/pOtoQ90WNNtu4pfKhDiacZCVXeAwo2WWpeEDDaVO3z/+JhrD2OUVi+0kKDnKjRhwIY1GWHJthJwjgXcHgtgU+qFGx+gKli+ivSKu66B+NWvS5JihichiK8LhU6mG53GyeL5EoZlKXHv+ah4OMdfqFaU9YeJ1xPcHd1M+DXwv5Fp4A2jvsTCs5qYnvopiwd3p7aC+3nefpSIXwZNVdT+f3Ufg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=CrHATCoFhmN6yg/azbKKFkcA0h9V7q/tjG0BF8LbZ5Q=; b=U0zxVCWnj7yzgCtMTysxpHGglwZ88rddDmdrXGEkMiv8HBsd4i69pa/PoogiD2yHm+BEkHce+3KBc1ELMtR9vnWOuUylWkIGw1CLEsJEDlKL6wpP03jNwy0ccNHzjAiMjfNwNEUj2fZ1BkL8z5vWfKeDJF+JOPpt0tDQPEe4BUZO1sv3gVojG34mNeSq4u96Tpvu7NJeVBb0qgRsEtFVrFoFxP77UWjvND+bkdH7aRyLsmIJR7fQ8Bf/BI9RCHEcQ/t87cYkKaH+8mQRf0KvczCT8yfI2H7T6pamGu3gHn7ugT8ctnxJuk+G5abUeyUWc1kKmBZdV4qvqRIGZ6b8Gg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=CrHATCoFhmN6yg/azbKKFkcA0h9V7q/tjG0BF8LbZ5Q=; b=CTbhX+wnnwRat98xzO+JYGe+emPFKmu9L8Cr30mE/LU922cC+sGRxspDYBJ4r0VVotRgF2n6EyU7lJp68voQGuuYJG79cWMqGfMRBC4nz0r/KCy+ZU5+Nkbp9b5GR8+dxw7As8SLxhiLjDmBVx25Jt7+n6WG1FIE/ippwlFGoKE= Received: from MW4PR02CA0025.namprd02.prod.outlook.com (2603:10b6:303:16d::11) by DM4PR12MB6638.namprd12.prod.outlook.com (2603:10b6:8:b5::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.24; Fri, 2 Jun 2023 19:32:56 +0000 Received: from CO1NAM11FT026.eop-nam11.prod.protection.outlook.com (2603:10b6:303:16d:cafe::e7) by MW4PR02CA0025.outlook.office365.com (2603:10b6:303:16d::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.25 via Frontend Transport; Fri, 2 Jun 2023 19:32:55 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by CO1NAM11FT026.mail.protection.outlook.com (10.13.175.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6455.24 via Frontend Transport; Fri, 2 Jun 2023 19:32:55 +0000 Received: from SITE-L-T34-2.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Fri, 2 Jun 2023 14:32:53 -0500 From: Mario Limonciello To: Rafael Wysocki , , CC: , , , , , , , Mario Limonciello Subject: [PATCH v4 4/4] platform/x86/amd: pmc: Use pm_pr_dbg() for suspend related messages Date: Fri, 2 Jun 2023 02:30:25 -0500 Message-ID: <20230602073025.22884-4-mario.limonciello@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230602073025.22884-1-mario.limonciello@amd.com> References: <20230602073025.22884-1-mario.limonciello@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1NAM11FT026:EE_|DM4PR12MB6638:EE_ X-MS-Office365-Filtering-Correlation-Id: c83ef4ba-0437-42c6-0383-08db63a02a20 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /Wjnx4LGAUzrWwUcH5Iwxayk0HtWp7sUL5ANjvlUW64CyV5H0mdBjdR0qhwoXFbg8XPrUPjWUgvFqMmlffKhmMZFU9Q18O88E9SkYlEtEnVoeRLVd416Wfcp3xIViki6jywQbpBEomJr7hFumNGxcVcExER0Jqd4hfcIm62ucONF6wG12nSm69X7P9Ieurm+bkD9HWXhvBEz+xTlImAnp5GkMClayoSRTsWT2eL+sfXkby07SAWb3b925Rt3xsiHuOWN9nURmW1D8k+3rcKE/JwVgIUmCEORPWx9LZmIkqNkMgSLX/MuZWqWrtj/utOwRRFFhbn00GsfpVdDtBZ+v2JNbk5LTKR+ZZMHJwNAs1IHE5eHWWhFMG+7s6fbzjp0Q3C1jqghocRQpypp7ujNa33AaxU5SHPEq5Dgs4P43KZ+XIrg84XxoQ6qvdmREd3DJeZ6eqcZAmy4JOQMWpB6Uc0dbN9SkXnDNp2TMoEdNhjplpMx0ra100faNzM12Y+jiqa0BpcOoPU0ZRtDRkwTTxHGky8xLdwmsViPuA7MxBhvplTPHx7Rjte1fKsFJxcuhxSdFS3PI5BE/DKbVJSE9o74a138hOVThLEWOS1ljSZaeRAMou5ziixxsKCBMO+ap2KByKvH2LciozImEcZ9eeI/dcYds3u/JEHErauRDqAHwXmrrymFKk3gfAT8ekaL8yEz5lAQ52fkWYLXqBhN0sGKvhcIZtJQ8bu9nO3WkpMGfgMdMxYEt7+5WjxqjXRXJBA5zShnD0V0hnOBfVyPhQ== X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230028)(4636009)(396003)(346002)(136003)(376002)(39860400002)(451199021)(36840700001)(46966006)(40470700004)(40460700003)(7696005)(478600001)(6666004)(36860700001)(186003)(36756003)(336012)(426003)(47076005)(16526019)(86362001)(82310400005)(2616005)(81166007)(40480700001)(356005)(82740400003)(26005)(1076003)(83380400001)(41300700001)(316002)(4326008)(70586007)(44832011)(70206006)(8676002)(15650500001)(5660300002)(2906002)(110136005)(54906003)(8936002)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Jun 2023 19:32:55.3528 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c83ef4ba-0437-42c6-0383-08db63a02a20 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT026.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB6638 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org Using pm_pr_dbg() allows users to toggle `/sys/power/pm_debug_messages` as a single knob to turn on messages that amd-pmc can emit to aid in any s2idle debugging. Signed-off-by: Mario Limonciello --- drivers/platform/x86/amd/pmc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/platform/x86/amd/pmc.c b/drivers/platform/x86/amd/pmc.c index 427905714f79..1304cd6f13f6 100644 --- a/drivers/platform/x86/amd/pmc.c +++ b/drivers/platform/x86/amd/pmc.c @@ -543,7 +543,7 @@ static int amd_pmc_idlemask_read(struct amd_pmc_dev *pdev, struct device *dev, } if (dev) - dev_dbg(pdev->dev, "SMU idlemask s0i3: 0x%x\n", val); + pm_pr_dbg("SMU idlemask s0i3: 0x%x\n", val); if (s) seq_printf(s, "SMU idlemask : 0x%x\n", val); @@ -769,7 +769,7 @@ static int amd_pmc_verify_czn_rtc(struct amd_pmc_dev *pdev, u32 *arg) *arg |= (duration << 16); rc = rtc_alarm_irq_enable(rtc_device, 0); - dev_dbg(pdev->dev, "wakeup timer programmed for %lld seconds\n", duration); + pm_pr_dbg("wakeup timer programmed for %lld seconds\n", duration); return rc; }