Skip to content

Commit

Permalink
x86, sched: Fix undefined reference to init_freq_invariance_cppc() bu…
Browse files Browse the repository at this point in the history
…ild error

BugLink: https://bugs.launchpad.net/bugs/1962230

[ Upstream commit 6c4ab1b ]

The init_freq_invariance_cppc function is implemented in smpboot and depends on
CONFIG_SMP.

  MODPOST vmlinux.symvers
  MODINFO modules.builtin.modinfo
  GEN     modules.builtin
  LD      .tmp_vmlinux.kallsyms1
ld: drivers/acpi/cppc_acpi.o: in function `acpi_cppc_processor_probe':
/home/ray/brahma3/linux/drivers/acpi/cppc_acpi.c:819: undefined reference to `init_freq_invariance_cppc'
make: *** [Makefile:1161: vmlinux] Error 1

See https://lore.kernel.org/lkml/[email protected]/.

Fixes: 41ea667 ("x86, sched: Calculate frequency invariance for AMD systems")
Reported-by: kernel test robot <[email protected]>
Reported-by: Randy Dunlap <[email protected]>
Reported-by: Stephen Rothwell <[email protected]>
Signed-off-by: Huang Rui <[email protected]>
[ rjw: Subject edits ]
Signed-off-by: Rafael J. Wysocki <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
Signed-off-by: Kamal Mostafa <[email protected]>
Signed-off-by: Stefan Bader <[email protected]>
  • Loading branch information
huangrui authored and smb49 committed Mar 24, 2022
1 parent 29382ae commit d5d2dfc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/include/asm/topology.h
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ static inline void arch_set_max_freq_ratio(bool turbo_disabled)
}
#endif

#ifdef CONFIG_ACPI_CPPC_LIB
#if defined(CONFIG_ACPI_CPPC_LIB) && defined(CONFIG_SMP)
void init_freq_invariance_cppc(void);
#define init_freq_invariance_cppc init_freq_invariance_cppc
#endif
Expand Down

0 comments on commit d5d2dfc

Please sign in to comment.