Bug 216679 - Build fails: get_metrics_table and amd_pmc_idlemask_read implicit declaration in drivers/platform/x86/amd/pmc.c
Summary: Build fails: get_metrics_table and amd_pmc_idlemask_read implicit declaration...
Status: RESOLVED CODE_FIX
Alias: None
Product: Platform Specific/Hardware
Classification: Unclassified
Component: x86-64 (show other bugs)
Hardware: AMD Linux
: P1 normal
Assignee: platform_x86_64@kernel-bugs.osdl.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-11-11 11:55 UTC by Stuart Foster
Modified: 2022-11-14 09:41 UTC (History)
1 user (show)

See Also:
Kernel Version: 6.0.8
Subsystem:
Regression: No
Bisected commit-id:


Attachments
config file (156.73 KB, text/plain)
2022-11-11 12:23 UTC, Stuart Foster
Details

Description Stuart Foster 2022-11-11 11:55:53 UTC
The following errors are being reported when building kernel 6.0.8.

drivers/platform/x86/amd/pmc.c: In function 'smu_fw_info_show':
drivers/platform/x86/amd/pmc.c:376:13: error: implicit declaration of function 'get_metrics_table' [-Werror=implicit-function-declaration]
  376 |         if (get_metrics_table(dev, &table))
      |             ^~~~~~~~~~~~~~~~~

drivers/platform/x86/amd/pmc.c: In function 'amd_pmc_idlemask_show':
drivers/platform/x86/amd/pmc.c:468:22: error: implicit declaration of function 'amd_pmc_idlemask_read'; did you mean 'amd_pmc_idlemask_show'? [-Werror=implicit-function-declaration]
  468 |                 rc = amd_pmc_idlemask_read(dev, NULL, s);
      |
Comment 1 Borislav Petkov 2022-11-11 12:10:59 UTC
Please upload the config file which triggers this.

Thx.
Comment 2 Stuart Foster 2022-11-11 12:23:23 UTC
Created attachment 303156 [details]
config file
Comment 3 Stuart Foster 2022-11-13 13:37:04 UTC
Backtracking kernel 6.0.6 builds 6.0.7 does not.
(Before 6.0.8 the kernel for this machine was last built using 6.0.3)/
Comment 4 Stuart Foster 2022-11-13 13:40:48 UTC
looking at the change log for 6.0.7 I found this:

commit c44b338e4feab95b4751c20b8fae22cffff7d2aa
Author: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Date:   Thu Sep 22 23:26:08 2022 +0530

    platform/x86/amd: pmc: remove CONFIG_DEBUG_FS checks
    
    commit b37fe34c83099ba5105115f8287c5546af1f0a05 upstream.
    
    Since linux/debugfs.h already has the stubs for the used debugfs
    functions when debugfs is not enabled, remove the #ifdef CONFIG_DEBUG_FS
    checks.
    
    Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
    Link: https://lore.kernel.org/r/20220922175608.630046-1-Shyam-sundar.S-k@amd.com
    Reviewed-by: Hans de Goede <hdegoede@redhat.com>
    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
    Cc: Jaak Ristioja <jaak@ristioja.ee>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Could this be the trigger ?
Comment 5 Borislav Petkov 2022-11-13 16:01:13 UTC
The fix is already identified. I CCed you on the upstream mail thread:

https://lore.kernel.org/r/Y25m8tPTtyfHOCfK@zn.tnic

Did you not get it?
Comment 6 Stuart Foster 2022-11-13 18:27:26 UTC
Yes got it, did not register the e-mails at first I was looking for the bug reference in the e-mail headers sorry. Thanks anyway.
Comment 7 Stuart Foster 2022-11-14 09:41:29 UTC
The patch works fine for me. Thank you.

Note You need to log in before you can comment on or make changes to this bug.