]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
x86/fpu: Use 'fpstate' variable names consistently
authorIngo Molnar <mingo@kernel.org>
Wed, 9 Apr 2025 21:11:27 +0000 (23:11 +0200)
committerIngo Molnar <mingo@kernel.org>
Mon, 14 Apr 2025 06:18:29 +0000 (08:18 +0200)
A few uses of 'fps' snuck in, which is rather confusing
(to me) as it suggests frames-per-second. ;-)

Rename them to the canonical 'fpstate' name.

No change in functionality.

Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Chang S. Bae <chang.seok.bae@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>
Link: https://lore.kernel.org/r/20250409211127.3544993-9-mingo@kernel.org
arch/x86/include/asm/fpu/api.h
arch/x86/kernel/fpu/core.c
arch/x86/kernel/fpu/xstate.c

index f42de5f05e7eb6e3a851cf15506c093ce6a4f6e5..8e6848f55dcdb512bc067d89893fa3e01c7b39b2 100644 (file)
@@ -136,7 +136,7 @@ static inline void fpstate_free(struct fpu *fpu) { }
 #endif
 
 /* fpstate-related functions which are exported to KVM */
-extern void fpstate_clear_xstate_component(struct fpstate *fps, unsigned int xfeature);
+extern void fpstate_clear_xstate_component(struct fpstate *fpstate, unsigned int xfeature);
 
 extern u64 xstate_get_guest_group_perm(void);
 
index 4d1a205b7ce2af0fe67b5506e37cd387b60d6d5e..d0a45f6492cb792c9e5eeb69213d5ecf590905f7 100644 (file)
@@ -273,16 +273,16 @@ EXPORT_SYMBOL_GPL(fpu_alloc_guest_fpstate);
 
 void fpu_free_guest_fpstate(struct fpu_guest *gfpu)
 {
-       struct fpstate *fps = gfpu->fpstate;
+       struct fpstate *fpstate = gfpu->fpstate;
 
-       if (!fps)
+       if (!fpstate)
                return;
 
-       if (WARN_ON_ONCE(!fps->is_valloc || !fps->is_guest || fps->in_use))
+       if (WARN_ON_ONCE(!fpstate->is_valloc || !fpstate->is_guest || fpstate->in_use))
                return;
 
        gfpu->fpstate = NULL;
-       vfree(fps);
+       vfree(fpstate);
 }
 EXPORT_SYMBOL_GPL(fpu_free_guest_fpstate);
 
@@ -333,12 +333,12 @@ EXPORT_SYMBOL_GPL(fpu_update_guest_xfd);
  */
 void fpu_sync_guest_vmexit_xfd_state(void)
 {
-       struct fpstate *fps = x86_task_fpu(current)->fpstate;
+       struct fpstate *fpstate = x86_task_fpu(current)->fpstate;
 
        lockdep_assert_irqs_disabled();
        if (fpu_state_size_dynamic()) {
-               rdmsrl(MSR_IA32_XFD, fps->xfd);
-               __this_cpu_write(xfd_state, fps->xfd);
+               rdmsrl(MSR_IA32_XFD, fpstate->xfd);
+               __this_cpu_write(xfd_state, fpstate->xfd);
        }
 }
 EXPORT_SYMBOL_GPL(fpu_sync_guest_vmexit_xfd_state);
index 4c771b9bd270bb1fa6e47ae0e309c6eba911dbd2..a288597065fd192b1c46d556b08c09253cfb4796 100644 (file)
@@ -1431,9 +1431,9 @@ void xrstors(struct xregs_state *xstate, u64 mask)
 }
 
 #if IS_ENABLED(CONFIG_KVM)
-void fpstate_clear_xstate_component(struct fpstate *fps, unsigned int xfeature)
+void fpstate_clear_xstate_component(struct fpstate *fpstate, unsigned int xfeature)
 {
-       void *addr = get_xsave_addr(&fps->regs.xsave, xfeature);
+       void *addr = get_xsave_addr(&fpstate->regs.xsave, xfeature);
 
        if (addr)
                memset(addr, 0, xstate_sizes[xfeature]);