From: Borislav Petkov <bp@alien8.de>
To: Huang Rui <ray.huang@amd.com>
Cc: "Rafael J . Wysocki" <rafael.j.wysocki@intel.com>,
Randy Dunlap <rdunlap@infradead.org>,
Stephen Rothwell <sfr@canb.auug.org.au>,
linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
Perry Yuan <Perry.Yuan@amd.com>, Jinzhou Su <Jinzhou.Su@amd.com>,
Xiaojian Du <Xiaojian.Du@amd.com>,
kernel test robot <lkp@intel.com>, Ingo Molnar <mingo@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
x86@kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH 2/2] x86, sched: Fix the undefined reference building error of init_freq_invariance_cppc
Date: Thu, 6 Jan 2022 13:16:43 +0100 [thread overview]
Message-ID: <Ydbdq6lXPKFG98MY@zn.tnic> (raw)
In-Reply-To: <20220106074306.2712090-2-ray.huang@amd.com>
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://lore.kernel.org/lkml/484af487-7511-647e-5c5b-33d4429acdec@infradead.org/.
>
> Fixes: 41ea667227ba ("x86, sched: Calculate frequency invariance for AMD systems")
> Reported-by: kernel test robot <lkp@intel.com>
> Reported-by: Randy Dunlap <rdunlap@infradead.org>
> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> Signed-off-by: Huang Rui <ray.huang@amd.com>
> Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> Cc: Borislav Petkov <bp@alien8.de>
> Cc: Ingo Molnar <mingo@kernel.org>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Cc: x86@kernel.org
> Cc: stable@vger.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...
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
next prev parent reply other threads:[~2022-01-06 12:16 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-06 7:43 [PATCH 1/2] cpufreq: amd-pstate: Fix the dependence issue of AMD P-State Huang Rui
2022-01-06 7:43 ` [PATCH 2/2] x86, sched: Fix the undefined reference building error of init_freq_invariance_cppc Huang Rui
2022-01-06 12:16 ` Borislav Petkov [this message]
2022-01-06 14:37 ` Huang Rui
2022-01-06 14:55 ` Huang Rui
2022-01-06 15:54 ` Borislav Petkov
2022-01-06 16:12 ` Rafael J. Wysocki
2022-01-06 16:23 ` Borislav Petkov
2022-01-06 16:49 ` Rafael J. Wysocki
2022-01-06 17:12 ` Rafael J. Wysocki
2022-01-06 17:46 ` Rafael J. Wysocki
2022-01-07 1:23 ` Huang Rui
2022-01-06 17:34 ` [PATCH 1/2] cpufreq: amd-pstate: Fix the dependence issue of AMD P-State Rafael J. Wysocki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Ydbdq6lXPKFG98MY@zn.tnic \
--to=bp@alien8.de \
--cc=Jinzhou.Su@amd.com \
--cc=Perry.Yuan@amd.com \
--cc=Xiaojian.Du@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=lkp@intel.com \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=rafael.j.wysocki@intel.com \
--cc=ray.huang@amd.com \
--cc=rdunlap@infradead.org \
--cc=sfr@canb.auug.org.au \
--cc=stable@vger.kernel.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®