[PATCH] platform/x86/amd/pmf: fix build on !CONFIG_AMD_PMF_DEBUG

From: Pedro Falcato

Date: Mon Aug 31 2026 - 07:44:15 EST


amd_pmf_get_ta_custom_bios_inputs() is used by non-debug features.

Fix the build on !CONFIG_AMD_PMF_DEBUG by moving
amd_pmf_get_ta_custom_bios_inputs() outside the ifdef CONFIG_AMD_PMF_DEBUG.

Fixes: 5bda82c797c9 ("platform/x86/amd/pmf: Implement util layer ioctl handler")
Reported-by: Oleksandr Natalenko <oleksandr@xxxxxxxxxxxxxx>
Link: https://lore.kernel.org/all/fS7s9V_xTaedaqEAaxwKnQ@xxxxxxxxxxxxxx/
Signed-off-by: Pedro Falcato <pfalcato@xxxxxxx>
---
drivers/platform/x86/amd/pmf/spc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/platform/x86/amd/pmf/spc.c b/drivers/platform/x86/amd/pmf/spc.c
index 94355b435a66..592ba4de4c7f 100644
--- a/drivers/platform/x86/amd/pmf/spc.c
+++ b/drivers/platform/x86/amd/pmf/spc.c
@@ -17,7 +17,6 @@
#include <linux/units.h>
#include "pmf.h"

-#ifdef CONFIG_AMD_PMF_DEBUG
u32 amd_pmf_get_ta_custom_bios_inputs(struct ta_pmf_enact_table *in, int index)
{
switch (index) {
@@ -31,6 +30,7 @@ u32 amd_pmf_get_ta_custom_bios_inputs(struct ta_pmf_enact_table *in, int index)
}
EXPORT_SYMBOL(amd_pmf_get_ta_custom_bios_inputs);

+#ifdef CONFIG_AMD_PMF_DEBUG
void amd_pmf_dump_ta_inputs(struct amd_pmf_dev *dev, struct ta_pmf_enact_table *in)
{
int i;
--
2.55.0