[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YNDTpqYqVpsHRxtw@zn.tnic>
Date: Mon, 21 Jun 2021 20:00:06 +0200
From: Borislav Petkov <bp@...e.de>
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>,
Fenghua Yu <fenghua.yu@...el.com>,
Tony Luck <tony.luck@...el.com>,
Yu-cheng Yu <yu-cheng.yu@...el.com>,
Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
Peter Zijlstra <peterz@...radead.org>,
Kan Liang <kan.liang@...ux.intel.com>
Subject: Re: [patch V3 27/66] x86/fpu: Rename copy_xregs_to_kernel() and
copy_kernel_to_xregs()
On Fri, Jun 18, 2021 at 04:18:50PM +0200, Thomas Gleixner wrote:
> The function names for xsave[s]/xrstor[s] operations are horribly named and
> a permanent source of confusion.
>
> Rename:
> copy_xregs_to_kernel() to os_xsave()
> copy_kernel_to_xregs() to os_xrstor()
>
> These are truly low level wrappers around the actual instructions
> XSAVE[OPT]/XRSTOR and XSAVES/XRSTORS with the twist that the selection
> based on the available CPU features happens with an alternative to avoid
> conditionals all over the place and to provide the best performance for hot
> pathes.
"paths".
You need more elisp magic here. :)
> @@ -385,7 +390,7 @@ extern int copy_fpregs_to_fpstate(struct
> static inline void __copy_kernel_to_fpregs(union fpregs_state *fpstate, u64 mask)
> {
> if (use_xsave()) {
> - copy_kernel_to_xregs(&fpstate->xsave, mask);
> + os_xrstor(&fpstate->xsave, mask);
Yeah, this reads funny now:
if use xsave, then xrstor.
and then later
if use xsave, then xsave.
where latter makes perfect sense but former makes you stop and think for
a bit.
:-)
Regardless, it is still move in the right direction.
Reviewed-by: Borislav Petkov <bp@...e.de>
--
Regards/Gruss,
Boris.
SUSE Software Solutions Germany GmbH, GF: Felix Imendörffer, HRB 36809, AG Nürnberg
Powered by blists - more mailing lists