LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Venki Pallipadi <venkatesh.pallipadi@intel.com>
Cc: Ingo Molnar <mingo@elte.hu>, Andi Kleen <andi@firstfloor.org>,
tglx@linutronix.de, linux-kernel@vger.kernel.org
Subject: Re: Folding _PAGE_PWT into _PAGE_PCD (was Re: unify pagetable accessors patch causes double fault II)
Date: Tue, 15 Jan 2008 12:45:35 -0800 [thread overview]
Message-ID: <478D1B6F.8020003@goop.org> (raw)
In-Reply-To: <20080115203018.GA19746@linux-os.sc.intel.com>
Venki Pallipadi wrote:
> On Tue, Jan 15, 2008 at 09:16:50AM -0800, Jeremy Fitzhardinge wrote:
>
>> Ingo Molnar wrote:
>>
>>> -#define _PAGE_PRESENT (_AC(1, UL)<<_PAGE_BIT_PRESENT)
>>> -#define _PAGE_RW (_AC(1, UL)<<_PAGE_BIT_RW)
>>> -#define _PAGE_USER (_AC(1, UL)<<_PAGE_BIT_USER)
>>> -#define _PAGE_PWT (_AC(1, UL)<<_PAGE_BIT_PWT)
>>> -#define _PAGE_PCD ((_AC(1, UL)<<_PAGE_BIT_PCD) | _PAGE_PWT)
>>>
>>>
>> BTW, I just noticed that _PAGE_PWT has been folded into _PAGE_PCD. This
>> seems like a really bad idea to me, since it breaks the rule that
>> _PAGE_X == 1 << _PAGE_BIT_X. I can't think of a specific place where
>> this would cause problems, but this kind of non-uniformity always ends
>> up biting someone in the arse.
>>
>> I think having a specific _PAGE_NOCACHE which combines these bits is a
>> better approach.
>>
>> J
>>
>
> How about the patch below. It defines new _PAGE_UC. One concern is drivers
> continuing to use _PAGE_PCD and getting wrong attributes. May be we need to
> rename _PAGE_PCD to catch those errors as well?
>
Sure, looks fine. I would have said that _NOCACHE matches current usage
better, but if it makes more sense to have _UC and _WC then that's fine
with me.
I guess renaming _PAGE_BIT_PCD to _PAGE_BIT__PCD and the corresponding
_PAGE__PCD might be reasonable if you think there's a chance of new
misusers appearing (I guess something like out of tree DRI/proprietary
patches are a source of that).
J
next prev parent reply other threads:[~2008-01-15 20:46 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20080114094814.GA28300@basil.nowhere.org>
2008-01-14 12:56 ` unify pagetable accessors patch causes double fault II Andi Kleen
2008-01-14 13:06 ` Ingo Molnar
2008-01-14 13:58 ` Andi Kleen
2008-01-14 16:44 ` Jeremy Fitzhardinge
2008-01-14 16:56 ` Ingo Molnar
2008-01-14 17:08 ` Andi Kleen
2008-01-14 17:18 ` unify pagetable accessors patch causes double fault III Andi Kleen
2008-01-14 19:00 ` Ingo Molnar
2008-01-14 19:54 ` Jeremy Fitzhardinge
2008-01-14 20:15 ` Andi Kleen
2008-01-14 19:52 ` unify pagetable accessors patch causes double fault II Jeremy Fitzhardinge
2008-01-14 22:03 ` Jeremy Fitzhardinge
2008-01-14 22:23 ` Andi Kleen
2008-01-14 22:46 ` Jeremy Fitzhardinge
2008-01-15 1:05 ` Andi Kleen
2008-01-15 1:32 ` Jeremy Fitzhardinge
2008-01-15 1:38 ` Andi Kleen
2008-01-15 21:03 ` [patch] x86: lfence fix Ingo Molnar
2008-01-16 0:44 ` Andi Kleen
2008-01-15 12:55 ` unify pagetable accessors patch causes double fault II Ingo Molnar
2008-01-15 16:53 ` Andi Kleen
2008-01-15 13:53 ` Ingo Molnar
2008-01-15 17:16 ` Folding _PAGE_PWT into _PAGE_PCD (was Re: unify pagetable accessors patch causes double fault II) Jeremy Fitzhardinge
2008-01-15 17:23 ` Andi Kleen
2008-01-15 17:32 ` Jeremy Fitzhardinge
2008-01-15 17:39 ` Andi Kleen
2008-01-15 20:30 ` Venki Pallipadi
2008-01-15 20:45 ` Jeremy Fitzhardinge [this message]
2008-01-15 17:36 ` unify pagetable accessors patch causes double fault II Andi Kleen
2008-01-15 19:43 ` Jeremy Fitzhardinge
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=478D1B6F.8020003@goop.org \
--to=jeremy@goop.org \
--cc=andi@firstfloor.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
--cc=venkatesh.pallipadi@intel.com \
--subject='Re: Folding _PAGE_PWT into _PAGE_PCD (was Re: unify pagetable accessors patch causes double fault II)' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).