[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ACC99D77-BA38-4E13-B6EF-44C9F915C442@intel.com>
Date: Wed, 23 Jun 2021 18:43:07 +0000
From: "Bae, Chang Seok" <chang.seok.bae@...el.com>
To: Thomas Gleixner <tglx@...utronix.de>
CC: LKML <linux-kernel@...r.kernel.org>,
Andy Lutomirski <luto@...nel.org>,
Dave Hansen <dave.hansen@...ux.intel.com>,
"Yu, Fenghua" <fenghua.yu@...el.com>,
"Luck, Tony" <tony.luck@...el.com>,
"Yu, Yu-cheng" <yu-cheng.yu@...el.com>,
Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
Borislav Petkov <bp@...e.de>,
Peter Zijlstra <peterz@...radead.org>,
"Kan Liang" <kan.liang@...ux.intel.com>,
Megha Dey <megha.dey@...ux.intel.com>,
"Sang, Oliver" <oliver.sang@...el.com>
Subject: Re: [patch V4 07/65] x86/fpu: Move inlines where they belong
On Jun 23, 2021, at 05:01, Thomas Gleixner <tglx@...utronix.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
Powered by blists - more mailing lists