Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1762755AbbEESQV (ORCPT ); Tue, 5 May 2015 14:16:21 -0400 Received: from mail-wi0-f169.google.com ([209.85.212.169]:38118 "EHLO mail-wi0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756492AbbEESQS (ORCPT ); Tue, 5 May 2015 14:16:18 -0400 Date: Tue, 5 May 2015 20:16:13 +0200 From: Ingo Molnar To: Dave Hansen Cc: linux-kernel@vger.kernel.org, Andy Lutomirski , Borislav Petkov , Fenghua Yu , "H. Peter Anvin" , Linus Torvalds , Oleg Nesterov , Thomas Gleixner Subject: Re: [PATCH 084/208] x86/fpu: Rename xsave.header::xstate_bv to 'xfeatures' Message-ID: <20150505181613.GA28562@gmail.com> References: <1430848300-27877-1-git-send-email-mingo@kernel.org> <1430848300-27877-6-git-send-email-mingo@kernel.org> <554904A6.8040503@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <554904A6.8040503@linux.intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1536 Lines: 47 * Dave Hansen 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/