From patchwork Wed Jan 25 11:31:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shyam Sundar S K X-Patchwork-Id: 13115559 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 7BF28C27C76 for ; Wed, 25 Jan 2023 11:32:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235024AbjAYLcH (ORCPT ); Wed, 25 Jan 2023 06:32:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51052 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235343AbjAYLb5 (ORCPT ); Wed, 25 Jan 2023 06:31:57 -0500 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2062e.outbound.protection.outlook.com [IPv6:2a01:111:f400:7e8a::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 524AF9EF8 for ; Wed, 25 Jan 2023 03:31:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KR2Xpoj9FHgD+eX5H62j7AbrnGJ1reu/rsWtVAOIwIGXAFnu67SpMfV7BnNiJHi3oo+6d/8pjkiKqEP1erPAfuiEP4gNEHuyoFigwZnnqpYTNzB0FFZIeUMQcahemkSGXpMHD+/dTt0E9S749PRlWtuK1WFrTkrNSDA1YsVwmLhaH5RTc71ig37Ax9Eyb0i7BfokGoIikK1jGtcFzYP1W5P2ZHD3UNd7CkIWbG+fEvy549P2gXDvu+WnQH7hrBUq8t2J2zJlM1xx6n/zLGyLyeFhRcqvqhrgzCXxs1jIdVhFWzmxW5jZeZNHP/svPa70svY0HBh99YBAYzNOJwS6SA== 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=KBoahyUu5yNgOqPlu2c2zAHTU8RfsI1gE+yRYIfqNxk=; b=cu+yivmycMqARRCTwYWHGtMNZGegM9Bo1PYxY8D1Fq/oUPbdRuZFDUv4vvImii1ouzr+N4TQ4FsU6J5S5ets+RErVSLnHNh3kMKO4R3DGosY/6SDAaF757s3BvsoQs6hZ/1XAnDNjC4Dm4BUMVkGIRH7kEF7Xnm/OaWNL1BpSoP9XjPtGgel6tu2Qq2Qdw9Rq+LfEvgc/xiyl+L5o4bBQd544WZ5PiULAWbrZkGemP/BQITZFJh40m7xq4BU87VQk1pzt+Xu+VxCEFpky8T4y+wquQmnUyii5l2U66B0hBcteVdvwwhRdECQpUa4FMyp4eDS29Hyfo25UU2Zc5XuTA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=redhat.com 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=KBoahyUu5yNgOqPlu2c2zAHTU8RfsI1gE+yRYIfqNxk=; b=30wOkju5fRoVXqm0LNab6LRcvERqL4Kk7bjEWbSnWw7WNnbov+j6FAgvQwEfBoNzOvZ9Xmp5y0uM/Ex4RDT+jJr1mok2QAu1sGhEQ4a8P4QnZ9ZEUyB+PZyGW3UkMk7nMoSzunbDCOrwCZbi3ZUov4KoI721bMBzsVpi73/OQGc= Received: from DS7PR03CA0121.namprd03.prod.outlook.com (2603:10b6:5:3b4::6) by BL1PR12MB5993.namprd12.prod.outlook.com (2603:10b6:208:399::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.33; Wed, 25 Jan 2023 11:31:52 +0000 Received: from DS1PEPF0000E634.namprd02.prod.outlook.com (2603:10b6:5:3b4:cafe::a7) by DS7PR03CA0121.outlook.office365.com (2603:10b6:5:3b4::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.33 via Frontend Transport; Wed, 25 Jan 2023 11:31: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 DS1PEPF0000E634.mail.protection.outlook.com (10.167.17.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6043.10 via Frontend Transport; Wed, 25 Jan 2023 11:31:52 +0000 Received: from jatayu.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; Wed, 25 Jan 2023 05:31:50 -0600 From: Shyam Sundar S K To: , CC: , , "Shyam Sundar S K" Subject: [PATCH 1/4] platform/x86/amd: pmc: Add num_samples message id support to STB Date: Wed, 25 Jan 2023 17:01:24 +0530 Message-ID: <20230125113127.3862898-2-Shyam-sundar.S-k@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230125113127.3862898-1-Shyam-sundar.S-k@amd.com> References: <20230125113127.3862898-1-Shyam-sundar.S-k@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: DS1PEPF0000E634:EE_|BL1PR12MB5993:EE_ X-MS-Office365-Filtering-Correlation-Id: 280c0208-d6d3-4181-e1fe-08dafec7c19d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Cb3Hc/KmEnnVq8AJ+XFAfzDTRi4kKI2OgjZNh2xAOJ6oODQXRwkxA8Qwpp2/p/AJ77KamgMItXaaAq6Ztmu2G55va0LnpAMZRdzWVhoASmCGS8sKYtyVO2E557dcj0EfDgY+mBi75nC0ETBclb+dL7nQCk6Hv6iz/cwJvaeYiePFnDPNU+gXecvHP2ytcvkwPzPKYmvUno+7CkbP+AthEZ8uEzdOrjIdwkfBarmdUsguXCFWMW178rOWTZeNSCCp2uSQ5eIGM//aycJ33KTWc+8cpiG9OhQ07zMb0ihcSSSZ7pdZYTkzubzFi/PKu1VaKiTS8TAfleq22N0tUxhS2H1rwPks0ublhliFMlmYb39+vKXhhxsUEEkRSXrtzmrc5OQXbGhbvY4r0T2SNcJnMGgcc24K863PW+lKPApIFmWLt9NZuA6o8xO8PHu2FYunrdc1xAXbo73oFBXzlGVPM503SVzRio8qTDGOhla2y609XzEas8TDtcL7MtXoafFqjqDY9A40CD5SBCBeU+gBZ4wTxsUE8/0H+o/2ueqzOiEwZm4AFHXt6QhHPHXIkHJz18F0C9BDR4aILWh+/omKNQk9+yHhg/8EAFH/Rebkg++ufhX6I5+7Vysbo4AYDlMCp5FJEy+pv0FnFYhPemYKPW12Q09ED4IG8xqxltL5yYFEcCelJ/H7tXYgEUFhYmnh6UBV8QYHJau7Km4J4TomjTUi9E/s/kc/WVxfg4R91QBZxDTPYXQMVlTjhJvQ4BtElst/RJZXx+xxjWYnWI/B0g== 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:(13230025)(4636009)(39860400002)(396003)(376002)(346002)(136003)(451199018)(36840700001)(40470700004)(46966006)(47076005)(1076003)(110136005)(336012)(54906003)(2616005)(8676002)(316002)(40460700003)(70206006)(36756003)(4326008)(70586007)(5660300002)(15650500001)(426003)(6666004)(83380400001)(41300700001)(81166007)(2906002)(356005)(7696005)(16526019)(478600001)(186003)(36860700001)(8936002)(40480700001)(82310400005)(86362001)(82740400003)(26005)(750200003)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jan 2023 11:31:52.5861 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 280c0208-d6d3-4181-e1fe-08dafec7c19d 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: DS1PEPF0000E634.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR12MB5993 Precedence: bulk List-ID: X-Mailing-List: platform-driver-x86@vger.kernel.org Recent PMFWs have the support for S2D_NUM_SAMPLES message ID that can tell the current number of samples present within the STB DRAM. num_samples returned would let the driver know the start of the read from the last push location. This way, the driver would emit the top most region of the STB DRAM. Co-developed-by: Sanket Goswami Signed-off-by: Sanket Goswami Signed-off-by: Shyam Sundar S K --- drivers/platform/x86/amd/pmc.c | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/drivers/platform/x86/amd/pmc.c b/drivers/platform/x86/amd/pmc.c index 3cbb01ec10e3..01632e6b7820 100644 --- a/drivers/platform/x86/amd/pmc.c +++ b/drivers/platform/x86/amd/pmc.c @@ -114,6 +114,7 @@ enum s2d_arg { S2D_TELEMETRY_SIZE = 0x01, S2D_PHYS_ADDR_LOW, S2D_PHYS_ADDR_HIGH, + S2D_NUM_SAMPLES, }; struct amd_pmc_bit_map { @@ -246,13 +247,38 @@ static const struct file_operations amd_pmc_stb_debugfs_fops = { static int amd_pmc_stb_debugfs_open_v2(struct inode *inode, struct file *filp) { struct amd_pmc_dev *dev = filp->f_inode->i_private; - u32 *buf; + u32 *buf, fsize, num_samples, stb_rdptr_offset = 0; + int ret; buf = kzalloc(S2D_TELEMETRY_BYTES_MAX, GFP_KERNEL); if (!buf) return -ENOMEM; - memcpy_fromio(buf, dev->stb_virt_addr, S2D_TELEMETRY_BYTES_MAX); + /* Spill to DRAM num_samples uses separate SMU message port */ + dev->msg_port = 1; + + /* Get the num_samples to calculate the last push location */ + ret = amd_pmc_send_cmd(dev, S2D_NUM_SAMPLES, &num_samples, STB_SPILL_TO_DRAM, 1); + if (ret) { + dev_err(dev->dev, "error: S2D_NUM_SAMPLES not supported : %d\n", ret); + return ret; + } + + /* Clear msg_port for other SMU operation */ + dev->msg_port = 0; + + /* Start capturing data from the last push location */ + if (num_samples > S2D_TELEMETRY_BYTES_MAX) { + fsize = S2D_TELEMETRY_BYTES_MAX; + stb_rdptr_offset = num_samples - fsize; + } else { + fsize = num_samples; + stb_rdptr_offset = 0; + } + + dev->stb_virt_addr += stb_rdptr_offset; + memcpy_fromio(buf, dev->stb_virt_addr, fsize); + filp->private_data = buf; return 0; From patchwork Wed Jan 25 11:31:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shyam Sundar S K X-Patchwork-Id: 13115560 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 8B5B6C54E94 for ; Wed, 25 Jan 2023 11:32:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235282AbjAYLcJ (ORCPT ); Wed, 25 Jan 2023 06:32:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51062 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235368AbjAYLb6 (ORCPT ); Wed, 25 Jan 2023 06:31:58 -0500 Received: from NAM02-BN1-obe.outbound.protection.outlook.com (mail-bn1nam02on20626.outbound.protection.outlook.com [IPv6:2a01:111:f400:7eb2::626]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 298139EF8 for ; Wed, 25 Jan 2023 03:31:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=F0UItnsmDRx+Rq2+naGaby/sCjW/xVO3KK1thoMHQGrgEwSmJBrBkiUySaXnwR+Qzjh97AExRBigLfnvYwpDe0tN5PbsgVK2nwbdE/XMCHgULMND/SekRi/2pjG/QSYb4tO7EH/T2PSnqo0BrKjxEIQotx/REg9cHZck0U5vWkX7gYTukrjDsD6LvDJ5Wu2CoG8G1+q+BgjGyLVWSs8vgRp0cM+Na+KNRrX9+CAOZyfqkMoHY2LmgCE9CFn/J977DslEcFQYvnoJyS2M9Mwuc/l+F9PsYzLVomK9yn0drFnAKMHlyCjUZnKJ5WJBXUlGrNDHO/gfPaEnS9TMX2lhGQ== 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=MDD9seureiK9yvB9vEXlOU2T/eUDRh8cWQgKtGmpCzo=; b=O6Is2sJgmsME8sLaL6BAPEcBNfoSTnQ/whDslRfFPgOPXNpLW74GfRrAle4f9DEZq/hVcXwpwfJzYWUUsql/uCUAgVBu8fnh0Gil9qb1s10jxllY6U344mFonxoJjr0kkKBx8gPrIlHE8oDeI/I94Ci3q8FMuXfsZ60Yq2oQx+18b2sRw74CrKurAjIVBQ8DqNypJ93ON4fV9vU4MovgsOnRe/ih5dxd3vERMccCmG2kxwhhupAK7OfOK30QjaPDHb5wEDOeV9Eu8NfV8bROLRL2H1a1XdYF/9KlPUAA2JrHhFKask0iFqpUD5jzeQnX7/bZAjCU9MYEIZpKa7EZsQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=redhat.com 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=MDD9seureiK9yvB9vEXlOU2T/eUDRh8cWQgKtGmpCzo=; b=DhuHZ96iUdYtctNo3s1RYC5y5sbQhZDRxWnKuZgJo1ngZLzxAHD72dwzbQU5U0wxZHIFa/ZQJBVt6x3NVHlwb30o73PllwHONVM60hlzp3YWAjb05cWQj9wZLAdlquUZTkDFFp1HS/PyHfcLC5ucRnFLmEnE+y7Vfg55bl4srZs= Received: from DS7PR03CA0009.namprd03.prod.outlook.com (2603:10b6:5:3b8::14) by SN7PR12MB7417.namprd12.prod.outlook.com (2603:10b6:806:2a4::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.33; Wed, 25 Jan 2023 11:31:54 +0000 Received: from DS1PEPF0000E62F.namprd02.prod.outlook.com (2603:10b6:5:3b8:cafe::55) by DS7PR03CA0009.outlook.office365.com (2603:10b6:5:3b8::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.33 via Frontend Transport; Wed, 25 Jan 2023 11:31: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 DS1PEPF0000E62F.mail.protection.outlook.com (10.167.17.133) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6043.10 via Frontend Transport; Wed, 25 Jan 2023 11:31:54 +0000 Received: from jatayu.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; Wed, 25 Jan 2023 05:31:52 -0600 From: Shyam Sundar S K To: , CC: , , "Shyam Sundar S K" Subject: [PATCH 2/4] platform/x86/amd: pmc: Write dummy postcode into the STB DRAM Date: Wed, 25 Jan 2023 17:01:25 +0530 Message-ID: <20230125113127.3862898-3-Shyam-sundar.S-k@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230125113127.3862898-1-Shyam-sundar.S-k@amd.com> References: <20230125113127.3862898-1-Shyam-sundar.S-k@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: DS1PEPF0000E62F:EE_|SN7PR12MB7417:EE_ X-MS-Office365-Filtering-Correlation-Id: eb87aa88-1d47-4c53-e0c2-08dafec7c2bc X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0rcBEZ7k/q6aDypoMjcBmlHNOwDDKUjv2Quv2IL3+lIHuZ4fJOrsD8EiVJXA5zcHUP8nKC+obirhhLoQSFKzVg4GvS94r+JKpnziaMmv31a0r9ubP0pXYrAsSp639j08k2D/Dfoy/WipasWmKKpZ/X8UdNtQEy8O5VpJm9BbVZ8uZ5J5RQx3xwtuDbZNDGFb2LXE5/Q/XCyM7rNkRqfXINWmfuKleO1Q5iW43EGl8TmxNb44niVpTgFiOZLIxbYnvlqpfzE0nsAZrU8ceIgkSvkXGrC6O8jFRNmG/fIrC4kmrI3JyhscDA4ay7IutVPFv/uTz8kuuC/JJo6kuxEURiRfq8GQv9cDbCKTqSdWOaHZBgWllDYYPv6J3WzaUY2zRDRZZeJzkhXLPQIgMYCQIW8vJQGIOwwy+5i+yBfaXHm2SiqXeBzQ7DLLWhjiQOhor7mq9GIa+11NA/ieP5gmrQDWwt2ohGnHeWz6lqeu9bnzrY5sUw2kKpv/lmcz1+D9hKzayc5f8osBQft8ncCF0DiQgojTA8ypx4ikiiwoUF0eKKB1hoK7637pGCzFWzCGpx9J/32TFdme7oZeokVmNPqLSzgkvWkYnUz9jfZ+EDYBuM5HebpmHNan6gQYLQ3hLc5HTpbqQo6apesI6N92CKvi3C1rmyoFiKJErJry4IJRzssMj7blPDUd3AMNC+vX5GEL2kEfZB0R7d64y6AESVrsikDxExH4TwE4d6Ojyes= 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:(13230025)(4636009)(346002)(39860400002)(376002)(136003)(396003)(451199018)(36840700001)(40470700004)(46966006)(82740400003)(36756003)(47076005)(40480700001)(2616005)(2906002)(4326008)(70206006)(8936002)(5660300002)(83380400001)(70586007)(36860700001)(8676002)(426003)(1076003)(7696005)(82310400005)(110136005)(316002)(41300700001)(81166007)(356005)(86362001)(40460700003)(478600001)(26005)(16526019)(6666004)(186003)(336012)(54906003)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jan 2023 11:31:54.4514 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: eb87aa88-1d47-4c53-e0c2-08dafec7c2bc 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: DS1PEPF0000E62F.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB7417 Precedence: bulk List-ID: X-Mailing-List: platform-driver-x86@vger.kernel.org Based on the recommendation from the PMFW team in order to get the recent telemetry data present on the STB DRAM the driver is required to send one dummy write to the STB buffer, so it internally triggers the PMFW to emit the latest telemetry data in the STB DRAM region. Signed-off-by: Shyam Sundar S K Reviewed-by: Hans de Goede --- drivers/platform/x86/amd/pmc.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/platform/x86/amd/pmc.c b/drivers/platform/x86/amd/pmc.c index 01632e6b7820..0dd9fb576f09 100644 --- a/drivers/platform/x86/amd/pmc.c +++ b/drivers/platform/x86/amd/pmc.c @@ -43,6 +43,7 @@ #define AMD_PMC_STB_S2IDLE_PREPARE 0xC6000001 #define AMD_PMC_STB_S2IDLE_RESTORE 0xC6000002 #define AMD_PMC_STB_S2IDLE_CHECK 0xC6000003 +#define AMD_PMC_STB_DUMMY_PC 0xC6000007 /* STB S2D(Spill to DRAM) has different message port offset */ #define STB_SPILL_TO_DRAM 0xBE @@ -250,6 +251,11 @@ static int amd_pmc_stb_debugfs_open_v2(struct inode *inode, struct file *filp) u32 *buf, fsize, num_samples, stb_rdptr_offset = 0; int ret; + /* Write dummy postcode while reading the STB buffer */ + ret = amd_pmc_write_stb(dev, AMD_PMC_STB_DUMMY_PC); + if (ret) + dev_err(dev->dev, "error writing to STB: %d\n", ret); + buf = kzalloc(S2D_TELEMETRY_BYTES_MAX, GFP_KERNEL); if (!buf) return -ENOMEM; From patchwork Wed Jan 25 11:31:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shyam Sundar S K X-Patchwork-Id: 13115562 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 A889FC54EED for ; Wed, 25 Jan 2023 11:32:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235312AbjAYLcK (ORCPT ); Wed, 25 Jan 2023 06:32:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51068 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235372AbjAYLcA (ORCPT ); Wed, 25 Jan 2023 06:32:00 -0500 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2048.outbound.protection.outlook.com [40.107.220.48]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2A5609EF8 for ; Wed, 25 Jan 2023 03:32:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MaGTWlnmNY1nA7Ean4NuG7uLAxp4UzuGNhRlQhAPTd6wv7dk5gv2kESsyVf6aN3cJDdXNlxM0rs8LkqiHMdVkNoRLni6jyoOGCxdeDs5fsSVAIKHOt0e+1DPgsSirZhYhzs0wD99N8VtG9FuZHz2hBk/Lx95suWikmi3KkocPtck/cD91NU2jze+eFGsInbYL6IRuB4EnKLc1IzN8GU8Cz3KDUBetSjF/Ac5SOY3zBdWG8M2zYfkN7ggI60npGgoOrEbFj2apkR+hLec5oxv/s7iH1WsXRenIAcv1aDhosffy4uvjubfiqp+bGYG/jk92s9tqdJFXw+MI5RXOgRnuQ== 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=Y6d1G86WM8c9o/4zGg8+FNCn4PrdPhAIDDtTRPkC9YE=; b=VOpDdqa+NGA3Wy0Gur+y2+SlWY8nrCfgbOzY6T/4tHeF8z9o8sJ4+SwdxUBsz5KB5CAB9QGqXMQBVh+3C3axgNnpCqkjT4MtUKPHXXBx8Y/DXze0MnOZbsCK9dcW3kojwdbDox/K4YIHkbGf4uMvIpip60NfMRr6WGQVaX2AOXB30NCMzSxFFH2hoYEmFNp4x005q/y+mzPI4YqlkHIRsG11/58vr9du31iCHwoN4Cb/C6CGhGTzMyOgsbfddi5WcdLjn/o+TVrY8B6Bj93DHjEFKZsIngOxJF3ur6pWAz5LqgWPUI3copGSb9zmdhF+5e5tbhiGBq5S3mKgiIo52A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=redhat.com 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=Y6d1G86WM8c9o/4zGg8+FNCn4PrdPhAIDDtTRPkC9YE=; b=ACdQ/LWghLwxuloBJHkf6XlKqA9Dhb0XfFlvPUm2nokex4If/lsZeEBvevykkstFO2CkXie/Zs65JeaVHU1j3cdQv/s33m+f5c145ECIFEpwxb0vqrqorUAtKKWAHkdkio562kreRRdMPyspRY2ZM3qKx7e3fCooddyG9aG35+c= Received: from DS7PR03CA0132.namprd03.prod.outlook.com (2603:10b6:5:3b4::17) by CY5PR12MB6105.namprd12.prod.outlook.com (2603:10b6:930:2a::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6043.21; Wed, 25 Jan 2023 11:31:56 +0000 Received: from DS1PEPF0000E635.namprd02.prod.outlook.com (2603:10b6:5:3b4:cafe::59) by DS7PR03CA0132.outlook.office365.com (2603:10b6:5:3b4::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.33 via Frontend Transport; Wed, 25 Jan 2023 11:31:56 +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 DS1PEPF0000E635.mail.protection.outlook.com (10.167.17.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6043.10 via Frontend Transport; Wed, 25 Jan 2023 11:31:56 +0000 Received: from jatayu.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; Wed, 25 Jan 2023 05:31:54 -0600 From: Shyam Sundar S K To: , CC: , , "Shyam Sundar S K" Subject: [PATCH 3/4] platform/x86/amd: pmc: differentiate STB/SMU messaging prints Date: Wed, 25 Jan 2023 17:01:26 +0530 Message-ID: <20230125113127.3862898-4-Shyam-sundar.S-k@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230125113127.3862898-1-Shyam-sundar.S-k@amd.com> References: <20230125113127.3862898-1-Shyam-sundar.S-k@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: DS1PEPF0000E635:EE_|CY5PR12MB6105:EE_ X-MS-Office365-Filtering-Correlation-Id: 059fdc42-959d-4992-4ca4-08dafec7c3e6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Gr1BIZrtX7dzF8d4Q3tu6onI3VlcSEFcFc3WmfYWyPuAKISf3Qvjt1UM033C+fQ0VSecmZp1zISD9cr49LZTyIT7ItErR/GqwPRcJmCWWxWA5HzXsmqAc1mm+bpzMC5RTmXEnKfr1VHf+7+cDF5wlkdu1r+rL5MfyucKtXFvdB/QOEsmOFLXQiUTe/3uCaf5jYZsezplAp9CVw6+9XfRR5uqYiJJUsgCpEHojWgiseRU7NpzB4P6hWhU0Pj7ZnFUYE8SbmQ8BSk5His1rBnSOYKzreMne5B1ax0lUBjBQnMyFC60mGxmXq+CBpiEBYsrg1athwqwTuGnVJQjKZn/EZ7UkUmmg4ILkohA4YWZEAholuz6sxYEf69h5I/08p2RCt5zqjElF6GkJzxwGTzsHFQWvgSjHCbKwsQGmKwUz7jPZ2nWGVmaHcsaUsxJuNjpvlqq9jg5Z6xcAHincJ/yQwq6WAjZ5lgelw928JuONBvkSR5a8qY4Ydjfj2tDS+ZK8loMBPHlbRjx4+GIvVI7zcoqjT/PXs0cKEFqwk5mqIS9Mph/k87hQb08GugrnJPt87XHw2GUGHBFb9eNp6joyoxCAZRB7hINJZIPU2pDnI5Cb2WNQV3Opiyv6IEXfe5Aju2Kcg60cnGOpMo/ebWvLZDTHLkqh4SV/AH5MDZfsplnjEK60jgLLQdr4btG9iPj9sz6XALJiEc8ruqmW6eonarlUA5QRvlziuJ3aadlyrw= 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:(13230025)(4636009)(376002)(136003)(346002)(39860400002)(396003)(451199018)(40470700004)(36840700001)(46966006)(36756003)(2616005)(426003)(41300700001)(8936002)(47076005)(336012)(81166007)(356005)(82740400003)(2906002)(5660300002)(83380400001)(1076003)(86362001)(82310400005)(186003)(26005)(478600001)(6666004)(7696005)(70206006)(70586007)(8676002)(4326008)(316002)(16526019)(36860700001)(54906003)(110136005)(40480700001)(40460700003)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jan 2023 11:31:56.4162 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 059fdc42-959d-4992-4ca4-08dafec7c3e6 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: DS1PEPF0000E635.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR12MB6105 Precedence: bulk List-ID: X-Mailing-List: platform-driver-x86@vger.kernel.org Modify the dynamic debug print to differentiate between the regular and spill to DRAM usage of the SMU message port. Suggested-by: Sanket Goswami Signed-off-by: Shyam Sundar S K Reviewed-by: Hans de Goede --- drivers/platform/x86/amd/pmc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/platform/x86/amd/pmc.c b/drivers/platform/x86/amd/pmc.c index 0dd9fb576f09..467b80ad01a1 100644 --- a/drivers/platform/x86/amd/pmc.c +++ b/drivers/platform/x86/amd/pmc.c @@ -592,13 +592,13 @@ static void amd_pmc_dump_registers(struct amd_pmc_dev *dev) } value = amd_pmc_reg_read(dev, response); - dev_dbg(dev->dev, "AMD_PMC_REGISTER_RESPONSE:%x\n", value); + dev_dbg(dev->dev, "AMD_%s_REGISTER_RESPONSE:%x\n", dev->msg_port ? "S2D" : "PMC", value); value = amd_pmc_reg_read(dev, argument); - dev_dbg(dev->dev, "AMD_PMC_REGISTER_ARGUMENT:%x\n", value); + dev_dbg(dev->dev, "AMD_%s_REGISTER_ARGUMENT:%x\n", dev->msg_port ? "S2D" : "PMC", value); value = amd_pmc_reg_read(dev, message); - dev_dbg(dev->dev, "AMD_PMC_REGISTER_MESSAGE:%x\n", value); + dev_dbg(dev->dev, "AMD_%s_REGISTER_MESSAGE:%x\n", dev->msg_port ? "S2D" : "PMC", value); } static int amd_pmc_send_cmd(struct amd_pmc_dev *dev, u32 arg, u32 *data, u8 msg, bool ret) From patchwork Wed Jan 25 11:31:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shyam Sundar S K X-Patchwork-Id: 13115561 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 B7835C61DA0 for ; Wed, 25 Jan 2023 11:32:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235462AbjAYLcL (ORCPT ); Wed, 25 Jan 2023 06:32:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51074 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235400AbjAYLcB (ORCPT ); Wed, 25 Jan 2023 06:32:01 -0500 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2041.outbound.protection.outlook.com [40.107.236.41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B962422A33 for ; Wed, 25 Jan 2023 03:32:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DqVbQR79RVk1ysy4x2RIVPfZAwEnBLK/mgaPiQZx6yBr+rRdow7rCrPuWapxi1Z7OQE8iMEqRTHWQzc0zg4p3vlCiaOMDdxGMRrLUjazlKzF+rdUPnphKrUCmUtYnVe1GP73WS4r8rJ4pNMgYYND/vEXdlpX1yAYHmxIA9E3OivRToPmFI+7fg5OeZJna5LzYDGVzkpwNAVlL8h1JVRv4/gkCS4rxCfuiCZTkxxFj6QX+aNrm2h4m8oTg/mvCfmYdq081OROpSw+U0riURTuZ4oKHwn8NDLjiCwDaRDSkloIfgKuS22d0ofsLprz15zyBYq5czCRYbt6UiyotNQGXw== 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=U9dIJQRI9wLy07EbEGrpzo2rckW3L2riCQucurRWLqA=; b=Wca+9X0+VubGS7kSVqZCe2n7d1T+OBmXm4s198B3CGs6dYMiefXWnElY1b48DQ9KklrdrjS5es+hR2Xqoy+bXqA3SLN8K6p6nH9xGMKPohkbeN927R3wYv1nBOOyz0zdlZl3g58dstjBVrZpaKaFabWXa4CL1EOY4MXN+WOX1iguDaXNeADXIKdPLyOTkROcUPDbGqnTqSsUctjF9ODOps8uzFW0miyrITuyy+IFXwowvBAsnVeSJmVi/Ez3GFRv8vl3MddlWAw4Im1yPh46IY8qV4/kKV8PUpgVsERsyTl63RyP3vbyWTD744cfsMmcIVJV8MQhB295j4QAyHsuBw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=redhat.com 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=U9dIJQRI9wLy07EbEGrpzo2rckW3L2riCQucurRWLqA=; b=WU4XuGYb/6ndSg7kolY3AOgGbm40mYY8eWG1j/21eO1h+Lk6pbKuUN96WVOBSgHkMo2+2vlak9hDub92NLtc8voU8h/Y8Bek+bnrhH5dlt6GeiqJEZjrKTQV6bzxMCyFX6SdgiqGuX+dBnIb/HVKytdzJ0wVsFzHPUszJHoLtpk= Received: from DS7PR05CA0088.namprd05.prod.outlook.com (2603:10b6:8:56::14) by SJ1PR12MB6100.namprd12.prod.outlook.com (2603:10b6:a03:45d::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6043.21; Wed, 25 Jan 2023 11:31:58 +0000 Received: from DS1PEPF0000E632.namprd02.prod.outlook.com (2603:10b6:8:56:cafe::b3) by DS7PR05CA0088.outlook.office365.com (2603:10b6:8:56::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6043.21 via Frontend Transport; Wed, 25 Jan 2023 11:31:58 +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 DS1PEPF0000E632.mail.protection.outlook.com (10.167.17.136) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6043.10 via Frontend Transport; Wed, 25 Jan 2023 11:31:58 +0000 Received: from jatayu.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; Wed, 25 Jan 2023 05:31:56 -0600 From: Shyam Sundar S K To: , CC: , , "Shyam Sundar S K" Subject: [PATCH 4/4] platform/x86/amd: pmc: Add line break for readability Date: Wed, 25 Jan 2023 17:01:27 +0530 Message-ID: <20230125113127.3862898-5-Shyam-sundar.S-k@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230125113127.3862898-1-Shyam-sundar.S-k@amd.com> References: <20230125113127.3862898-1-Shyam-sundar.S-k@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: DS1PEPF0000E632:EE_|SJ1PR12MB6100:EE_ X-MS-Office365-Filtering-Correlation-Id: ee52af19-1db2-4ddf-82bb-08dafec7c50d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: B0m00cAsGX84hCUsskXsc2nI9hUe16CZu3xGLP8jqJqfVV2jcnRsynPxBOXoGVu2Dkp+9TqBIgOQYXrithf8l/n6TbkB9VgZ+H6r0Pn7w36eF+m2qa24jnl4fOqe8P8RV/OcyQ6qfXwrM3JnGF6YPeIIA6njrYul3ueKJm0AajvuMRgELV5cbr1fZMmJOBevSLu0jKFNiKB1wq1sFWqgCHROWQzLQUG842UVDIGr/KJJ6T49/bjezfm5bjbv3pbONCNo+wtHnQjPw2jYLU0eCd4OxiUDfPwhcuNWaAS3gVr5ON0T/K73dgzMaEiP8UgHC0hHQY0o4W3RGb4Oh0lsOdkda3R4K1OgQtqIQ+hkiINOTZB9tUDkPofD2J5NBEP/2n/rDq6W07KfE74HuQ2fpXxdJ/qaZzTrK227nxiKO17E/qbmr1W1WFbe+2M+wmMeXo+qNo5d7J/e6SCNT2SA6eWUk0dXFzXbGPo52KBZp76QnNJDFmM4d59iskBdy/pNM7lGSV4gqLZReODy0ERrM3VjKtyPMlypLGeVvusxXiuoflfQtN7qmD2llpNTaCCBflMBLMRyYiNeQkYQjnFaylSuPp8XfSg8/2a+azTMcrkZGVHVQCxFK+HXYu82igtQtGWsuMt1Ul2H+GrBAdZ4QixKTNu91E23oPD/OD0FQrCsSCEJN4d3rR21L2a0PI5y69ApQGsJHtZEdhrKgsm2QV8P0XPQp6OAGAzVMxzlXa0= 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:(13230025)(4636009)(376002)(136003)(346002)(39860400002)(396003)(451199018)(40470700004)(36840700001)(46966006)(36756003)(2616005)(426003)(41300700001)(8936002)(47076005)(336012)(81166007)(356005)(82740400003)(2906002)(4744005)(5660300002)(1076003)(86362001)(82310400005)(186003)(26005)(478600001)(6666004)(7696005)(70206006)(70586007)(8676002)(4326008)(316002)(16526019)(36860700001)(54906003)(110136005)(40480700001)(40460700003)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jan 2023 11:31:58.3509 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ee52af19-1db2-4ddf-82bb-08dafec7c50d 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: DS1PEPF0000E632.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ1PR12MB6100 Precedence: bulk List-ID: X-Mailing-List: platform-driver-x86@vger.kernel.org Add a line break for the code readability. Signed-off-by: Shyam Sundar S K Reviewed-by: Hans de Goede --- drivers/platform/x86/amd/pmc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/platform/x86/amd/pmc.c b/drivers/platform/x86/amd/pmc.c index 467b80ad01a1..8afe77e443cb 100644 --- a/drivers/platform/x86/amd/pmc.c +++ b/drivers/platform/x86/amd/pmc.c @@ -105,6 +105,7 @@ #define DELAY_MIN_US 2000 #define DELAY_MAX_US 3000 #define FIFO_SIZE 4096 + enum amd_pmc_def { MSG_TEST = 0x01, MSG_OS_HINT_PCO,