From patchwork Thu May 18 17:27:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mario Limonciello X-Patchwork-Id: 683974 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 D6942C7EE23 for ; Thu, 18 May 2023 17:28:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229996AbjERR2u (ORCPT ); Thu, 18 May 2023 13:28:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56588 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229976AbjERR2l (ORCPT ); Thu, 18 May 2023 13:28:41 -0400 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2072.outbound.protection.outlook.com [40.107.243.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 644581BC; Thu, 18 May 2023 10:28:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GRTq6fMM6YQvbiC1KL8PTBz/3JZErGwrOuJp0/fKiukWOmbBwKNdFFXSMJ5BHsVDDf4UmJzPBzUuU/Bm9M9NUBJF7ZRpuY3Ugk3DkjqUUMLo/5ot7nrSoKL7bp2VRsd0XrGeGrOFI62W+NbDHtbYTPXgR5FIEKqurbOxdUmG4pKQe6+4T+MxWVV8wFkzbFuetA0SHOQlD5DyjoEzXFC+KuXiPZG45Ou83XwntATcZw3rvMd7VCMhcrOKRJnMkX6i0SniMtuvLLloEGAWVzSWBxccF6WTYHLsrAWfbStPl3uLQqIs8mEqlhMstDMvfhuufuctTPnBc54KdkMS+SaWiQ== 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=VkyMYTdhqw5NUxIPYExhPEeI/HymK78oPliRaTqfyMQ=; b=bRVP3H59t5jkFbUFK/xvB6qdfHVeiCDFdf6XZMC7UWRaGc4sLDTbuorAjmcj+k/5OnFlqasG9N8fB0OBqD5Bgvs17uhBod/q/lrbWwoAGpbIeDib/TKYIQ2jPSxYhP0sTlZJUkzg/HMMO48DAUWWxL3S3kyxdHPLfzNhM2ovrTuzoDBlspPbeagfhu6qusdOJgrWklEss0BXr500ilb/N+FkHhlsdKAwebN1ZKj8WSUKas5djgYhjdMervQOPz3WCZ4wPszptRVqKtm2jrXsf7gQ9Ftm+rtnX62mI387LVHJDeRkPHrMMe4vbiNGdP4IH/bPK6W/B7eDzeNT0llpkw== 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=VkyMYTdhqw5NUxIPYExhPEeI/HymK78oPliRaTqfyMQ=; b=QAutLpq3vFgL7Dea6uY6MoFaJxqyhB5yy2HqJTtzorAZk+hynTFoTBxopaFN7g/YiUoKKogXEpVyuFn06/l7ly+36NqTPzKLt8sLtkYvUrQqClb8Dt3fU6BWAs2JmmyqWDol/j6DFoIjDnRauuPpnB2vwJctfqF42B7FJ0Tmzqk= Received: from MW4PR03CA0015.namprd03.prod.outlook.com (2603:10b6:303:8f::20) by BN9PR12MB5323.namprd12.prod.outlook.com (2603:10b6:408:104::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6387.33; Thu, 18 May 2023 17:28:38 +0000 Received: from CO1NAM11FT090.eop-nam11.prod.protection.outlook.com (2603:10b6:303:8f:cafe::c4) by MW4PR03CA0015.outlook.office365.com (2603:10b6:303:8f::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.19 via Frontend Transport; Thu, 18 May 2023 17:28:37 +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 CO1NAM11FT090.mail.protection.outlook.com (10.13.175.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6411.21 via Frontend Transport; Thu, 18 May 2023 17:28:37 +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, 18 May 2023 12:28:35 -0500 From: Mario Limonciello To: , , CC: , , , , , , , Mario Limonciello Subject: [PATCH 1/4] include/linux/suspend.h: Only show pm_pr_dbg messages at suspend/resume Date: Thu, 18 May 2023 12:27:49 -0500 Message-ID: <20230518172752.93322-2-mario.limonciello@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230518172752.93322-1-mario.limonciello@amd.com> References: <20230518172752.93322-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: CO1NAM11FT090:EE_|BN9PR12MB5323:EE_ X-MS-Office365-Filtering-Correlation-Id: c280f82b-d71d-427a-6eca-08db57c550a0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: shFLmDzGsDeDPn63AAs1mGGQJFC13/2t3LR1xqldHgGwzSrEC0otXqD5QwCJAcpjHFhY/F/kOCNzgWCgr7DlAcn3X3kOaGoaSI5kHOil0P9lcIq8GoM8kkr1r2/M6cxmPIKm0l6/zF4TPsuaZH7+1oQqClM5ezpRFtuVLuSQNNP6Yhakbq4QC4aO3zzuO4xe7dgDnZNjlZA2ADPDoRf8zVWf8xp1sjsgOsctnh3CfJPV920so8LtJFmKljrCgNmrzOxC5tc5Psy/hlg6+DthWql3jDIGVQad4SRb/QtaHjhvsv0AcurrMiepYDKYCHEXwUFa/tKnR9Oopjk3hgjucQlCtIHJEzTyjvNLQNkKMFeKPwFLcJA4ksoX0i665lxGA3VX4QQIX0FqF0qLTVBlBJeOrhOlp6ZD5LFDlqPfQkX02nX+8v7txlydigHLlJNjuLbovC0PgU4oMJdWbWxLdQ1mN+BA+ZS/IOz+NzH/3sejiJPgdgSNVlo8rI5Bg0B6OmdU+Ji005JDuWznAL8VdJDT/UNVPhU9+r2xKlPv4jTUo0Iq0+JO4f5MmtCnnPpfj4c5gYbgkgUViEyNp3attAUmbJ1LyJs8nskTCkDsmS9dI9VT37qy1+ZMkzj3uY3rNixpxULOpqXffSSMPaFQTbcrem4/zxdEloZxXeyoe7BZTQ7TgiRKRuOPoC/UPJEScEY7R4mgAhykoxsT1puh71Yyjt9QbUCa/zDChUpH50a+30CPHapipR8WdeexrqE9UW14KYvGeD98OzBKm9qJFA== 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)(39860400002)(396003)(376002)(346002)(136003)(451199021)(46966006)(40470700004)(36840700001)(36756003)(4326008)(2906002)(15650500001)(44832011)(336012)(86362001)(426003)(8676002)(5660300002)(8936002)(110136005)(316002)(6666004)(70586007)(70206006)(40480700001)(54906003)(7696005)(40460700003)(478600001)(16526019)(41300700001)(186003)(1076003)(2616005)(81166007)(47076005)(82310400005)(82740400003)(83380400001)(356005)(26005)(36860700001)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 May 2023 17:28:37.4516 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c280f82b-d71d-427a-6eca-08db57c550a0 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: CO1NAM11FT090.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN9PR12MB5323 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 --- include/linux/suspend.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/linux/suspend.h b/include/linux/suspend.h index d0d4598a7b3f..a40f2e667e09 100644 --- a/include/linux/suspend.h +++ b/include/linux/suspend.h @@ -564,7 +564,8 @@ 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_on && \ + pm_suspend_target_state != PM_SUSPEND_ON) \ printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__); \ else if (pm_dyn_debug_messages_on()) \ pr_debug(fmt, ##__VA_ARGS__); \ @@ -589,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. From patchwork Thu May 18 17:27:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mario Limonciello X-Patchwork-Id: 683437 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 65FDAC7EE2F for ; Thu, 18 May 2023 17:28:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230016AbjERR2v (ORCPT ); Thu, 18 May 2023 13:28:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229709AbjERR2n (ORCPT ); Thu, 18 May 2023 13:28:43 -0400 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on20614.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe59::614]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 52A101BF; Thu, 18 May 2023 10:28:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nt1bZWEQvNx+JjdFATPYz2QRz025zZR/o5BiAOZfnE5EmE1XpxQFiGtTGH298rnQtrWi6+AK1rOhYPNuIc9223ADbJPP4peHfG5SbjZMqgOaVwEK1YBCDev6RZkBGub2WIP+l9LGDrT5iwkUgcG3Wh5/mHM8OHkiGVvlQCr7k7aPhS2usBhgOpVDNZAFKtF5CjZ3bcZeY80qbwoU1Gu28funZ9Ck/8l0evF0gtISVbTxR774Srlb24JLBOHcl2aY4tXQRVt3UbQAPPphWtgkuoNZfItqGoPJcU7lL+yH+UqLc3si4ei1uZBe60ad2vzznbSE3P7tscY0aP2HWkHvkA== 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=qHSKk++w/2Ftufz4szWBCDoHpwAuc4YNMEZJMvN5vZ4=; b=PFQ7zPGKimGpAT9wjxdpbkoYJCKGuqnlVjjwSyEy6SK7gGj/1VezHkxO5eWEsdcSx8L1fwvAag+Fql2rXcHBSptGP3gG+TjwjVH/sI+zxNUh1EXQjbzlOcR3KHKZSBg/4e9HlK3eBNZWq160K/GD/JSTOrsDDMd4CG60dHIXWXa9q5pcWJvBMh33YHJwXNs4aUzLT4S4HuVXHyszXpq1/oLXxzhK14JW+T1iwqGgdFRtabHNRUfefV+U/+JigxgzcnR10uV5UHJdwk89B3fAzuNodabLacIAkq2DYqdfbwDY/XgEZMt4G+g9DWZQVvgJ406nPM1doktXPk7uhul4wQ== 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=qHSKk++w/2Ftufz4szWBCDoHpwAuc4YNMEZJMvN5vZ4=; b=Wo061sksYY495BwaXHPqPJAs2HdqvhojrxCJVtGtMYlowT8Rqwnv4MsE4FPe2wCpGilFHVmiDGRHmCQ98yi3HZfSTtnaOQkWqwTPWOdC44FIDQL+b8TiMteJm3ZmeB5szzawTU7DcgzOUclZCrPIIk5mMM8n0lwJEKq0CKLb34Y= Received: from MW4PR03CA0022.namprd03.prod.outlook.com (2603:10b6:303:8f::27) by DS0PR12MB7654.namprd12.prod.outlook.com (2603:10b6:8:11d::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.17; Thu, 18 May 2023 17:28:39 +0000 Received: from CO1NAM11FT090.eop-nam11.prod.protection.outlook.com (2603:10b6:303:8f:cafe::e) by MW4PR03CA0022.outlook.office365.com (2603:10b6:303:8f::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.18 via Frontend Transport; Thu, 18 May 2023 17:28:39 +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 CO1NAM11FT090.mail.protection.outlook.com (10.13.175.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6411.21 via Frontend Transport; Thu, 18 May 2023 17:28:39 +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, 18 May 2023 12:28:36 -0500 From: Mario Limonciello To: , , CC: , , , , , , , Mario Limonciello Subject: [PATCH 2/4] ACPI: x86: Add pm_debug_messages for LPS0 _DSM state tracking Date: Thu, 18 May 2023 12:27:50 -0500 Message-ID: <20230518172752.93322-3-mario.limonciello@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230518172752.93322-1-mario.limonciello@amd.com> References: <20230518172752.93322-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: CO1NAM11FT090:EE_|DS0PR12MB7654:EE_ X-MS-Office365-Filtering-Correlation-Id: 282b8681-343b-46c3-235e-08db57c5519d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ZIw/Y70QexdbCxOqDtgifPi8nV+Uo1BB9vTBsq/EeORVq3gENST+cCuWD4ga2MBgoZOYVJqS/VhCyliaoO2z1JoXlB3IW+KXMvM4hfCzStNAXrEf/8RoSVPLU697K1rjJFS92pOXfw5RIxW2W7J+GZQ2g+61NJEd1FqQn25o7U7zhz6DFlbEXodNphTcBGhdxfbi/msFTy8H1FTUWIFtRKEfDSQHaLXhgeMU7rDARIA75RTkX4U79buWRFOSrkDA2u4QWvFmQwTREx2keLo4Spbb3DTYfHpIjcpUX/3aZndGFi0xoho4qymqt6SAZsZresCeAxiDcP1cnC9idt5hp/2x2KSJIfHazEuYnjv9JXSxDjGNBlJEoaVch9mjjCY0eVogccb9ja6ezKXah1rYoXcnJ5aykMvHapUsVOORTVCSq5AjQSmaGkkInyRJNxFa5oP7WxH48L9uwrMec7XBZm9cHN7nVSOn4Cn85/3etq5gUBiOK1x36S/LxRF2AB06i8vu4TK4WjJt8eLQXbB4B5KlkcCDzXbiZ7nmamhi5X74XQY21jLVcN43heb7iCbBAeWGMHwGviSKbAkkmrwxegq+vON9c0YuHnObpB85ia/U65wpP0+e4gwwGr+QigOoyfpo3iBYgXAiSqy65yW2nFf298ztPj0j7I/4qfB4Dq/ckqnB9jMqprZo4rSmB2d6qy6QDzZASM5Ldo1zaRxrUv7eb/X3ds1MqO1fmFTt0IYXKRija+dBTjFS8cf10nkOEB4qYs/3lrz8H3lqEFXEJQ== 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)(39860400002)(346002)(136003)(376002)(451199021)(36840700001)(40470700004)(46966006)(8936002)(45080400002)(70586007)(70206006)(4326008)(316002)(86362001)(8676002)(2906002)(110136005)(478600001)(54906003)(7696005)(41300700001)(44832011)(5660300002)(6666004)(40460700003)(26005)(1076003)(356005)(16526019)(82740400003)(186003)(36756003)(36860700001)(40480700001)(2616005)(83380400001)(47076005)(336012)(426003)(82310400005)(81166007)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 May 2023 17:28:39.1077 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 282b8681-343b-46c3-235e-08db57c5519d 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: CO1NAM11FT090.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB7654 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..94f4f31ff1ce 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 May 18 17:27:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mario Limonciello X-Patchwork-Id: 683973 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 B6F11C7EE33 for ; Thu, 18 May 2023 17:28:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230044AbjERR2x (ORCPT ); Thu, 18 May 2023 13:28:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56624 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229978AbjERR2o (ORCPT ); Thu, 18 May 2023 13:28:44 -0400 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2076.outbound.protection.outlook.com [40.107.244.76]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C5E6BE46; Thu, 18 May 2023 10:28:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oXgSeiNqvWQTXX6tYSjQMmMz4lAGR/nQurNj0W3gifyHz64806ifnG1/tuX+MPvKhlJKJl7TScsPMCgOEvBxuByfAAPr0fsiliudoScbWpspDbAlI/d16pvaIiXL8H1W2l8zPbcPvSMyNMSCoA1tjgtqs+3w2tMEAfKYcD04U6uwaBSytk8VbrOY4D0aXuj672xW24FS/YDkaWT5DhfP3O7eEQU0Yt0N2VpjBVk3o5MoeySEiqsv9mN1eudfskWeIAFOnhN5ZTX7ZN5Iw2+obsTwwfzH/lcgt3KZqn/JX7IjRsW1wQ+6AUl2+FtlaWMQbJBvgXyB3W7ClZ8utRnE5w== 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=KRphIMYmazRT6DBp+bQkiXI2Wgw42cnF9g+Jc6x3t1Fzm1mQbZ/DlHDXdfQNF2gMQQVrmwgt1JxniCWdaTQ+GD+Cif48ay9d72C3BMQlSgvy5GfKr4oNvsL3BcMOnTr5P6ayYmn2v9Bad8nT4JgTDPHHDcTnGxEtDvYq2u1O9YlMFyLZBbV9IDLWZn6LFWlsuP9NvGHCqe6uS1uWUX0Dq8cm54eIVxWzSN8gwrfKhMCLfYdL2ZQpcf0MpbqnwVgFDZjdszYb3ds4V8TQC13XP43SExZ3o8mk/tszdz9zx9x8bV6O6I95wCz5zlslrctSwfjUnbWhV5i/8rYiInRClA== 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=5aYCBrz04GJnNhukI4MjjaupNU3fv8Xn1WedccIo9Z0LvTCk6HeRan8DGXMgaaUJQbLp7AN6/Uv1kTqfRNHQmijY9gBE3CkqRAAI33AvvT7VZDAth/93Hfyh5ayYNy1Qu8W2PH2f7T7Dcf4wD61a7Ft4qQiISF8vB+hj74Q0zls= Received: from MW4PR03CA0027.namprd03.prod.outlook.com (2603:10b6:303:8f::32) by DS0PR12MB7849.namprd12.prod.outlook.com (2603:10b6:8:141::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.19; Thu, 18 May 2023 17:28:39 +0000 Received: from CO1NAM11FT090.eop-nam11.prod.protection.outlook.com (2603:10b6:303:8f:cafe::a0) by MW4PR03CA0027.outlook.office365.com (2603:10b6:303:8f::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.18 via Frontend Transport; Thu, 18 May 2023 17:28:39 +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 CO1NAM11FT090.mail.protection.outlook.com (10.13.175.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6411.21 via Frontend Transport; Thu, 18 May 2023 17:28:39 +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, 18 May 2023 12:28:38 -0500 From: Mario Limonciello To: , , CC: , , , , , , , Mario Limonciello Subject: [PATCH 3/4] pinctrl: amd: Use pm_pr_dbg to show debugging messages Date: Thu, 18 May 2023 12:27:51 -0500 Message-ID: <20230518172752.93322-4-mario.limonciello@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230518172752.93322-1-mario.limonciello@amd.com> References: <20230518172752.93322-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: CO1NAM11FT090:EE_|DS0PR12MB7849:EE_ X-MS-Office365-Filtering-Correlation-Id: ce871595-96a9-45eb-6d38-08db57c551e9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 2rb4WnEMCU2esqI7VHCfxcxoX2Z49b+cukM6MWtsMVZOd49p0FL8cPk2yd1st+tjimD9WWgOMDEWjQgpU3a/Qb1KftLcbcJ4zKajEf0Fs0RmE6+yOWUzL6TQtzv4jLNiEOOT0dNd85bUW7YdCcbLkwzZDlOmq3EsBYSpat/G4OFEYZRRYgLr6YLfZ7DhBwaOiP7Cs19yiv4dulb0yO7J3SuN0zxLVGmUuoPUWBih+cW6+DofjfrYKsh6sr0uUnR9GKzvT3yK1cId2dsVLjVeeU6nDwwDqMVjlVe5I3YkQFT8eN8MO/xoR++pxyezZhP4nnB8+gwRd9nWh4rHuXFKuQpE/er30l0/9RLUZX+i3D/FttS89TDkoJ49C/7yHIqVmsxZzbBFptKBJY6DjUB+mhPz/R/yD22+qpJYnJVn1i6/K8okQMRv4Ulwcuzms+Hzfge6M41GcDdp92E9G9xyD5pcbe0scczp7OPjdvLM6yvdcYAQU3kQvAqxJhsmbrq3EQPougvefN3QQuZnbaxArEgxKL6pW3uSo82Mp8LQSg2DSDVOrDVrID+V4hnNsrY8RTCqdICQGf85NDyzQ/2NaKJY3WuZETJMdAiOQTb4WicrnSjDkkrp6qpMSLXDwuF1jenLd/aUXUtKS7HTcmrLYISMaIua8DU2Hsf/t3vVb60cFJGRLl9lmHO+YbhBhNXoVE2n4cWOBPzNulZL0/j5p6TWudx6p6D2K8EM2D7/lW881xUaX21yv83EatWoUWAD4t3xPyuhVmtMDA6Qzg7bRA== 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)(39860400002)(396003)(346002)(376002)(136003)(451199021)(40470700004)(46966006)(36840700001)(6666004)(40460700003)(26005)(1076003)(7696005)(8676002)(336012)(426003)(44832011)(186003)(16526019)(316002)(36756003)(478600001)(356005)(82310400005)(4326008)(5660300002)(86362001)(81166007)(2616005)(70586007)(70206006)(54906003)(110136005)(82740400003)(40480700001)(83380400001)(41300700001)(36860700001)(47076005)(2906002)(8936002)(15650500001)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 May 2023 17:28:39.6077 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ce871595-96a9-45eb-6d38-08db57c551e9 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: CO1NAM11FT090.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB7849 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 May 18 17:27:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mario Limonciello X-Patchwork-Id: 683436 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 8CBD9C7EE39 for ; Thu, 18 May 2023 17:28:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230053AbjERR2y (ORCPT ); Thu, 18 May 2023 13:28:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56714 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229980AbjERR2u (ORCPT ); Thu, 18 May 2023 13:28:50 -0400 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2069.outbound.protection.outlook.com [40.107.93.69]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ADF86E6D; Thu, 18 May 2023 10:28:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dxNvhS+BKZteu/P85RAIpfbR0OFYf+eoGkig9Gftvp70qQqPUKrE7VSHxS5sczsupIONBoeeSekyFU1FZxEHyyaVN8PM2zLhkrbXQaG3PjtxD7HYzEkavqreOIIdA8YtnsqzquF1ePpR3Pp5oyXSMx2VYYP0HJDjuhq9yB7CpCedIjiHiH5VBnW9FZH1qukDpILZoLrbdsGjSJSXYQ77f7Qnzn91nzMT9Pr8jqcELjXMHLV/8+PI9+98X8mtSTEEPZ+nHjvv9K/IN4o07FDosBWqVbRk5ZZui3Gn9yKJCvT2LGMHbN4PN/YmX7pNxED32l/KwGdRCieQs+Wnii2h9Q== 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=OGG9eP1BehymH+IIQFvwrav/gsq+GncABQk65umBqbYNLKaco0IEk+0Z8bnIsMthusUfe+YGcAHh4i52KsRQuH25HxDQOOhDzkagbY0JKUaXXJ1y991ndmHzvsFTCWp/SsVFT9qbJawz3iKmbFVAx+NbFcC3BpFwKxUNpF86/wmGrBXr3d6CzH51kET1WyJBqeb8F3DhVWtXM7bWNS+WAl8bsp2fYIccxKZV2yaOR8me1+mWnDF5TGO8yFpt9SEHjMxXRC0F40oU2H3o8oVBFzjkQN+k1hiF0RxnqGnWF8qT2k7VVDEXswpksPFB0whQQS7f0bTpTltCdYstAfqcgQ== 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=UglK3fpkgNpHwVHB+kOzMK8+aHM7UpryOXMpmKdFJ8vNNpGDh4jf03NUiHXNRXiXBGmGanb29OrBeW+Qfiuu+6S6Swz/xkoQBeJoMXVIOD2tPiDytZRCFgWPj3AwPUZgrYE5p3sscjGGggAK/iHaWCi8vaR0ZNIlmNcD8/2dUc4= Received: from MW4PR03CA0030.namprd03.prod.outlook.com (2603:10b6:303:8f::35) by DM6PR12MB4928.namprd12.prod.outlook.com (2603:10b6:5:1b8::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.19; Thu, 18 May 2023 17:28:41 +0000 Received: from CO1NAM11FT090.eop-nam11.prod.protection.outlook.com (2603:10b6:303:8f:cafe::3f) by MW4PR03CA0030.outlook.office365.com (2603:10b6:303:8f::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.20 via Frontend Transport; Thu, 18 May 2023 17:28:41 +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 CO1NAM11FT090.mail.protection.outlook.com (10.13.175.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6411.21 via Frontend Transport; Thu, 18 May 2023 17:28:41 +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, 18 May 2023 12:28:39 -0500 From: Mario Limonciello To: , , CC: , , , , , , , Mario Limonciello Subject: [PATCH 4/4] platform/x86/amd: pmc: Use pm_pr_dbg() for suspend related messages Date: Thu, 18 May 2023 12:27:52 -0500 Message-ID: <20230518172752.93322-5-mario.limonciello@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230518172752.93322-1-mario.limonciello@amd.com> References: <20230518172752.93322-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: CO1NAM11FT090:EE_|DM6PR12MB4928:EE_ X-MS-Office365-Filtering-Correlation-Id: 45d6dcdc-8e5d-4332-23cd-08db57c552c7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: SupjCA7Bo1HCJv4g6tiPt2QW5q5Px4zIovLcBKEYKG2k6EHr9pRzmqqgjWzk7VPMFYyaD4DMmzuoqiAwnUlp6+jI0RzwV6mb/PeOQUzy8rdz8zm6XyQmNenwOtDzrB8NAPMD/fW+SGUJ8CgHiutYO/Wy2hYjZb513ECinkRNBkzCPzjGnAIQAmWCzp6hWQZHMpytMVPhB21epuG6ae9GfPuUdpS7EevYDHj7wFcTsMTtXjVoBKzXe3McPuFWPQ8TUfPfE3neczvCP/43Mng7wx9TA0K6Z8tBTF2B1kYchis6Uw0JZs+yeff9k4XhWvtfO01DEuHpmgzHvKp8VotdDrg4k8ubiuGmZB5v2Lwe9FpmzIWEl1BzFAZkZtk2QIcu1oYhB+kDFfbHleWFX2UlsuZcL8wi1M1YPOg6g1l/ns5QNVpTezyk7WvIrP4NN2teSQOD0pewMyP8IruTwLf22y16yNXNr0JZjbxgqrrVcSxyt/KwyJn2WqXx7QTZtufFjoV3JL+lFc77LRS33ymHcVkw8qBVs673bF6MXmkj4qBat3j5kSXEf3hI712NC2y1Mc+Rj9nxhZx5uXimWUI5QMmTUDPRnbXn5uuEeY6z+5RpOxOXuSf9HAfA+A0BKQeCRuf998e7xTy08/yWWaTvZ7m7lVcEcR9Lfa6SD8jgLa0La4t5DBpuLxLPt4/u0hYH+Iasw0LC9w1XwCmXDDJ9gtSBeUppKbNvm1JbnoiN892t9L5v7r/g+xaTZgWOaGqbaJ2rz7pzygF/XH+AcoLQ7A== 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)(39860400002)(396003)(136003)(346002)(376002)(451199021)(36840700001)(40470700004)(46966006)(1076003)(26005)(40460700003)(7696005)(36860700001)(36756003)(40480700001)(47076005)(83380400001)(426003)(336012)(86362001)(82310400005)(2616005)(82740400003)(356005)(16526019)(186003)(81166007)(110136005)(54906003)(44832011)(478600001)(15650500001)(2906002)(4326008)(8936002)(8676002)(41300700001)(316002)(5660300002)(70586007)(70206006)(6666004)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 May 2023 17:28:41.0607 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 45d6dcdc-8e5d-4332-23cd-08db57c552c7 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: CO1NAM11FT090.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4928 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; }