Commit 3f6a0bce authored by Ingo Molnar's avatar Ingo Molnar

x86/fpu: Rename init_thread_xstate() to fpstate_xstate_init_size()

So init_thread_xstate() is a misnomer in that it's not really related to a specific
thread - it determines, once during initial bootup, the size of the xstate context.

Also improve the comments.
Reviewed-by: default avatarBorislav Petkov <bp@alien8.de>
Cc: Andy Lutomirski <luto@amacapital.net>
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: default avatarIngo Molnar <mingo@kernel.org>
parent 3a9c4b0d
...@@ -158,7 +158,7 @@ static void mxcsr_feature_mask_init(void) ...@@ -158,7 +158,7 @@ static void mxcsr_feature_mask_init(void)
mxcsr_feature_mask &= mask; mxcsr_feature_mask &= mask;
} }
static void init_thread_xstate(void) static void fpstate_xstate_init_size(void)
{ {
/* /*
* Note that xstate_size might be overwriten later during * Note that xstate_size might be overwriten later during
...@@ -216,11 +216,11 @@ void fpu__cpu_init(void) ...@@ -216,11 +216,11 @@ void fpu__cpu_init(void)
write_cr0(cr0); write_cr0(cr0);
/* /*
* init_thread_xstate is only called once to avoid overriding * fpstate_xstate_init_size() is only called once, to avoid overriding
* xstate_size during boot time or during CPU hotplug. * 'xstate_size' during (secondary CPU) bootup or during CPU hotplug.
*/ */
if (xstate_size == 0) if (xstate_size == 0)
init_thread_xstate(); fpstate_xstate_init_size();
mxcsr_feature_mask_init(); mxcsr_feature_mask_init();
xsave_init(); xsave_init();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment