From patchwork Tue Jun 25 06:43:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: You-Sheng Yang X-Patchwork-Id: 1951936 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W7b002Ptcz23tx for ; Tue, 25 Jun 2024 16:43:59 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1sLzu8-0007zA-VP; Tue, 25 Jun 2024 06:43:48 +0000 Received: from mail-pl1-f180.google.com ([209.85.214.180]) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1sLzu7-0007yP-Ss for kernel-team@lists.ubuntu.com; Tue, 25 Jun 2024 06:43:48 +0000 Received: by mail-pl1-f180.google.com with SMTP id d9443c01a7336-1fa75f53f42so1069405ad.0 for ; Mon, 24 Jun 2024 23:43:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719297825; x=1719902625; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dElhqt0M2cyEl0NDRDiDhuSS8iNRNd+bVjs7L+Iydzg=; b=P/5WsO4K7boegOLWcaiTVbrIayWs9cXpLFqsIKtLgxQd9qQZXAZBRana2yP0xngFjN gWwCQTqNlG7aTP/AoW+xICSQv5WCPUFWXnLdIcX82sbhZin7ShJZjZWM7d8babEwPU9H ohBte3x8P8vOxNjlXF4G2BHIxGfQQRuWgoSKR6ynqJnfkRHHKgNyQa/lZLV4RrYiKIX5 uULIZF1/Pz5hEJuBBgf3klb7JNmwxeeqIZ+TQamvhb8t7tyhhfAgkIPz1ndk+76dIl38 8aHFqXOTnzwNykrgGY+4DIvQgOoEwyHm5R6GmsyiaJTB4tGB2B8F5EVgJgiwft5cC/2i yLkA== X-Gm-Message-State: AOJu0Yy0mvNpOxAykBrPEVeexhXHbI14TqMcQDyRCHbnaVuQRF+Ycdlj ulXWNchMecN+2+cQtuVpsnBui4zFaPp5wZ/rDW9p9fcgsu/NHZ2YyUeU+Cud X-Google-Smtp-Source: AGHT+IFRrO4soWM2fI7A2zqrGUm7txFkn6tGnnJfKDg0euFiIMFeNo/mIMReShGklx4uQCAYP2IEEw== X-Received: by 2002:a17:902:e542:b0:1f6:1780:f7b1 with SMTP id d9443c01a7336-1fa23f1b5a9mr70646795ad.17.1719297825131; Mon, 24 Jun 2024 23:43:45 -0700 (PDT) Received: from localhost.localdomain (125-229-129-140.hinet-ip.hinet.net. [125.229.129.140]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1fa1d3773d1sm46767525ad.270.2024.06.24.23.43.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jun 2024 23:43:44 -0700 (PDT) From: You-Sheng Yang To: kernel-team@lists.ubuntu.com Subject: [PATCH 2/7][SRU][Noble] platform/x86/amd/pmf: Disable debugfs support for querying power thermals Date: Tue, 25 Jun 2024 14:43:16 +0800 Message-ID: <20240625064321.3302827-3-vicamo.yang@canonical.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240625064321.3302827-1-vicamo.yang@canonical.com> References: <20240625064321.3302827-1-vicamo.yang@canonical.com> MIME-Version: 1.0 Received-SPF: pass client-ip=209.85.214.180; envelope-from=vicamo@gmail.com; helo=mail-pl1-f180.google.com X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Shyam Sundar S K BugLink: https://bugs.launchpad.net/bugs/2058330 The GET interface to receive the active power thermal information from the PMFW has been deprecated. Hence drop the debugfs support from version2 onwards. Reviewed-by: Kuppuswamy Sathyanarayanan Co-developed-by: Patil Rajesh Reddy Signed-off-by: Patil Rajesh Reddy Signed-off-by: Shyam Sundar S K Link: https://lore.kernel.org/r/20240306114415.3267603-3-Shyam-sundar.S-k@amd.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen (cherry picked from commit 233f78e11e1fa0387d1600875bef02a2d714f2e2) Signed-off-by: You-Sheng Yang --- drivers/platform/x86/amd/pmf/core.c | 5 +++-- drivers/platform/x86/amd/pmf/pmf.h | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/platform/x86/amd/pmf/core.c b/drivers/platform/x86/amd/pmf/core.c index 4f734e049f4a..2230bc2b1f59 100644 --- a/drivers/platform/x86/amd/pmf/core.c +++ b/drivers/platform/x86/amd/pmf/core.c @@ -113,8 +113,9 @@ static void amd_pmf_dbgfs_unregister(struct amd_pmf_dev *dev) static void amd_pmf_dbgfs_register(struct amd_pmf_dev *dev) { dev->dbgfs_dir = debugfs_create_dir("amd_pmf", NULL); - debugfs_create_file("current_power_limits", 0644, dev->dbgfs_dir, dev, - ¤t_power_limits_fops); + if (dev->pmf_if_version == PMF_IF_V1) + debugfs_create_file("current_power_limits", 0644, dev->dbgfs_dir, dev, + ¤t_power_limits_fops); } int amd_pmf_get_power_source(void) diff --git a/drivers/platform/x86/amd/pmf/pmf.h b/drivers/platform/x86/amd/pmf/pmf.h index e51ac981af73..4364af72a7a3 100644 --- a/drivers/platform/x86/amd/pmf/pmf.h +++ b/drivers/platform/x86/amd/pmf/pmf.h @@ -83,6 +83,8 @@ #define TA_OUTPUT_RESERVED_MEM 906 #define MAX_OPERATION_PARAMS 4 +#define PMF_IF_V1 1 + /* AMD PMF BIOS interfaces */ struct apmf_verify_interface { u16 size;