From patchwork Thu Jun 1 23:29:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mario Limonciello X-Patchwork-Id: 687756 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 594DDC7EE32 for ; Thu, 1 Jun 2023 23:29:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232921AbjFAX3y (ORCPT ); Thu, 1 Jun 2023 19:29:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37326 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231700AbjFAX3q (ORCPT ); Thu, 1 Jun 2023 19:29:46 -0400 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2049.outbound.protection.outlook.com [40.107.223.49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EBDF7132; Thu, 1 Jun 2023 16:29:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jP5QnPQDlRh4HCozYq9Vh9XOok/Z1xDN0mbXpzGn7+x/fClHI+2eFF9m9BE3kSFuxORU+bovDFbTqWonECTgZonUzCWphJ1A60bIKUHAX3YI66cuAigNVBaC05YnlTNsX0wvMWUBZIIccO+NURjcaSeZRgvDaUEYB+Lv/mUKnKmPUWb7m9GdUSj+Uya8gUEx0z9v0QOFseqyMoqA2JSTDPzblPi1fy0VghgD8/XXAjVOgW+918Kiq1YhmWYb6OV932fQiWqIhZitvOHyRSMbRzmg/GRrFa/6eFq5bGOQjx9VxU3j6yueT4xhFDTUBI+dUJt6bwOcO4FKYVzaDGJtqA== 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=NeoHFlJ4HX4hZtRkOHcQEXnwYMnU3F+8KWm89Ri2Sg4=; b=NJosYzfAp2axGLkHg3xh5wm//DcBIp0nuI7vsUV1OXzHvrfUlKW9LFnzslVt1VOVmOx/iN0GHwGYdoFBFQzS35Af8WDUllptwN695A6z5v75kpFabiU/9RLnrdl/oCK331aLcEt66O9l0ZvWkGK7aloTiOGAkqhR3YRvbbFdeiBKuGIqNi4vXyq5fWdPFb/YRttZDF2azs9G4PXC0ap9s+2HLctpV2XM8SfMYXVN8naDchkRfGtlpYsKmisMkL9/PRr6RWBQdCaAMO9+0IV7NOyuGX9m6CJvluE+KJxO0jw8CgtxgefNc8oFz/P4T9SfZNFrJ/1qa54Ds8x9CoHTcQ== 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=NeoHFlJ4HX4hZtRkOHcQEXnwYMnU3F+8KWm89Ri2Sg4=; b=vOg14xP72WYOsWQH4cN0rt/DTmWzLs4Sz7vAOZOnLPqDRsiVtBLe7r52stdvSO3WhRVQp97QmxDRDOZR9pqOYb9yqP3Cthhbey1dHeH40Qu1eLua0MEayTg12mzbLFo70wmoKekcgvWl1/5ffVun0N2LzFJAxyz/0i/AyorIqxo= Received: from DM6PR21CA0029.namprd21.prod.outlook.com (2603:10b6:5:174::39) by DS7PR12MB8084.namprd12.prod.outlook.com (2603:10b6:8:ef::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.22; Thu, 1 Jun 2023 23:29:42 +0000 Received: from DM6NAM11FT053.eop-nam11.prod.protection.outlook.com (2603:10b6:5:174:cafe::a9) by DM6PR21CA0029.outlook.office365.com (2603:10b6:5:174::39) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6477.9 via Frontend Transport; Thu, 1 Jun 2023 23:29:42 +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 DM6NAM11FT053.mail.protection.outlook.com (10.13.173.74) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6455.24 via Frontend Transport; Thu, 1 Jun 2023 23:29:42 +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; Thu, 1 Jun 2023 18:29:41 -0500 From: Mario Limonciello To: Rafael Wysocki , , CC: , , , , , S-k Shyam-sundar , Natikar Basavaraj , Mario Limonciello Subject: [PATCH v3 1/4] include/linux/suspend.h: Only show pm_pr_dbg messages at suspend/resume Date: Thu, 1 Jun 2023 18:29:20 -0500 Message-ID: <20230601232923.1248-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: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6NAM11FT053:EE_|DS7PR12MB8084:EE_ X-MS-Office365-Filtering-Correlation-Id: 43970db9-82e1-4c1e-65ea-08db62f81389 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: uB5mbJZlEXRgpKjZzm+qsLJTf8bTy808opSMEtxja8okn17IuQX869YhGhPtUdfSN29yTJTwfY8gp1aO1HqYxYnoWqrFf9wE62FX1jChan7J9JRJ9us2S9+O3dzvI2skDU3iRDTObZAwsLbbsfQTkKARBOkj3BAc4sbafNVJ3aaxQ9CwXTsGqtdAn9S1Bj8lGMs4/T69OI9uutfsWsYOzISDAwc2ic8EcPtl98Q9oqwLzgbEA0Z1abwaeerdHmw1832AjmIvsOqWCmJmG/833ZA3V4dhvNB6GIsN1oFnKTe1jarT2hj8P4afvHRpppAOEUFx2RTb5Bk6RSM6B2R6NOf+IOq/En7BU2GK1224siO2XUbRpLVMPmUSwQu7LCj8GdlDMWohmuKoy3Vsez3MhJArSAAi3+5m4zGRcKTybl/wd7owJbJ890YgIiVQCn+XKVS7wTsPQCMRJR3M4xn1qFsVoNOjlD2aLnjYXeNyikbXiocMAaJUxsGH6Bx5r0CgaE9dm0D8uQRnaTkh8d1RZyWBrOtFp+Rq/yXG0HGrLZ1ZD0AhRH/9SzNUBwhUF8HyKsbZj4eBJEVTqhNhJxQ2k8m59JLkldKWI+xq5Wp8Pgu9L2u7ZKL8/Qivy4oMUZgrRmTJ5bU8XQsvHei67goZ9KVo5B6jrdUE2nMJ9/aTMSx+HJYvJVtfXuXG0oswmhHJXf1r0+jjPKdHDYDKOrq78G9c5o5y62iV586TLn4rlgvhadYSQp9Xq2FxXDPYDXScWb7t3LNNHqU/kePBMeVnlA== 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)(39860400002)(346002)(396003)(451199021)(36840700001)(40470700004)(46966006)(16526019)(6666004)(82740400003)(82310400005)(356005)(81166007)(478600001)(40480700001)(47076005)(83380400001)(2616005)(426003)(336012)(36860700001)(26005)(186003)(36756003)(1076003)(7696005)(40460700003)(316002)(70206006)(70586007)(41300700001)(86362001)(4326008)(44832011)(8676002)(8936002)(54906003)(15650500001)(5660300002)(2906002)(110136005)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jun 2023 23:29:42.1459 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 43970db9-82e1-4c1e-65ea-08db62f81389 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: DM6NAM11FT053.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR12MB8084 Precedence: bulk List-ID: X-Mailing-List: linux-acpi@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 --- v1->v2: * Remove pointless do/while * Add a function pm_debug_messages_should_print * Export pm_debug_messages_should_print so modules can use it too. --- include/linux/suspend.h | 20 +++++++++----------- kernel/power/main.c | 6 ++++++ 2 files changed, 15 insertions(+), 11 deletions(-) base-commit: 7736c431466abb54a2679dc257f739fddfa84295 diff --git a/include/linux/suspend.h b/include/linux/suspend.h index 1a0426e6761c..9a3cc0b89208 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 @@ -567,17 +568,13 @@ static inline int pm_dyn_debug_messages_on(void) #define pr_fmt(fmt) "PM: " fmt #endif #define __pm_pr_dbg(fmt, ...) \ - do { \ - if (pm_debug_messages_on) \ - printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__); \ - else if (pm_dyn_debug_messages_on()) \ - pr_debug(fmt, ##__VA_ARGS__); \ - } while (0) + 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__); #define __pm_deferred_pr_dbg(fmt, ...) \ - do { \ - if (pm_debug_messages_on) \ - printk_deferred(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__); \ - } while (0) + if (pm_debug_messages_should_print()) \ + printk_deferred(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__); #else #define pm_print_times_enabled (false) #define pm_debug_messages_on (false) @@ -593,7 +590,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 Thu Jun 1 23:29:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mario Limonciello X-Patchwork-Id: 688307 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 67F50C7EE31 for ; Thu, 1 Jun 2023 23:29:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232941AbjFAX3z (ORCPT ); Thu, 1 Jun 2023 19:29:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37336 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232885AbjFAX3s (ORCPT ); Thu, 1 Jun 2023 19:29:48 -0400 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2049.outbound.protection.outlook.com [40.107.93.49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C7B4F2; Thu, 1 Jun 2023 16:29:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YpH+uCrjOsMVZWQ5wRNmxSlrwXEIopQjemwbYSH9iKEjXuXUu22PVFKYMV7Rlb9yTyxCAOky8jqJXskOjeXu+PIM3xe5dzm/QCkDaOupOcxSItq7xnl+Bbb+ZzeixKkuTk++mzHH0bcPmFEKbax7N0KZqYsZaafNmks9qwzo6Ac/BURijFomiWIuDLUwKfDCdDRI+m/Fx+UqNKf2DzDj3qn8w2pWDHBTgDDbfgn7L06OykR+Us8f88G0YQ4wJ3the8n1JSCd1OaCvgMEKGqTbu5wuol9v+GNPYJvUF1OkW1win98is6jUblBaSwHvloWJG1XsWF2ynNaWNdUnmfJbg== 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=krnV1rYHVR5k/N/STagDDcCvmLVO8RDJNfC4RM/62S+RlVKrR4bODPBIX9q0ol70weCv4soYvQC345wkEJIKE3YD81A1TTjfuuEd1wYvVhhtMkDmx6No8opE3PPQOCmnXTSrpcqKKyoMeapmwCMJLf7pKl4Z/Aht8H2Nh0h8Pf/fVY3ExtDemZr31/rZJlx7noRcxgv6ZTrS++M5s3x4OoPwOZLHWwv6pvjYNyEMMhZhtfdOEtaw/24PYeaXblmtdkxYDYn6ROIWxF2gLOkRxalAUk8pm4m20jjZ3Nxj0Dni92sx+cy5N5HOgYCzsqe1oyKWMCTorgstX3+DihCzrA== 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=DsMnM2OIyWoklNeF8vIqFes2IqstMCSg3zBnR3NbMJ0y50m/LpAuP+KJ1UGcz696gFzqlJCh/dU4vv43Uz3Bmn7ucn2qr+5+WebKVQwfg6bCuBDjBUBcrgWdMLELzL2iRrX+dHNZKOn6oTgfET/xCDiytW2EKSd5txBhTnoa8/Y= Received: from DM6PR21CA0017.namprd21.prod.outlook.com (2603:10b6:5:174::27) by MN0PR12MB5906.namprd12.prod.outlook.com (2603:10b6:208:37a::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.26; Thu, 1 Jun 2023 23:29:42 +0000 Received: from DM6NAM11FT053.eop-nam11.prod.protection.outlook.com (2603:10b6:5:174:cafe::c1) by DM6PR21CA0017.outlook.office365.com (2603:10b6:5:174::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6477.9 via Frontend Transport; Thu, 1 Jun 2023 23:29:42 +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 DM6NAM11FT053.mail.protection.outlook.com (10.13.173.74) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6455.24 via Frontend Transport; Thu, 1 Jun 2023 23:29:42 +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; Thu, 1 Jun 2023 18:29:41 -0500 From: Mario Limonciello To: Rafael Wysocki , , CC: , , , , , S-k Shyam-sundar , Natikar Basavaraj , Mario Limonciello Subject: [PATCH v3 2/4] ACPI: x86: Add pm_debug_messages for LPS0 _DSM state tracking Date: Thu, 1 Jun 2023 18:29:21 -0500 Message-ID: <20230601232923.1248-2-mario.limonciello@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230601232923.1248-1-mario.limonciello@amd.com> References: <20230601232923.1248-1-mario.limonciello@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6NAM11FT053:EE_|MN0PR12MB5906:EE_ X-MS-Office365-Filtering-Correlation-Id: 43636962-3cae-4cfc-11fa-08db62f813d8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: jVo+aK7RPjTAGF4SpCX9Nd5F6z6o2p3wasZ0JCgyU0nUcPK0oiSekaDfYVfFi03cuUka6MgK4fpsurYAPgev1q+M9hHJJO6XVs73xSpuL7NR8c7n7mNdSuZLhL+Y3OD4iU0s3Esv+DyHcfa97BeY8h7XOYc5Fy4XNiiWX2VyFFOst6ldEzoRH+c/ml1/YD1hhBBc58SF9Kdz72eghKIRrqKo3BmlrPPU2VdZTuYwaRnXtu36fnDYAHtABIIWgCxd9Utac1Ex7n0JWsGTT34pEhti7mwj/s5lXVoFQOdpyHSXbMjv67V6AGKlMGe3dQo/kTV708OIKDZqN3oPMYtPZEKiGHSiOVkb87CGk4KPeMH5DFcQ7zu3CRsyDdlqeb2Gcfq0uMjbYlky1mnjQp7M5zOJpBChEApEahp6YJsuv8g/G3yHkvE0Z9ILswmLUxxKNnR/tHDXYVyZGMLk9c6xgG/7wA8QaLBt0xhMNl3fazWzfO4fXPOam2DKJR+i5m50GzqJzlK3KH3caa+8GnPyihHsyogey/5kGBozTPqnxeKDbb2y+ActNRv7/hh2k5JeUpH1ZRbRBqAU0cW6dmgLfwpKEe81JxGPNgR+pJAXipQ5C4usG5jjpavAJRymQY/nb+oSCPgdcbumlhoWqB4Lv50aipId59pwzptIKl9smKvo/B05LkW9KK/9j02Vgnb2RBQBazrhd3WxvbVzu2La2tB2BIild1gyplfVGRu57Pjxd8N4CJGXqWl6ke33mXtQLX4LgErO5HjDZe2t7ra+NA== 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)(376002)(136003)(396003)(346002)(39860400002)(451199021)(46966006)(40470700004)(36840700001)(356005)(82740400003)(8676002)(8936002)(2906002)(16526019)(41300700001)(86362001)(82310400005)(81166007)(7696005)(186003)(2616005)(316002)(110136005)(54906003)(1076003)(26005)(478600001)(6666004)(336012)(426003)(83380400001)(5660300002)(36756003)(4326008)(47076005)(45080400002)(70206006)(70586007)(40460700003)(44832011)(36860700001)(40480700001)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jun 2023 23:29:42.6614 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 43636962-3cae-4cfc-11fa-08db62f813d8 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: DM6NAM11FT053.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN0PR12MB5906 Precedence: bulk List-ID: X-Mailing-List: linux-acpi@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 Thu Jun 1 23:29: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: 688308 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 39DE7C77B7E for ; Thu, 1 Jun 2023 23:29:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229598AbjFAX3x (ORCPT ); Thu, 1 Jun 2023 19:29:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37330 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231863AbjFAX3q (ORCPT ); Thu, 1 Jun 2023 19:29:46 -0400 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2055.outbound.protection.outlook.com [40.107.244.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E42A136; Thu, 1 Jun 2023 16:29:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dizkZMI5ZJVWcuf0tPAvS9K53vnBKc2o2yM9ellUiSkwpQuc00NfG2x3nC6z/EpccuCUmmhC90rlJ9SdhNzVtSPrGln0CL8XXfNWfiJ8hr9shzz1vSq6Xe4twOQi1V4G2j7xR6LiftGneaAf8XlDIZChgIDKqj780rnN5xomgpGQZ8I2OEcxKpGWsxoxIO3ZjJde5CGOy54Kw8TO+NGXrLDZS2/KyQ3u3nPDEJ22sh0jtf9P3/kWZLMtD3KUeu3knuIY4TbmAHQYck8Pov09OpWjFZSBJVCIAkV9Y//EKNBbv8mGcoIm59QqhRilaHLw7a3cTh6xZsNp4BkUaPlFzg== 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=Cxj1EkoTB5xr2Wt7gkGm1SaqMKlyGBWGMIhA7GJr7Qs4iSuSt7MXr0C41MWIiKRpWZa1bDQ4KDrLJAKt/OpfZXF2SR1coWZQd5CRQYHi27Ix30180+fPhJSiftQOuT+2qeLfs5yhh3ZIu2AkZUUCQN4UDbYtubLntYSCd0Rzaoar1tpefp5zFmfyaJZaBPM+8dhHvV26Pi2mXaULsgYeCvs7BOBSZ3k4kppYNMqZUiv/yn8T0I+z7MrQ2nXINlG6L7uCUDXC3F6/cTfx0UCn7/lU0R/cnPn3GCSprITbVrherMeOnN1Zf8HRtgAPi/29XXo8nqP20j3DL8Bt8I0EPQ== 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=ORWt2kzztJm9REpBfs1fLP1Z5FkZhbG/qauYKzMhvoDvOn0/CMM1JVG7g9v9SFdjFT42lk2/gGvttCsH3hLDeKTSQccaSZ115RCSQG4YBL8HQtagp+4kiULy6jv2YPxP/PBrsxrpzTpy4ySgRPmrpVhZUyvXzPaYiHMNFVRhJxM= Received: from DM6PR21CA0010.namprd21.prod.outlook.com (2603:10b6:5:174::20) by CY8PR12MB7337.namprd12.prod.outlook.com (2603:10b6:930:53::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.25; Thu, 1 Jun 2023 23:29:43 +0000 Received: from DM6NAM11FT053.eop-nam11.prod.protection.outlook.com (2603:10b6:5:174:cafe::4f) by DM6PR21CA0010.outlook.office365.com (2603:10b6:5:174::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6477.9 via Frontend Transport; Thu, 1 Jun 2023 23:29:43 +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 DM6NAM11FT053.mail.protection.outlook.com (10.13.173.74) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6455.24 via Frontend Transport; Thu, 1 Jun 2023 23:29:43 +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; Thu, 1 Jun 2023 18:29:42 -0500 From: Mario Limonciello To: Rafael Wysocki , , CC: , , , , , S-k Shyam-sundar , Natikar Basavaraj , Mario Limonciello Subject: [PATCH v3 3/4] pinctrl: amd: Use pm_pr_dbg to show debugging messages Date: Thu, 1 Jun 2023 18:29:22 -0500 Message-ID: <20230601232923.1248-3-mario.limonciello@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230601232923.1248-1-mario.limonciello@amd.com> References: <20230601232923.1248-1-mario.limonciello@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6NAM11FT053:EE_|CY8PR12MB7337:EE_ X-MS-Office365-Filtering-Correlation-Id: 77336892-228a-420d-972a-08db62f8141f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: RTMcIr/8bHc99V113LydJUuy0CiOT6Ii1qiI2Q9Oqc9NTGKfnhAb+d520z8wU7gmsxibgDccusa+w0qO0e6hnXO6SPnW1ky2JLsCLv9A7vLN/vb9adOxS4dXTkiCAz1Ad3+NdBeEi5/KIDjlf05U4A/vUfqaqNve1LZkBl+VeJ+loPMqApHKggfuXcaqsO1i7hEGXITmFjKLsHSJjnVdBKl8kzNajmrFMfmPYnCqx9mI9Pi9pX36CjF5ex8mS/X7fMDjNIpNQPTQb0F8gvwE3koyNdvPXKEr2jX5MZb2WsNxWomjtaMFKHLgzzHuQbmy4Q0KQr2Qqlx/1tlQCTYmkfnMpq9BbG5QGk0C7P1xlWHhJD/oArV/dgts56LSkDBCIPV3C5ld6j5I04Emaoj3vHbueagO1REpzS7F8BWjckmwQ3PnM6R9VK4uniqz/xz5dZeFliVNxhkTdQDXaLSGq1YNEFT9H6XGyyXYAnWISou2L/2cqtNt2WHWQfVnnOFVk4voOtaJ7bzezW7x8yazT+FTE3wzmSvlCZAz+Qptb3cnXN4nwTt9DuxInN1o1ms0crIvaXAVtyzyvniO9ILWTXUMIfpusieTvBIwoQcQkqfQwj6Q0DFQ7FnPcj921WrfEUMZnCJtULPbLAZThJ1yhMYO+NhpnxO8BgJMUgamb+gQnVurs5K3px/vpVhXXrXLHvJ2RoRPv+Aq51A0G0PPKwQym1b310prslxBK+iGLWMNCxStlhrRFJvAMaMeH6U7j2DqlMkF7asNfQno7l/xiA== 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)(376002)(346002)(39860400002)(136003)(396003)(451199021)(40470700004)(36840700001)(46966006)(110136005)(186003)(4326008)(83380400001)(70586007)(47076005)(54906003)(36756003)(15650500001)(2906002)(70206006)(478600001)(16526019)(1076003)(2616005)(40460700003)(26005)(8936002)(336012)(356005)(82740400003)(8676002)(426003)(82310400005)(81166007)(316002)(44832011)(36860700001)(40480700001)(5660300002)(7696005)(6666004)(86362001)(41300700001)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jun 2023 23:29:43.1302 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 77336892-228a-420d-972a-08db62f8141f 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: DM6NAM11FT053.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR12MB7337 Precedence: bulk List-ID: X-Mailing-List: linux-acpi@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 --- 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 Thu Jun 1 23:29: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: 687755 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 C3BB2C7EE39 for ; Thu, 1 Jun 2023 23:29:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233016AbjFAX3z (ORCPT ); Thu, 1 Jun 2023 19:29:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37342 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232984AbjFAX3u (ORCPT ); Thu, 1 Jun 2023 19:29:50 -0400 Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on2054.outbound.protection.outlook.com [40.107.96.54]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 560CCF2; Thu, 1 Jun 2023 16:29:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=luHQpck6Emh/JtA6vkjzzwoZyYI1pQizy7/1Se/dWHMbdi4d1ENHDFvmVk/9h0C+dqVj3vkWVw/4SAm4eQiD8F8HDwJz8lyN9mNxJaafKXhwGdzaphyQwsulsVAdpwLFzBoDICr/r3I28y6gi5iwjvJLtsgglcu66nbtS7D2BWEcuY2A+3NcAejcnhjibOVJ4iqsR9CrWTjvSVwdzqm+cR5ozIGDGf7ROVxEaNgxhCrzoMl6KfSZjzAzkA894i8VW02vV50HVeSMWOm2eNKkePetmeJPDe+PSp1Yp1v3FoFwCMhG88GdvOfHI/oOyn2fbzE5EwwnOEIt6wvIguFyEg== 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=j/qNntrcnl4R7RxbqsmigFjvKKaRvp8/7hL+kRKnyy90kThNHE6pWstJBXqwm3PTCMO/UHnDnBDGA5IkrMNuklllbL1buHeZ4v2HfXjmy/cmlI6q2P7bs5Wjdq3a+airKBajqvsMWK1UGZecNl/+xKosfJuOSTYpgMgkJvHYE1Evjd6JPfvAzU6b3ssy1ngIGyW4BUAtfkCPydvR/3UVBRtDmhdJqi2Jr1te2J16FHX0GlEmfK7i8HrPIyk0stqHYRzrJN2l44pOu5+ooMUfkH6kO1zoTWTQDpK1Tp16jON8qnk5rsiR1XRQ/uuWDZwnAJeoVzWqg5TYt7Py182kpg== 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=XZGcsTcjgIS6mVtNGkHNL3EAMHcWOlGdIxmiYhAc162vqgGEry47FIY+FbDrzR1hbN2qf9Wtis4jXU6TxOGJo20gfHeF4yrqnLJ88z19E4U9NUw8c4P6621f6BdQ2359PcYUMdPCcgsv2EqTI5qTA/ezXMnado4fRTlCPgIFSD4= Received: from DM6PR21CA0005.namprd21.prod.outlook.com (2603:10b6:5:174::15) by SJ2PR12MB9243.namprd12.prod.outlook.com (2603:10b6:a03:578::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.24; Thu, 1 Jun 2023 23:29:44 +0000 Received: from DM6NAM11FT104.eop-nam11.prod.protection.outlook.com (2603:10b6:5:174:cafe::14) by DM6PR21CA0005.outlook.office365.com (2603:10b6:5:174::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6477.9 via Frontend Transport; Thu, 1 Jun 2023 23:29:44 +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 DM6NAM11FT104.mail.protection.outlook.com (10.13.173.232) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6455.24 via Frontend Transport; Thu, 1 Jun 2023 23:29:43 +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; Thu, 1 Jun 2023 18:29:42 -0500 From: Mario Limonciello To: Rafael Wysocki , , CC: , , , , , S-k Shyam-sundar , Natikar Basavaraj , Mario Limonciello Subject: [PATCH v3 4/4] platform/x86/amd: pmc: Use pm_pr_dbg() for suspend related messages Date: Thu, 1 Jun 2023 18:29:23 -0500 Message-ID: <20230601232923.1248-4-mario.limonciello@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230601232923.1248-1-mario.limonciello@amd.com> References: <20230601232923.1248-1-mario.limonciello@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6NAM11FT104:EE_|SJ2PR12MB9243:EE_ X-MS-Office365-Filtering-Correlation-Id: caffb3d7-43cf-4025-038c-08db62f81490 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Fa1/CyFJGEav/EEXKkEqhLs5D4Y/KTG/TfqWQTC/yxiiPA1iw05FOHT0FbdbitRNgkzWpEg0VVasERLBGWmc6nwdRoMTNWX4FRSwf/EKSScfis3ge9dHptqvHcY1pesnoIDEUucgGtscggUz7m6ml4VpyFcFAtmC+pcaN9adwAKJ4AeWfmYTIC3U3V3sEyCtLNEORm9eBZeKONst48F8jn1yR/QLrqcpxrZjX9xUOdEYxc5bzg/Ua4wP2E4eHqyHbmxzvVcK6HKUT21yayQbK0nAGc4RyZNklKhH4AmaImAaUnXL5J6jxy4Laq5AaahF2385Qx4qfyXFnHhD1n7tu2oPxgacn7o8XWSxudoNTa0adD/ZPlPLSep+E1TT0mF0s154QDY4udR6+abLPhKJUNSs58qU4Rn7kK49t3vwEZcsR9YRdWvOj0dQ59Xql5wCo0M0avB7HyfgTEmoyFBdxg0bPKhgBOu8lNhi7bATQ449TO8xOgcMeL4YzwP1aTjTaGwupNbkVV47kksLn/mUtDdRy8wkfgLY1GQloyBm7gL0zDrYiv/lTTL15oDMzb34E56F28mynDjYGDxZT4ucxZGxAqzf7B0FMFPrwuugux0EDkTEJ/Z4ZuGABj0FtV6U1l7UHGElYGc6n4k4mehnyWd4F8ygwL5+sNJwFbVc8/qErjABpL0rTPLOSPQCiWb1Ekv4zXvb9PHKkeOXDFjiqV3qqgfQ8p0B7Vacm2bqlfShampY4MCYDfx5oZuxtJuiV8VGA4C24hB3vkKRnPteOg== 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)(376002)(346002)(136003)(396003)(39860400002)(451199021)(40470700004)(46966006)(36840700001)(40460700003)(7696005)(6666004)(36860700001)(86362001)(426003)(36756003)(336012)(83380400001)(2616005)(47076005)(82310400005)(356005)(81166007)(1076003)(40480700001)(82740400003)(26005)(186003)(16526019)(15650500001)(70586007)(2906002)(70206006)(4326008)(54906003)(110136005)(8936002)(8676002)(44832011)(5660300002)(41300700001)(478600001)(316002)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jun 2023 23:29:43.8669 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: caffb3d7-43cf-4025-038c-08db62f81490 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: DM6NAM11FT104.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR12MB9243 Precedence: bulk List-ID: X-Mailing-List: linux-acpi@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; }