mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-30 04:39:38 +00:00
x86/fpu/init: Clean up and comment the __setup() functions
Explain the functions and also standardize their style and naming. No change in functionality. 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> Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
parent
7cf82d33b6
commit
5856afed0c
1 changed files with 25 additions and 10 deletions
|
@ -284,42 +284,57 @@ static int __init no_387(char *s)
|
||||||
setup_clear_cpu_cap(X86_FEATURE_FPU);
|
setup_clear_cpu_cap(X86_FEATURE_FPU);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
__setup("no387", no_387);
|
__setup("no387", no_387);
|
||||||
|
|
||||||
static int __init x86_xsave_setup(char *s)
|
/*
|
||||||
|
* Disable all xstate CPU features:
|
||||||
|
*/
|
||||||
|
static int __init x86_noxsave_setup(char *s)
|
||||||
{
|
{
|
||||||
if (strlen(s))
|
if (strlen(s))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
setup_clear_cpu_cap(X86_FEATURE_XSAVE);
|
setup_clear_cpu_cap(X86_FEATURE_XSAVE);
|
||||||
setup_clear_cpu_cap(X86_FEATURE_XSAVEOPT);
|
setup_clear_cpu_cap(X86_FEATURE_XSAVEOPT);
|
||||||
setup_clear_cpu_cap(X86_FEATURE_XSAVES);
|
setup_clear_cpu_cap(X86_FEATURE_XSAVES);
|
||||||
setup_clear_cpu_cap(X86_FEATURE_AVX);
|
setup_clear_cpu_cap(X86_FEATURE_AVX);
|
||||||
setup_clear_cpu_cap(X86_FEATURE_AVX2);
|
setup_clear_cpu_cap(X86_FEATURE_AVX2);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
__setup("noxsave", x86_xsave_setup);
|
__setup("noxsave", x86_noxsave_setup);
|
||||||
|
|
||||||
static int __init x86_xsaveopt_setup(char *s)
|
/*
|
||||||
|
* Disable the XSAVEOPT instruction specifically:
|
||||||
|
*/
|
||||||
|
static int __init x86_noxsaveopt_setup(char *s)
|
||||||
{
|
{
|
||||||
setup_clear_cpu_cap(X86_FEATURE_XSAVEOPT);
|
setup_clear_cpu_cap(X86_FEATURE_XSAVEOPT);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
__setup("noxsaveopt", x86_xsaveopt_setup);
|
__setup("noxsaveopt", x86_noxsaveopt_setup);
|
||||||
|
|
||||||
static int __init x86_xsaves_setup(char *s)
|
/*
|
||||||
|
* Disable the XSAVES instruction:
|
||||||
|
*/
|
||||||
|
static int __init x86_noxsaves_setup(char *s)
|
||||||
{
|
{
|
||||||
setup_clear_cpu_cap(X86_FEATURE_XSAVES);
|
setup_clear_cpu_cap(X86_FEATURE_XSAVES);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
__setup("noxsaves", x86_xsaves_setup);
|
__setup("noxsaves", x86_noxsaves_setup);
|
||||||
|
|
||||||
static int __init x86_fxsr_setup(char *s)
|
/*
|
||||||
|
* Disable FX save/restore and SSE support:
|
||||||
|
*/
|
||||||
|
static int __init x86_nofxsr_setup(char *s)
|
||||||
{
|
{
|
||||||
setup_clear_cpu_cap(X86_FEATURE_FXSR);
|
setup_clear_cpu_cap(X86_FEATURE_FXSR);
|
||||||
setup_clear_cpu_cap(X86_FEATURE_FXSR_OPT);
|
setup_clear_cpu_cap(X86_FEATURE_FXSR_OPT);
|
||||||
setup_clear_cpu_cap(X86_FEATURE_XMM);
|
setup_clear_cpu_cap(X86_FEATURE_XMM);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
__setup("nofxsr", x86_fxsr_setup);
|
__setup("nofxsr", x86_nofxsr_setup);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue