]> git.baikalelectronics.ru Git - kernel.git/commit
x86/fpu/xstate: Consolidate size calculations
authorThomas Gleixner <tglx@linutronix.de>
Mon, 28 Mar 2022 18:43:21 +0000 (20:43 +0200)
committerBorislav Petkov <bp@suse.de>
Wed, 30 Mar 2022 10:04:09 +0000 (12:04 +0200)
commit7a0f64106c0f12c57856a47b13bb06930d5b650a
tree537bfef6dd75df1a31abd08c4b96aaa7acf94fdc
parentf4afc509346eeed2b6e26af2a64e66b9b5c91bb3
x86/fpu/xstate: Consolidate size calculations

Use the offset calculation to do the size calculation which avoids yet
another series of CPUID instructions for each invocation.

  [ Fix the FP/SSE only case which missed to take the xstate
    header into account, as
Reported-by: kernel test robot <oliver.sang@intel.com> ]
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lore.kernel.org/r/87o81pgbp2.ffs@tglx
arch/x86/kernel/fpu/xstate.c