Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754405AbZC2Vcd (ORCPT ); Sun, 29 Mar 2009 17:32:33 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751119AbZC2VcP (ORCPT ); Sun, 29 Mar 2009 17:32:15 -0400 Received: from terminus.zytor.com ([198.137.202.10]:56979 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751085AbZC2VcO (ORCPT ); Sun, 29 Mar 2009 17:32:14 -0400 Message-ID: <49CFE7E0.80500@zytor.com> Date: Sun, 29 Mar 2009 14:28:00 -0700 From: "H. Peter Anvin" User-Agent: Thunderbird 2.0.0.14 (X11/20080501) MIME-Version: 1.0 To: Joe Damato CC: linux-x86_64@vger.kernel.org, w@1wt.eu, mingo@elte.hu, jeremy@goop.org, linux-newbie@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] x86: Add getter/setter static inlines for x86 descriptors References: <76c37743d20e5737eadc747cbdddbc2beb11f074.1238361501.git.ice799@gmail.com> In-Reply-To: <76c37743d20e5737eadc747cbdddbc2beb11f074.1238361501.git.ice799@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 995 Lines: 28 Joe Damato wrote: > Static inline getters/setters have been provided to encourage consumers not to touch the internals of 32bit x86 descriptors directly. > > Signed-off-by: Joe Damato Okay, what is the motivation for this? This is a serious question. The x86 descriptors are so complex that it's not clear to me that this restriction makes the code any more clear. Especially not with things like: - cpu->arch.gdt[i].b |= 0x00000100; + desc_set_hi(tmp, desc_get_hi(tmp) | 0x00000100); This isn't an improvement. If you're doing to so something like this, you need to actually implement the *intent* here. -hpa -- H. Peter Anvin, Intel Open Source Technology Center I work for Intel. I don't speak on their behalf. -- 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/