x86/fpu/init: Propagate __init annotations

Now that all the FPU init function call dependencies are
cleaned up we can propagate __init annotations deeper.

This shrinks the runtime size of the kernel a bit, and
also addresses a few section warnings.

Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
Ingo Molnar 2015-05-04 09:52:42 +02:00
parent 5fd402dfa7
commit 32231879f6
3 changed files with 12 additions and 12 deletions

View File

@ -60,7 +60,7 @@ static void __init check_fpu(void)
}
}
void fpu__init_check_bugs(void)
void __init fpu__init_check_bugs(void)
{
/*
* kernel_fpu_begin/end() in check_fpu() relies on the patched

View File

@ -90,7 +90,7 @@ static void fpu__init_system_early_generic(struct cpuinfo_x86 *c)
*/
unsigned int mxcsr_feature_mask __read_mostly = 0xffffffffu;
static void fpu__init_system_mxcsr(void)
static void __init fpu__init_system_mxcsr(void)
{
unsigned int mask = 0;
@ -115,7 +115,7 @@ static void fpu__init_system_mxcsr(void)
/*
* Once per bootup FPU initialization sequences that will run on most x86 CPUs:
*/
static void fpu__init_system_generic(void)
static void __init fpu__init_system_generic(void)
{
/*
* Set up the legacy init FPU context. (xstate init might overwrite this
@ -141,7 +141,7 @@ EXPORT_SYMBOL_GPL(xstate_size);
* We set this up first, and later it will be overwritten by
* fpu__init_system_xstate() if the CPU knows about xstates.
*/
static void fpu__init_system_xstate_size_legacy(void)
static void __init fpu__init_system_xstate_size_legacy(void)
{
/*
* Note that xstate_size might be overwriten later during
@ -212,7 +212,7 @@ __setup("eagerfpu=", eager_fpu_setup);
/*
* Pick the FPU context switching strategy:
*/
static void fpu__init_system_ctx_switch(void)
static void __init fpu__init_system_ctx_switch(void)
{
WARN_ON(current->thread.fpu.fpstate_active);
current_thread_info()->status = 0;
@ -234,14 +234,14 @@ static void fpu__init_system_ctx_switch(void)
if (eagerfpu == ENABLE)
setup_force_cpu_cap(X86_FEATURE_EAGER_FPU);
printk_once(KERN_INFO "x86/fpu: Using '%s' FPU context switches.\n", eagerfpu == ENABLE ? "eager" : "lazy");
printk(KERN_INFO "x86/fpu: Using '%s' FPU context switches.\n", eagerfpu == ENABLE ? "eager" : "lazy");
}
/*
* Called on the boot CPU once per system bootup, to set up the initial
* FPU state that is later cloned into all processes:
*/
void fpu__init_system(struct cpuinfo_x86 *c)
void __init fpu__init_system(struct cpuinfo_x86 *c)
{
fpu__init_system_early_generic(c);

View File

@ -191,7 +191,7 @@ static void __init setup_xstate_features(void)
}
}
static void print_xstate_feature(u64 xstate_mask)
static void __init print_xstate_feature(u64 xstate_mask)
{
const char *feature_name;
@ -202,7 +202,7 @@ static void print_xstate_feature(u64 xstate_mask)
/*
* Print out all the supported xstate features:
*/
static void print_xstate_features(void)
static void __init print_xstate_features(void)
{
print_xstate_feature(XSTATE_FP);
print_xstate_feature(XSTATE_SSE);
@ -219,7 +219,7 @@ static void print_xstate_features(void)
* xsave area. This supports both standard format and compacted format
* of the xsave aread.
*/
static void setup_xstate_comp(void)
static void __init setup_xstate_comp(void)
{
unsigned int xstate_comp_sizes[sizeof(xfeatures_mask)*8];
int i;
@ -260,7 +260,7 @@ static void setup_xstate_comp(void)
/*
* setup the xstate image representing the init state
*/
static void setup_init_fpu_buf(void)
static void __init setup_init_fpu_buf(void)
{
if (!cpu_has_xsave)
return;
@ -314,7 +314,7 @@ static void __init init_xstate_size(void)
*
* ( Not marked __init because of false positive section warnings. )
*/
void fpu__init_system_xstate(void)
void __init fpu__init_system_xstate(void)
{
unsigned int eax, ebx, ecx, edx;