Re: [PATCH 08/21] drivers: base: Implement weak arch_unregister_cpu()

Thomas Gleixner <[email protected]> Fri, 01 Dec 2023 12:06:31 +0100
Newsgroups gmane.linux.kernel,gmane.linux.power-management.general,gmane.linux.acpi.devel,gmane.linux.kernel.cross-arch,gmane.linux.ports.arm.kernel,gmane.linux.ports.riscv,gmane.linux.documentation,gmane.linux.ports.ia64,gmane.linux.ports.parisc
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 :)