lkml.org 
[lkml]   [2021]   [Jun]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [patch V4 07/65] x86/fpu: Move inlines where they belong
Date
On Jun 23, 2021, at 05:01, Thomas Gleixner <tglx@linutronix.de> wrote:
>
> They are only used in fpstate_init() and there is no point to have them in
> a header just to make reading the code harder.

<snip>

> -static inline void fpstate_init_xstate(struct xregs_state *xsave)
> -{
> - /*
> - * XRSTORS requires these bits set in xcomp_bv, or it will
> - * trigger #GP:
> - */
> - xsave->header.xcomp_bv = XCOMP_BV_COMPACTED_FORMAT | xfeatures_mask_all;
> -}

static void __init setup_init_fpu_buf(void)
{
...

if (boot_cpu_has(X86_FEATURE_XSAVES))
init_fpstate.xsave.header.xcomp_bv = XCOMP_BV_COMPACTED_FORMAT |
xfeatures_mask_all;


But this line [1] can be exactly replaced with the inline function above. At
least, I don’t see consistency on the mainline.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/x86/kernel/fpu/xstate.c#n460

Thanks,
Chang

\
 
 \ /
  Last update: 2021-06-23 20:44    [W:0.348 / U:0.336 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site