[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 5 May 2015 20:16:13 +0200
From: Ingo Molnar <mingo@...nel.org>
To: Dave Hansen <dave.hansen@...ux.intel.com>
Cc: linux-kernel@...r.kernel.org,
Andy Lutomirski <luto@...capital.net>,
Borislav Petkov <bp@...en8.de>,
Fenghua Yu <fenghua.yu@...el.com>,
"H. Peter Anvin" <hpa@...or.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Oleg Nesterov <oleg@...hat.com>,
Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH 084/208] x86/fpu: Rename xsave.header::xstate_bv to
'xfeatures'
* Dave Hansen <dave.hansen@...ux.intel.com> wrote:
> On 05/05/2015 10:49 AM, Ingo Molnar wrote:
> > 'xsave.header::xstate_bv' is a misnomer - what does 'bv' stand for?
>
> xstate_bv is what it is called in the SDM. [...]
So I'm not attached to the ::xfeatures name (we could name it
xstate_mask, etc.) - but xstate_bv? It's really nonsensical IMHO - and
I wanted it to be more obvious.
We could put the SDM name into a comment, next to the field
definition? Something like, if 'xfeatures' is too long:
struct xstate_header {
u64 xfeat; /* xstate components, SDM: XSTATE_BV */
u64 xfeat_comp; /* compacted xstate components, SDM: XCOMP_BV */
u64 reserved[6];
} __attribute__((packed));
or so? Then if you grep for 'XSTATE_BV', you'll immediately see that
it's called xfeat_comp.
> [...] I'd really like to see the nomenclature match the SDM where
> it's sensible because it says lots of things like:
>
> XSAVES does not write to any parts of the XSAVE header other
> than the XSTATE_BV and XCOMP_BV fields.
>
> It's nice to have code that does:
>
> ...->xstate_bv
>
> to match up with that documentation IMNHO.
Where the SDM uses sensible names I'm all for that - but IMHO this is
not such a case.
Thanks,
Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists