Skip to content

Commit d47f71f

Browse files
KAGA-KOKOsuryasaimadhu
authored andcommitted
x86/fpu: Remove unused supervisor only offsets
No users. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Borislav Petkov <bp@suse.de> Link: https://lore.kernel.org/r/20220324134623.465066249@linutronix.de
1 parent a9f84fb commit d47f71f

File tree

1 file changed

+0
-30
lines changed

1 file changed

+0
-30
lines changed

arch/x86/kernel/fpu/xstate.c

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,6 @@ static unsigned int xstate_sizes[XFEATURE_MAX] __ro_after_init =
8383
{ [ 0 ... XFEATURE_MAX - 1] = -1};
8484
static unsigned int xstate_comp_offsets[XFEATURE_MAX] __ro_after_init =
8585
{ [ 0 ... XFEATURE_MAX - 1] = -1};
86-
static unsigned int xstate_supervisor_only_offsets[XFEATURE_MAX] __ro_after_init =
87-
{ [ 0 ... XFEATURE_MAX - 1] = -1};
8886

8987
/*
9088
* Return whether the system supports a given xfeature.
@@ -324,33 +322,6 @@ static void __init setup_xstate_comp_offsets(void)
324322
}
325323
}
326324

327-
/*
328-
* Setup offsets of a supervisor-state-only XSAVES buffer:
329-
*
330-
* The offsets stored in xstate_comp_offsets[] only work for one specific
331-
* value of the Requested Feature BitMap (RFBM). In cases where a different
332-
* RFBM value is used, a different set of offsets is required. This set of
333-
* offsets is for when RFBM=xfeatures_mask_supervisor().
334-
*/
335-
static void __init setup_supervisor_only_offsets(void)
336-
{
337-
unsigned int next_offset;
338-
int i;
339-
340-
next_offset = FXSAVE_SIZE + XSAVE_HDR_SIZE;
341-
342-
for_each_extended_xfeature(i, fpu_kernel_cfg.max_features) {
343-
if (!xfeature_is_supervisor(i))
344-
continue;
345-
346-
if (xfeature_is_aligned(i))
347-
next_offset = ALIGN(next_offset, 64);
348-
349-
xstate_supervisor_only_offsets[i] = next_offset;
350-
next_offset += xstate_sizes[i];
351-
}
352-
}
353-
354325
/*
355326
* Print out xstate component offsets and sizes
356327
*/
@@ -951,7 +922,6 @@ void __init fpu__init_system_xstate(unsigned int legacy_size)
951922

952923
setup_init_fpu_buf();
953924
setup_xstate_comp_offsets();
954-
setup_supervisor_only_offsets();
955925

956926
/*
957927
* Paranoia check whether something in the setup modified the

0 commit comments

Comments
 (0)