i386: __init should be __cpuinit
In-Reply-To: <[email protected]>
Quoted 11 lines · Dave Jones
Quoted 6 lines · Chuck Ebbert
To fix this, change every instance of
__initthat seems suspicious into__cpuinit. When !CONFIG_HOTPLUG_CPU there is no change in .text or .data size. When enabled, .text += 3248 bytes; .data += 2148 bytes.This should be safe in every case; the only drawback is the extra code and data when CPU hotplug is enabled.
How about leaving it
__initon non-hotplug systems, and somehow removing those fromcpu_devs, soget_cpu_vendor()just skips them ? NULL'ing those entries should be just a few bytes, instead of adding 5KB.
That's what I wanted to do but wasn't sure how. Maybe e.g. like this?
arch/i386/kernel/cpu/umc.c +10 -2
@@ -5,12 +5,12 @@/* UMC chips appear to be only either 386 or 486, so no special init takes place. */ -static void __cpuinit init_umc (struct cpuinfo_x86 * c) +static void __init init_umc (struct cpuinfo_x86 * c) { } -static struct cpu_dev umc_cpu_dev__cpuinitdata = { +static struct cpu_dev umc_cpu_dev__initdata = { .c_vendor ="UMC" , .c_ident = {"UMC UMC UMC" }, .c_models = {
@@ -31,3 +31,11 @@ int __init umc_init_cpu(void) }//early_arch_initcall(umc_init_cpu); + +int __init umc_exit_cpu (void ) +{ + cpu_devs[X86_VENDOR_UMC ] =NULL ; +return 0 ; +} + +late_initcall (umc_exit_cpu);
Signature · 1 line
Chuck