Re: [PATCH][bugzilla #8679] therm_throt.c: Fix section mismatch

From: Satyam Sharma
Date: Wed Aug 22 2007 - 17:45:54 EST




On Thu, 23 Aug 2007, Satyam Sharma wrote:
>
> I must say, this is an amazingly cunning idea. Only things I can think of
> against this would be: the dropping of unneeded code is not guaranteed,
> but depends on compiler. And we saw from the "static inline {return 0;}"
> testcase that gcc can sometimes be not-so-smart.

Oh, wait. I just stumbled upon arch/i386/kernel/cpu/intel_cacheinfo.c
that references the callback function from generic CPU-initialization
startup code that must get executed even when HOTPLUG_CPU=n. The leave-it-
upto-toolchain method would see this reference, and preserve the function
even after initcalls stage for HOTPLUG_CPU=n. So the explicit __cpuinit
method scores here, admittedly only because of weird taste of said code.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/