From 233f78e11e1fa0387d1600875bef02a2d714f2e2 Mon Sep 17 00:00:00 2001 From: Shyam Sundar S K Date: Wed, 6 Mar 2024 17:14:10 +0530 Subject: platform/x86/amd/pmf: Disable debugfs support for querying power thermals MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- drivers/platform/x86/amd/pmf/core.c | 5 +++-- drivers/platform/x86/amd/pmf/pmf.h | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'drivers/platform/x86') diff --git a/drivers/platform/x86/amd/pmf/core.c b/drivers/platform/x86/amd/pmf/core.c index feaa09f5b35a..a6bdde4f1c68 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 2f23ced7da66..51e31d008ef9 100644 --- a/drivers/platform/x86/amd/pmf/pmf.h +++ b/drivers/platform/x86/amd/pmf/pmf.h @@ -87,6 +87,8 @@ struct cookie_header { #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; -- cgit v1.2.3