Re: [PATCH 08/21] drivers: base: Implement weak arch_unregister_cpu()
Thomas Gleixner <[email protected]> Fri, 01 Dec 2023 12:06:31 +0100
| Newsgroups | org.kernel.vger.linux-ia64,dev.linux.lists.kvmarm,dev.linux.lists.loongarch,org.infradead.lists.linux-arm-kernel,org.infradead.lists.linux-riscv,org.kernel.vger.linux-acpi,org.kernel.vger.linux-arch,org.kernel.vger.linux-csky,org.kernel.vger.linux-doc,org.kernel.vger.linux-kernel,org.kernel.vger.linux-parisc,org.kernel.vger.linux-pm |
|---|---|
| Message-ID | <87sf4mxjuw.ffs@tglx> |
On Tue, Nov 21 2023 at 13:44, Russell King wrote:
> ---
> An open question remains from the RFC v2 posting: should we provide a
> __weak stub for !HOTPLUG_CPU as well, since in later patches ACPI may
> reference this if the compiler doesn't optimise as we expect?
You mean:
extern void foo(void);
if (!IS_ENABLED(CONFIG_FOO))
foo();
The kernel uses this pattern for years and if someday a compiler starts
to fail to eliminate the call to 'foo()' for CONFIG_FOO=n then you
already get hundreds linkage fails today.
So adding one more in later patches won't matter much :)