i386: mark two more functions as __init
PATCH 1/1 i386: mark two more functions as __init
i386: mark two more functions as __init
cyrix_identify() should be __init because transmeta_identify() is. tsc_init() is only called from setup_arch() which is marked as __init.
These two section mismatches have been detected using running modpost on a vmlinux image compiled with CONFIG_RELOCATABLE=y.
---
cpu/cyrix.c | 2 +- tsc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
arch/i386/kernel/cpu/cyrix.c +1 -1
@@ -394,7 +394,7 @@ static inline int test_cyrix_52div(void)return (unsigned char ) (test >>8 ) ==0x02 ; } -static void cyrix_identify (struct cpuinfo_x86 * c) +static void __init cyrix_identify (struct cpuinfo_x86 * c) {/* Detect Cyrix with disabled CPUID */ if ( c->x86 ==4 &&test_cyrix_52div () ) {
arch/i386/kernel/tsc.c +1 -1
@@ -192,7 +192,7 @@ int recalibrate_cpu_khz(void)EXPORT_SYMBOL (recalibrate_cpu_khz); -void tsc_init (void ) +void __init tsc_init (void ) {if (!cpu_has_tsc || tsc_disable)return ;
Quoted 7 lines · Magnus Damm
i386: mark two more functions as
__init
cyrix_identify()should be__initbecausetransmeta_identify()is.tsc_init()is only called fromsetup_arch()which is marked as__init.These two section mismatches have been detected using running modpost on a vmlinux image compiled with
CONFIG_RELOCATABLE=y.
I queued both patches (topology and this one)
-Andi
arch/i386/kernel/cpu/cyrix.c static inline int test_cyrix_52div(void) · line 397
Quoted 10 lines · On Tue, 8 Aug 2006 17:17:00 +0900 (JST) Magnus Damm <[email protected]>…
i386: mark two more functions as
__init
cyrix_identify()should be__initbecausetransmeta_identify()is.tsc_init()is only called fromsetup_arch()which is marked as__init.These two section mismatches have been detected using running modpost on a vmlinux image compiled with
CONFIG_RELOCATABLE=y.arch/i386/kernel/cpu/cyrix.c +1
-1-static void cyrix_identify (struct cpuinfo_x86 * c) +static void __init cyrix_identify (struct cpuinfo_x86 * c)
Are we sure? We end up putting a pointer to this into arch/i386/kernel/cpu/common.c:cpu_devs[], and that gets used from __cpuinit code.
Quoted 11 lines · Andrew Morton
Quoted 8 lines · On Tue, 8 Aug 2006 17:17:00 +0900 (JST) Magnus Damm <[email protected]>…
i386: mark two more functions as
__init
cyrix_identify()should be__initbecausetransmeta_identify()is.tsc_init()is only called fromsetup_arch()which is marked as__init.These two section mismatches have been detected using running modpost on a vmlinux image compiled with
CONFIG_RELOCATABLE=y.
Quoted 6 lines
arch/i386/kernel/cpu/cyrix.c static inline int test_cyrix_52div(void) · line 397
Quoted 2 lines
arch/i386/kernel/cpu/cyrix.c +1
-1-static void cyrix_identify (struct cpuinfo_x86 * c) +static void __init cyrix_identify (struct cpuinfo_x86 * c)Are we sure? We end up putting a pointer to this into arch/i386/kernel/cpu/common.c:cpu_devs[], and that gets used from
__cpuinitcode.
Uh, right. The problem is that almost all cpu code is put in the __init section today. I'll break out and resend the tsc code, and on top of that post a set of patches that puts cpu code and data into __cpuinit and __cpuinitdata sections.
Thanks!
/ magnus