[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <49CFE7E0.80500@zytor.com>
Date: Sun, 29 Mar 2009 14:28:00 -0700
From: "H. Peter Anvin" <hpa@...or.com>
To: Joe Damato <ice799@...il.com>
CC: linux-x86_64@...r.kernel.org, w@....eu, mingo@...e.hu,
jeremy@...p.org, linux-newbie@...r.kernel.org,
kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] x86: Add getter/setter static inlines for x86 descriptors
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 <ice799@...il.com>
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@...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