* Dave Hansen <dave.han...@linux.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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to