Message ID | 20221026072531.346013-1-liyupeng@zbhlos.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp110297wru; Wed, 26 Oct 2022 00:37:05 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5mvx8qgUx/sYbcMPNhQWm4oAwwUOyLM+GWdBQiWNCUmyG7e3ePaAh29o+TUFW+pyX7NS4P X-Received: by 2002:aa7:cc8e:0:b0:457:23db:f0cc with SMTP id p14-20020aa7cc8e000000b0045723dbf0ccmr40041816edt.122.1666769824810; Wed, 26 Oct 2022 00:37:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666769824; cv=none; d=google.com; s=arc-20160816; b=HAkhWJt0DsZtp4U1eXrWPDTSlrQgiME2cGQloJGBfuO5MTFJ6GTX+tl9euV5MHxvnE 5eJDBTXVOvSYHJLGNQkkdwT82CUyt1KovrC1YNfeXbi8chPkfNQBiw4z08CxhgC0u5op rgPFTGRJqMq3tFuMpU7vAz9HT4H89IJ1J2LD3WcefkjL0Zf/JwadRZJRElrPLFsAzfuS 9PCtQByJT97r6OgMDztJPco2HeJiNDWdHcMBQlCE5Uqy04Ghix0o7QQ5g8/UljuOU9Je ZREI/bIpfMf7TWBKskoiUHVHD4qBhF3x2qGRFf8MhnlrQJycq9CH81wSqR5UMYbT/F7w B2wQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=m8iNq5Y+2cO4PYyoyLlVn6vt5S2WLyL0VQzmjyAEUAo=; b=Wn5F+VgRW2Wh/ysg5sNojRv61pw8yXYOMjvD2E0HCJdMavrFNxlwvCHMeuz12NUwci klsS4yPC2IkpbAuK0tjg96/+BFq3Bn1+gmuoBvKPa0I3FVLl/q/N+v4ArkroTjFYfSfl PjpUQ5srJQbRltQ2UAYR9B0ZJVJJ2ogr0u8D15m6Eh00QgwKb2R4DuuO0AFLgK1M+7GS FgrXE7Vdq+CtJ865TVmcn+xbj0uTVjMTRmhVLXbmKd12mFStWG5QJFcac5RFb66QCjWR +SWVDTXx9FMFX7Qcsoxk8omXozbTQJuXRQIrjFUNsevYA8stLjgQpMkGgsmVtol+zC5E Wzvw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=zbhlos.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gx11-20020a1709068a4b00b007815ca78c38si4432583ejc.235.2022.10.26.00.36.39; Wed, 26 Oct 2022 00:37:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=zbhlos.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233096AbiJZHcf (ORCPT <rfc822;pwkd43@gmail.com> + 99 others); Wed, 26 Oct 2022 03:32:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43376 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233139AbiJZHcc (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 26 Oct 2022 03:32:32 -0400 X-Greylist: delayed 376 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Wed, 26 Oct 2022 00:32:29 PDT Received: from mail-m11874.qiye.163.com (mail-m11874.qiye.163.com [115.236.118.74]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 86197A50F5; Wed, 26 Oct 2022 00:32:29 -0700 (PDT) Received: from caicai-HWPC.. (unknown [IPV6:240e:36a:141c:3700:9049:ecf7:8648:6a1c]) by mail-m11874.qiye.163.com (Hmail) with ESMTPA id 94E973C052D; Wed, 26 Oct 2022 15:26:09 +0800 (CST) From: Yupeng Li <liyupeng@zbhlos.com> To: Shyam-sundar.S-k@amd.com, hdegoede@redhat.com, markgross@kernel.org Cc: platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, caizp2008@163.com, Yupeng Li <liyupeng@zbhlos.com> Subject: [PATCH 1/1] platform/x86/amd: Fix pmc compile dependency errors. Date: Wed, 26 Oct 2022 15:25:31 +0800 Message-Id: <20221026072531.346013-1-liyupeng@zbhlos.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-HM-Spam-Status: e1kfGhgUHx5ZQUpXWQgPGg8OCBgUHx5ZQUlOS1dZFg8aDwILHllBWSg2Ly tZV1koWUFITzdXWS1ZQUlXWQ8JGhUIEh9ZQVlDSR5JVhhNQ0NCTR1MS0gYHVUTARMWGhIXJBQOD1 lXWRgSC1lBWUlPSx5BSE0aQUpPShhBSExLS0FCS09CQR4YHUxBQ01PQ0FNGkoYWVdZFhoPEhUdFF lBWU9LSFVKSktISkxVSktLVUtZBg++ X-HM-Sender-Digest: e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6OTo6Cyo*KT0aLR0fS0w0LEw0 GixPFElVSlVKTU1NTE1CSkxLSk9KVTMWGhIXVRcSAg4LHhUcOwEZExcUCFUYFBZFWVdZEgtZQVlJ T0seQUhNGkFKT0oYQUhMS0tBQktPQkEeGB1MQUNNT0NBTRpKGFlXWQgBWUFISkhONwY+ X-HM-Tid: 0a84132f2d632eb0kusn94e973c052d X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747734836041746120?= X-GMAIL-MSGID: =?utf-8?q?1747734836041746120?= |
Series |
[1/1] platform/x86/amd: Fix pmc compile dependency errors.
|
|
Commit Message
Yupeng Li
Oct. 26, 2022, 7:25 a.m. UTC
When disabled CONFIG_SUSPEND and CONFIG_DEBUG_FS, get_metrics_table and amd_pmc_idlemask_read is defined under two conditions of this, pmc build with implicit declaration of function error.Some build error messages are as follows: CC [M] drivers/platform/x86/amd/pmc.o drivers/platform/x86/amd/pmc.c: In function ‘smu_fw_info_show’: drivers/platform/x86/amd/pmc.c:436:6: error: implicit declaration of function ‘get_metrics_table’ [-Werror=implicit-function-declaration] 436 | if (get_metrics_table(dev, &table)) | ^~~~~~~~~~~~~~~~~ drivers/platform/x86/amd/pmc.c: In function ‘amd_pmc_idlemask_show’: drivers/platform/x86/amd/pmc.c:508:8: error: implicit declaration of function ‘amd_pmc_idlemask_read’; did you mean ‘amd_pmc_idlemask_show’? [-Werror=implicit-function-declaration] 508 | rc = amd_pmc_idlemask_read(dev, NULL, s); | ^~~~~~~~~~~~~~~~~~~~~ | amd_pmc_idlemask_show cc1: some warnings being treated as errors Signed-off-by: Yupeng Li <liyupeng@zbhlos.com> Reviewed-by: Caicai <caizp2008@163.com> --- drivers/platform/x86/amd/pmc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
Comments
Hi, On 10/26/22 09:25, Yupeng Li wrote: > When disabled CONFIG_SUSPEND and CONFIG_DEBUG_FS, get_metrics_table > and amd_pmc_idlemask_read is defined under two conditions of this, > pmc build with implicit declaration of function error.Some build error > messages are as follows: > > CC [M] drivers/platform/x86/amd/pmc.o > drivers/platform/x86/amd/pmc.c: In function ‘smu_fw_info_show’: > drivers/platform/x86/amd/pmc.c:436:6: error: implicit declaration of function ‘get_metrics_table’ [-Werror=implicit-function-declaration] > 436 | if (get_metrics_table(dev, &table)) > | ^~~~~~~~~~~~~~~~~ > drivers/platform/x86/amd/pmc.c: In function ‘amd_pmc_idlemask_show’: > drivers/platform/x86/amd/pmc.c:508:8: error: implicit declaration of function ‘amd_pmc_idlemask_read’; did you mean ‘amd_pmc_idlemask_show’? [-Werror=implicit-function-declaration] > 508 | rc = amd_pmc_idlemask_read(dev, NULL, s); > | ^~~~~~~~~~~~~~~~~~~~~ > | amd_pmc_idlemask_show > cc1: some warnings being treated as errors > > Signed-off-by: Yupeng Li <liyupeng@zbhlos.com> > Reviewed-by: Caicai <caizp2008@163.com> Thank you for your patch, however I do not believe that this is the correct fix: > --- > drivers/platform/x86/amd/pmc.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/drivers/platform/x86/amd/pmc.c b/drivers/platform/x86/amd/pmc.c > index ce859b300712..2b08039921b8 100644 > --- a/drivers/platform/x86/amd/pmc.c > +++ b/drivers/platform/x86/amd/pmc.c > @@ -433,8 +433,10 @@ static int smu_fw_info_show(struct seq_file *s, void *unused) > struct smu_metrics table; > int idx; > > +#if defined(CONFIG_SUSPEND) || defined(CONFIG_DEBUG_FS) > if (get_metrics_table(dev, &table)) > return -EINVAL; > +#endif > > seq_puts(s, "\n=== SMU Statistics ===\n"); > seq_printf(s, "Table Version: %d\n", table.table_version); The table variable gets used here, but now it no longer has been initialized by get_metrics_table() so just #ifdef-ing out the get_metrics_table() call is wrong. > @@ -503,11 +505,12 @@ static int amd_pmc_idlemask_show(struct seq_file *s, void *unused) > if (rc) > return rc; > } > - > if (dev->major > 56 || (dev->major >= 55 && dev->minor >= 37)) { > +#if defined(CONFIG_SUSPEND) || defined(CONFIG_DEBUG_FS) > rc = amd_pmc_idlemask_read(dev, NULL, s); > if (rc) > return rc; > +#endif > } else { > seq_puts(s, "Unsupported SMU version for Idlemask\n"); > } Same thing except now nothing gets send to the struct seq_file *s, so this is wrong too. Shyam / Mario, can you take a look at the reported compile errors please? Regards, Hans
On 11/7/22 04:28, Hans de Goede wrote: > Hi, > > On 10/26/22 09:25, Yupeng Li wrote: >> When disabled CONFIG_SUSPEND and CONFIG_DEBUG_FS, get_metrics_table >> and amd_pmc_idlemask_read is defined under two conditions of this, >> pmc build with implicit declaration of function error.Some build error >> messages are as follows: >> >> CC [M] drivers/platform/x86/amd/pmc.o >> drivers/platform/x86/amd/pmc.c: In function ‘smu_fw_info_show’: >> drivers/platform/x86/amd/pmc.c:436:6: error: implicit declaration of function ‘get_metrics_table’ [-Werror=implicit-function-declaration] >> 436 | if (get_metrics_table(dev, &table)) >> | ^~~~~~~~~~~~~~~~~ >> drivers/platform/x86/amd/pmc.c: In function ‘amd_pmc_idlemask_show’: >> drivers/platform/x86/amd/pmc.c:508:8: error: implicit declaration of function ‘amd_pmc_idlemask_read’; did you mean ‘amd_pmc_idlemask_show’? [-Werror=implicit-function-declaration] >> 508 | rc = amd_pmc_idlemask_read(dev, NULL, s); >> | ^~~~~~~~~~~~~~~~~~~~~ >> | amd_pmc_idlemask_show >> cc1: some warnings being treated as errors >> >> Signed-off-by: Yupeng Li <liyupeng@zbhlos.com> >> Reviewed-by: Caicai <caizp2008@163.com> > > Thank you for your patch, however I do not believe that this is the correct fix: > >> --- >> drivers/platform/x86/amd/pmc.c | 5 ++++- >> 1 file changed, 4 insertions(+), 1 deletion(-) >> >> diff --git a/drivers/platform/x86/amd/pmc.c b/drivers/platform/x86/amd/pmc.c >> index ce859b300712..2b08039921b8 100644 >> --- a/drivers/platform/x86/amd/pmc.c >> +++ b/drivers/platform/x86/amd/pmc.c >> @@ -433,8 +433,10 @@ static int smu_fw_info_show(struct seq_file *s, void *unused) >> struct smu_metrics table; >> int idx; >> >> +#if defined(CONFIG_SUSPEND) || defined(CONFIG_DEBUG_FS) >> if (get_metrics_table(dev, &table)) >> return -EINVAL; >> +#endif >> >> seq_puts(s, "\n=== SMU Statistics ===\n"); >> seq_printf(s, "Table Version: %d\n", table.table_version); > > The table variable gets used here, but now it no longer has been initialized by > get_metrics_table() so just #ifdef-ing out the get_metrics_table() call is wrong. > >> @@ -503,11 +505,12 @@ static int amd_pmc_idlemask_show(struct seq_file *s, void *unused) >> if (rc) >> return rc; >> } >> - >> if (dev->major > 56 || (dev->major >= 55 && dev->minor >= 37)) { >> +#if defined(CONFIG_SUSPEND) || defined(CONFIG_DEBUG_FS) >> rc = amd_pmc_idlemask_read(dev, NULL, s); >> if (rc) >> return rc; >> +#endif >> } else { >> seq_puts(s, "Unsupported SMU version for Idlemask\n"); >> } > > Same thing except now nothing gets send to the struct seq_file *s, > so this is wrong too. > > Shyam / Mario, can you take a look at the reported compile errors please? > > Regards, > > Hans > What kernel is this? Shyam removed CONFIG_DEBUGFS in b37fe34c83. So is this failure still happening in 6.1-rc4?
On Mon, Nov 07, 2022 at 06:27:52AM -0600, Mario Limonciello wrote: > On 11/7/22 04:28, Hans de Goede wrote: > > Hi, > > > > On 10/26/22 09:25, Yupeng Li wrote: > > > When disabled CONFIG_SUSPEND and CONFIG_DEBUG_FS, get_metrics_table > > > and amd_pmc_idlemask_read is defined under two conditions of this, > > > pmc build with implicit declaration of function error.Some build error > > > messages are as follows: > > > > > > CC [M] drivers/platform/x86/amd/pmc.o > > > drivers/platform/x86/amd/pmc.c: In function ‘smu_fw_info_show’: > > > drivers/platform/x86/amd/pmc.c:436:6: error: implicit declaration of function ‘get_metrics_table’ [-Werror=implicit-function-declaration] > > > 436 | if (get_metrics_table(dev, &table)) > > > | ^~~~~~~~~~~~~~~~~ > > > drivers/platform/x86/amd/pmc.c: In function ‘amd_pmc_idlemask_show’: > > > drivers/platform/x86/amd/pmc.c:508:8: error: implicit declaration of function ‘amd_pmc_idlemask_read’; did you mean ‘amd_pmc_idlemask_show’? [-Werror=implicit-function-declaration] > > > 508 | rc = amd_pmc_idlemask_read(dev, NULL, s); > > > | ^~~~~~~~~~~~~~~~~~~~~ > > > | amd_pmc_idlemask_show > > > cc1: some warnings being treated as errors > > > > > > Signed-off-by: Yupeng Li <liyupeng@zbhlos.com> > > > Reviewed-by: Caicai <caizp2008@163.com> > > > > Thank you for your patch, however I do not believe that this is the correct fix: > > > > > --- > > > drivers/platform/x86/amd/pmc.c | 5 ++++- > > > 1 file changed, 4 insertions(+), 1 deletion(-) > > > > > > diff --git a/drivers/platform/x86/amd/pmc.c b/drivers/platform/x86/amd/pmc.c > > > index ce859b300712..2b08039921b8 100644 > > > --- a/drivers/platform/x86/amd/pmc.c > > > +++ b/drivers/platform/x86/amd/pmc.c > > > @@ -433,8 +433,10 @@ static int smu_fw_info_show(struct seq_file *s, void *unused) > > > struct smu_metrics table; > > > int idx; > > > +#if defined(CONFIG_SUSPEND) || defined(CONFIG_DEBUG_FS) > > > if (get_metrics_table(dev, &table)) > > > return -EINVAL; > > > +#endif > > > seq_puts(s, "\n=== SMU Statistics ===\n"); > > > seq_printf(s, "Table Version: %d\n", table.table_version); > > > > The table variable gets used here, but now it no longer has been initialized by > > get_metrics_table() so just #ifdef-ing out the get_metrics_table() call is wrong. > > > > > @@ -503,11 +505,12 @@ static int amd_pmc_idlemask_show(struct seq_file *s, void *unused) > > > if (rc) > > > return rc; > > > } > > > - > > > if (dev->major > 56 || (dev->major >= 55 && dev->minor >= 37)) { > > > +#if defined(CONFIG_SUSPEND) || defined(CONFIG_DEBUG_FS) > > > rc = amd_pmc_idlemask_read(dev, NULL, s); > > > if (rc) > > > return rc; > > > +#endif > > > } else { > > > seq_puts(s, "Unsupported SMU version for Idlemask\n"); > > > } > > > > Same thing except now nothing gets send to the struct seq_file *s, > > so this is wrong too. > > > > Shyam / Mario, can you take a look at the reported compile errors please? > > > > Regards, > > > > Hans > > > > What kernel is this? Shyam removed CONFIG_DEBUGFS in b37fe34c83. So is > this failure still happening in 6.1-rc4? It managed to trickle into stable too: https://bugzilla.kernel.org/show_bug.cgi?id=216679 Adding bug reporter to Cc too. From a quick glance, I'd drop all that ifdeffery and add empty stubs. IMNSVHO. Thx.
[Public] > -----Original Message----- > From: Borislav Petkov <bp@alien8.de> > Sent: Friday, November 11, 2022 09:15 > To: Limonciello, Mario <Mario.Limonciello@amd.com> > Cc: Hans de Goede <hdegoede@redhat.com>; Yupeng Li > <liyupeng@zbhlos.com>; S-k, Shyam-sundar <Shyam-sundar.S- > k@amd.com>; markgross@kernel.org; platform-driver-x86@vger.kernel.org; > linux-kernel@vger.kernel.org; caizp2008@163.com; smf- > linux@virginmedia.com > Subject: Re: [PATCH 1/1] platform/x86/amd: Fix pmc compile dependency > errors. > > On Mon, Nov 07, 2022 at 06:27:52AM -0600, Mario Limonciello wrote: > > On 11/7/22 04:28, Hans de Goede wrote: > > > Hi, > > > > > > On 10/26/22 09:25, Yupeng Li wrote: > > > > When disabled CONFIG_SUSPEND and CONFIG_DEBUG_FS, > get_metrics_table > > > > and amd_pmc_idlemask_read is defined under two conditions of this, > > > > pmc build with implicit declaration of function error.Some build error > > > > messages are as follows: > > > > > > > > CC [M] drivers/platform/x86/amd/pmc.o > > > > drivers/platform/x86/amd/pmc.c: In function 'smu_fw_info_show': > > > > drivers/platform/x86/amd/pmc.c:436:6: error: implicit declaration of > function 'get_metrics_table' [-Werror=implicit-function-declaration] > > > > 436 | if (get_metrics_table(dev, &table)) > > > > | ^~~~~~~~~~~~~~~~~ > > > > drivers/platform/x86/amd/pmc.c: In function > 'amd_pmc_idlemask_show': > > > > drivers/platform/x86/amd/pmc.c:508:8: error: implicit declaration of > function 'amd_pmc_idlemask_read'; did you mean > 'amd_pmc_idlemask_show'? [-Werror=implicit-function-declaration] > > > > 508 | rc = amd_pmc_idlemask_read(dev, NULL, s); > > > > | ^~~~~~~~~~~~~~~~~~~~~ > > > > | amd_pmc_idlemask_show > > > > cc1: some warnings being treated as errors > > > > > > > > Signed-off-by: Yupeng Li <liyupeng@zbhlos.com> > > > > Reviewed-by: Caicai <caizp2008@163.com> > > > > > > Thank you for your patch, however I do not believe that this is the correct > fix: > > > > > > > --- > > > > drivers/platform/x86/amd/pmc.c | 5 ++++- > > > > 1 file changed, 4 insertions(+), 1 deletion(-) > > > > > > > > diff --git a/drivers/platform/x86/amd/pmc.c > b/drivers/platform/x86/amd/pmc.c > > > > index ce859b300712..2b08039921b8 100644 > > > > --- a/drivers/platform/x86/amd/pmc.c > > > > +++ b/drivers/platform/x86/amd/pmc.c > > > > @@ -433,8 +433,10 @@ static int smu_fw_info_show(struct seq_file > *s, void *unused) > > > > struct smu_metrics table; > > > > int idx; > > > > +#if defined(CONFIG_SUSPEND) || defined(CONFIG_DEBUG_FS) > > > > if (get_metrics_table(dev, &table)) > > > > return -EINVAL; > > > > +#endif > > > > seq_puts(s, "\n=== SMU Statistics ===\n"); > > > > seq_printf(s, "Table Version: %d\n", table.table_version); > > > > > > The table variable gets used here, but now it no longer has been > initialized by > > > get_metrics_table() so just #ifdef-ing out the get_metrics_table() call is > wrong. > > > > > > > @@ -503,11 +505,12 @@ static int amd_pmc_idlemask_show(struct > seq_file *s, void *unused) > > > > if (rc) > > > > return rc; > > > > } > > > > - > > > > if (dev->major > 56 || (dev->major >= 55 && dev->minor >= 37)) { > > > > +#if defined(CONFIG_SUSPEND) || defined(CONFIG_DEBUG_FS) > > > > rc = amd_pmc_idlemask_read(dev, NULL, s); > > > > if (rc) > > > > return rc; > > > > +#endif > > > > } else { > > > > seq_puts(s, "Unsupported SMU version for Idlemask\n"); > > > > } > > > > > > Same thing except now nothing gets send to the struct seq_file *s, > > > so this is wrong too. > > > > > > Shyam / Mario, can you take a look at the reported compile errors > please? > > > > > > Regards, > > > > > > Hans > > > > > > > What kernel is this? Shyam removed CONFIG_DEBUGFS in b37fe34c83. So > is > > this failure still happening in 6.1-rc4? > > It managed to trickle into stable too: > > https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugz > illa.kernel.org%2Fshow_bug.cgi%3Fid%3D216679&data=05%7C01%7Cm > ario.limonciello%40amd.com%7C29820718c1334539d74e08dac3f782f2%7C3dd > 8961fe4884e608e11a82d994e183d%7C0%7C0%7C638037765076195581%7CUn > known%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6 > Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=NcjgeDsIS%2 > BcW84%2FMcl9hKFNfL5Cw%2F2rYU8yXXsh2H5E%3D&reserved=0 > > Adding bug reporter to Cc too. > > From a quick glance, I'd drop all that ifdeffery and add empty stubs. > IMNSVHO. > I sent up a patch for it, but Hans hasn't applied it. https://patchwork.kernel.org/project/platform-driver-x86/patch/20221108023323.19304-1-mario.limonciello@amd.com/
On Fri, Nov 11, 2022 at 03:16:10PM +0000, Limonciello, Mario wrote: > I sent up a patch for it, but Hans hasn't applied it. > https://patchwork.kernel.org/project/platform-driver-x86/patch/20221108023323.19304-1-mario.limonciello@amd.com/ Yap, that fixes it. So yeah, Hans, make sure to Cc: stable too when applying. Thx.
Hi, On 11/11/22 16:39, Borislav Petkov wrote: > On Fri, Nov 11, 2022 at 03:16:10PM +0000, Limonciello, Mario wrote: >> I sent up a patch for it, but Hans hasn't applied it. >> https://patchwork.kernel.org/project/platform-driver-x86/patch/20221108023323.19304-1-mario.limonciello@amd.com/ > > Yap, that fixes it. > > So yeah, Hans, make sure to Cc: stable too when applying. Done. I'll send this out in my next fixes pull-req to Linus before the end of this week. Regards, Hans
diff --git a/drivers/platform/x86/amd/pmc.c b/drivers/platform/x86/amd/pmc.c index ce859b300712..2b08039921b8 100644 --- a/drivers/platform/x86/amd/pmc.c +++ b/drivers/platform/x86/amd/pmc.c @@ -433,8 +433,10 @@ static int smu_fw_info_show(struct seq_file *s, void *unused) struct smu_metrics table; int idx; +#if defined(CONFIG_SUSPEND) || defined(CONFIG_DEBUG_FS) if (get_metrics_table(dev, &table)) return -EINVAL; +#endif seq_puts(s, "\n=== SMU Statistics ===\n"); seq_printf(s, "Table Version: %d\n", table.table_version); @@ -503,11 +505,12 @@ static int amd_pmc_idlemask_show(struct seq_file *s, void *unused) if (rc) return rc; } - if (dev->major > 56 || (dev->major >= 55 && dev->minor >= 37)) { +#if defined(CONFIG_SUSPEND) || defined(CONFIG_DEBUG_FS) rc = amd_pmc_idlemask_read(dev, NULL, s); if (rc) return rc; +#endif } else { seq_puts(s, "Unsupported SMU version for Idlemask\n"); }