summaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/fpu/api.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2015-04-24 14:19:26 +0200
committerIngo Molnar <mingo@kernel.org>2015-05-19 15:47:36 +0200
commitd5cea9b0af1509f170337ba8f47160d0699ff374 (patch)
treebe0c3057b782e219ed1c87374f3824ac7b63ad25 /arch/x86/include/asm/fpu/api.h
parent73a3aeb3ac5312122d5a261c7acb0ab9be93857a (diff)
downloadlinux-d5cea9b0af1509f170337ba8f47160d0699ff374.tar.bz2
x86/fpu: Rename fpu->has_fpu to fpu->fpregs_active
So the current code uses fpu->has_cpu to determine whether a given user FPU context is actively loaded into the FPU's registers [*] and that those registers represent the task's current FPU state. But this term is not unambiguous: especially the distinction between fpu->has_fpu, PF_USED_MATH and fpu_fpregs_owner_ctx is not clear. Increase clarity by unambigously signalling that it's about hardware registers being active right now, by renaming it to fpu->fpregs_active. ( In later patches we'll use more of the 'fpregs' naming, which will make it easier to grep for as well. ) [*] There's the kernel_fpu_begin()/end() primitive that also activates FPU hw registers as well and uses them, without touching the fpu->fpregs_active flag. Reviewed-by: Borislav 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: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/include/asm/fpu/api.h')
-rw-r--r--arch/x86/include/asm/fpu/api.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/include/asm/fpu/api.h b/arch/x86/include/asm/fpu/api.h
index 5bdde8ca87bc..4ca745c0d92e 100644
--- a/arch/x86/include/asm/fpu/api.h
+++ b/arch/x86/include/asm/fpu/api.h
@@ -96,7 +96,7 @@ static inline void irq_ts_restore(int TS_state)
*/
static inline int user_has_fpu(void)
{
- return current->thread.fpu.has_fpu;
+ return current->thread.fpu.fpregs_active;
}
extern void fpu__save(struct fpu *fpu);