i386: mark cpu_dev structures as __cpuinitdata
In-Reply-To: <[email protected]>
Quoted 6 lines · Andi Kleen
From: Magnus Damm <[email protected]>
The different
cpu_devstructures are all used from__cpuinitcallers what I can tell. So mark them as__cpuinitdatainstead of__initdata. I am a little bit unsure about arch/i386/common.c:default_cpu, especially when it comes to the purpose ofthis_cpu.
But none of these CPUs supports hotplug and only one (AMD) does SMP. So this is just wasting space in the kernel at runtime.
If anything I would only do this for AMD.
Same for the other patch that does more of this kind of change.
(IIRC I tried to do this a while ago and was told not to.)
Signature · 1 line
Chuck
Quoted 9 lines
But none of these CPUs supports hotplug and only one (AMD) does SMP. So this is just wasting space in the kernel at runtime.
If anything I would only do this for AMD.
Same for the other patch that does more of this kind of change.
(IIRC I tried to do this a while ago and was told not to.)
But wouldn't the reference check during build always warn if that wasn't fixed?
-Andi
Quoted 6 lines · Chuck Ebbert
In-Reply-To: <[email protected]>
Quoted 2 lines · Andi Kleen
From: Magnus Damm <[email protected]>
Quoted 7 lines
Quoted 4 lines
The different
cpu_devstructures are all used from__cpuinitcallers what I can tell. So mark them as__cpuinitdatainstead of__initdata. I am a little bit unsure about arch/i386/common.c:default_cpu, especially when it comes to the purpose ofthis_cpu.But none of these CPUs supports hotplug and only one (AMD) does SMP. So this is just wasting space in the kernel at runtime.
How could this be wasting space? If you compile with CONFIG_HOTPLUG_CPU disabled then __cpuinitdata will become __initdata - ie the same as before. Not a single byte wasted what I can tell.
The first version of this patch simply added a missing __init to some function, but I was then corrected by akpm that __cpuinit should be used instead.
Thanks,
/ magnus