On Fri, Jan 07, 2022 at 01:46:04AM +0800, Rafael J. Wysocki wrote: > On Thu, Jan 6, 2022 at 6:12 PM Rafael J. Wysocki <rafael@xxxxxxxxxx> wrote: > > > > On Thu, Jan 6, 2022 at 8:43 AM Huang Rui <ray.huang@xxxxxxx> wrote: > > > > > > 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://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore.kernel.org%2Flkml%2F484af487-7511-647e-5c5b-33d4429acdec%40infradead.org%2F&data=04%7C01%7Cray.huang%40amd.com%7Cde64292b38394cf2cac508d9d13c701c%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637770879795785268%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=BtO45nsVaYM%2BBytS%2B5GOPQuIadaiUEnzzaSmydsl0Jo%3D&reserved=0. > > > > > > Fixes: 41ea667227ba ("x86, sched: Calculate frequency invariance for AMD systems") > > > Reported-by: kernel test robot <lkp@xxxxxxxxx> > > > Reported-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx> > > > Reported-by: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx> > > > Signed-off-by: Huang Rui <ray.huang@xxxxxxx> > > > Cc: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx> > > > Cc: Borislav Petkov <bp@xxxxxxxxx> > > > Cc: Ingo Molnar <mingo@xxxxxxxxxx> > > > Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx> > > > Cc: x86@xxxxxxxxxx > > > Cc: stable@xxxxxxxxxxxxxxx > > > --- > > > arch/x86/include/asm/topology.h | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/arch/x86/include/asm/topology.h b/arch/x86/include/asm/topology.h > > > index cc164777e661..2f0b6be8eaab 100644 > > > --- a/arch/x86/include/asm/topology.h > > > +++ b/arch/x86/include/asm/topology.h > > > @@ -221,7 +221,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 > > > > Why don't you check CONFIG_SMP instead of this symbol in cppc_acpi.c? > > That file depends on CONFIG_ACPI_CPPC_LIB anyway. > > Scratch that, it needs to compile on non-x86 too. > > The $subject patch is cleaner than all of the alternatives I have > considered, so I'm going to apply it. > > However, I'm not really happy with the dependencies between CPPC and > smpboot.c going both ways. Thanks, for urgent fix for linux-next, I think we can use this patch at this moment. Let me think out a better way to handle the dependencies next step. :-) Thanks, Ray