[PATCH v3 1/3] x86/fpu: Rename fpu_reset_fpregs() to fpu_reset_fpstate_regs()

From: Chang S. Bae
Date: Thu May 30 2024 - 15:44:18 EST


The term 'fpregs' typically refers to FPU registers. The function copies
init values to the task's memory image, not hardware registers. Rename it
to reflect what it does.

Signed-off-by: Chang S. Bae <chang.seok.bae@xxxxxxxxx>
---
V2 -> V3: New patch to avoids conflict with the upcoming new wrapper.
---
arch/x86/kernel/fpu/core.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/x86/kernel/fpu/core.c b/arch/x86/kernel/fpu/core.c
index 1209c7aebb21..2e6f43dfe98b 100644
--- a/arch/x86/kernel/fpu/core.c
+++ b/arch/x86/kernel/fpu/core.c
@@ -709,7 +709,7 @@ static inline void restore_fpregs_from_init_fpstate(u64 features_mask)
/*
* Reset current->fpu memory state to the init values.
*/
-static void fpu_reset_fpregs(void)
+static void fpu_reset_fpstate_regs(void)
{
struct fpu *fpu = &current->thread.fpu;

@@ -744,7 +744,7 @@ void fpu__clear_user_states(struct fpu *fpu)

fpregs_lock();
if (!cpu_feature_enabled(X86_FEATURE_FPU)) {
- fpu_reset_fpregs();
+ fpu_reset_fpstate_regs();
fpregs_unlock();
return;
}
@@ -774,7 +774,7 @@ void fpu__clear_user_states(struct fpu *fpu)
void fpu_flush_thread(void)
{
fpstate_reset(&current->thread.fpu);
- fpu_reset_fpregs();
+ fpu_reset_fpstate_regs();
}
/*
* Load FPU context before returning to userspace.
--
2.34.1