[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YdcC2JK7sOFs292B@amd.com>
Date: Thu, 6 Jan 2022 22:55:20 +0800
From: Huang Rui <ray.huang@....com>
To: Borislav Petkov <bp@...en8.de>
Cc: "Rafael J . Wysocki" <rafael.j.wysocki@...el.com>,
Randy Dunlap <rdunlap@...radead.org>,
Stephen Rothwell <sfr@...b.auug.org.au>,
"linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"Yuan, Perry" <Perry.Yuan@....com>,
"Su, Jinzhou (Joe)" <Jinzhou.Su@....com>,
"Du, Xiaojian" <Xiaojian.Du@....com>,
kernel test robot <lkp@...el.com>,
Ingo Molnar <mingo@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
"x86@...nel.org" <x86@...nel.org>,
"stable@...r.kernel.org" <stable@...r.kernel.org>
Subject: Re: [PATCH 2/2] x86, sched: Fix the undefined reference building
error of init_freq_invariance_cppc
On Thu, Jan 06, 2022 at 10:37:59PM +0800, Huang Rui wrote:
> On Thu, Jan 06, 2022 at 08:16:43PM +0800, Borislav Petkov wrote:
> > On Thu, Jan 06, 2022 at 03:43:06PM +0800, Huang Rui 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%7C4c696d3f23ac4479dda108d9d10e6a53%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637770682133383506%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=9lC2az1xGeYn7fNputkUMsy7PIhmkqW8jdpDUsaWthI%3D&reserved=0.
> > >
> > > Fixes: 41ea667227ba ("x86, sched: Calculate frequency invariance for AMD systems")
> > > Reported-by: kernel test robot <lkp@...el.com>
> > > Reported-by: Randy Dunlap <rdunlap@...radead.org>
> > > Reported-by: Stephen Rothwell <sfr@...b.auug.org.au>
> > > Signed-off-by: Huang Rui <ray.huang@....com>
> > > Cc: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
> > > Cc: Borislav Petkov <bp@...en8.de>
> > > Cc: Ingo Molnar <mingo@...nel.org>
> > > Cc: Peter Zijlstra <peterz@...radead.org>
> > > Cc: x86@...nel.org
> > > Cc: stable@...r.kernel.org
> > > ---
> > > 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
> > > #endif
> > > --
> >
> > Well, since that function is in smpboot.c then the logic should be that
> > CPPC depends on functionality in smpboot.c for proper operation.
> >
> > IOW, ACPI_CPPC_LIB should have "depends on CONFIG_SMP" in Kconfig, no?
> >
> > Instead of adding more ifdeffery around...
> >
>
> Hmm, yes, that's fine. I will modify it in V2.
>
I just thought the CPPC function should be able to work on single core even
SMP is disabled.
Thanks,
Ray
Powered by blists - more mailing lists