Skip to content

x86/fpu: a few code cleanup

Chang S. Bae lkml 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4x86/fpu/xstate: Convert get_xsave_addr() to a static functionarch/x86/kernel/fpu/xstate.c arch/x86/kernel/fpu/xstate.h+1 -30 replies
2/4x86/fpu/xstate: Simplify xstate_calculate_size()arch/x86/kernel/fpu/xstate.c+1 -40 replies
3/4x86/fpu/xstate: Simplify print_xstate_features()arch/x86/kernel/fpu/xstate.c+9 -200 replies
4/4x86/fpu: Remove the unnecessary fpstate_reset() invocationarch/x86/kernel/fpu/init.c+0 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH v1 0/4] x86/fpu: a few code cleanup

Hi all,

This series intends to clean up the x86 FPU code. They do *not* deal with any urgent issues but considerably apparent cleanups:

- Simplify xstate_calculate_size() and print_xstate_features() as both have some inefficient duplications.
- Convert get_xsave_addr() to a local function because it is not invoked anywhere else.
- Clean up the unnecessary fpstate_reset() since the invocation makes no change in the fpstate container.

The last one might have an unknown reason behind it. Then, I will revise it with the clarification instead of removing the code.

The series can be found in this repo:
git://github.com/intel/amx-linux.git x86-fpu-cleanup

Thanks,
Chang

Chang S. Bae (4):
x86/fpu/xstate: Convert get_xsave_addr() to a static function x86/fpu/xstate: Simplify xstate_calculate_size() x86/fpu/xstate: Simplify print_xstate_features() x86/fpu: Remove the unnecessary fpstate_reset() invocation

 arch/x86/kernel/fpu/init.c   |  1 -
 arch/x86/kernel/fpu/xstate.c | 36 +++++++++++-------------------------
 arch/x86/kernel/fpu/xstate.h |  2 --
 3 files changed, 11 insertions(+), 28 deletions(-)

base-commit: 162d2c2297b731a9918bd26db5a9f779de259c09

Signature · 1 line
2.34.1