From: Timur Tabi <ttabi@interactivesi.com>
To: linux-kernel@vger.kernel.org
Subject: Re: pte_val(*pte) as lvalue
Date: Tue, 03 Jul 2001 13:50:05 -0500 [thread overview]
Message-ID: <3B4213DD.50005@interactivesi.com> (raw)
In-Reply-To: <9LUWoC.A.W3G.sIQQ7@dinero.interactivesi.com.suse.lists.linux.kernel> <oupelryykh5.fsf@pigdrop.muc.suse.de> <LScPx.A.XAF.H_gQ7@dinero.interactivesi.com> <20010703194300.A31954@flint.arm.linux.org.uk>
Russell King wrote:
>Can I ask what the nature of the PTE modification is, and where you
>are making this modification?
>
I've written a hack which enables PAT (Page Address Translation) for a
particular page:
void set_pte_pat(pte_t *pte, unsigned long pat_index)
{
unsigned long p = pte_val(*pte);
p &= ~(_PAGE_PROTNONE | _PAGE_PCD | _PAGE_PWT); // zero-out the
relevant bits
if (pat_index & 4)
p |= _PAGE_PROTNONE;
if (pat_index & 2)
p |= _PAGE_PCD;
if (pat_index & 1)
p |= _PAGE_PWT;
#if CONFIG_X86_PAE
pte->pte_high = 0;
pte->pte_low = p;
#else
pte_val(*pte) = p;
#endif
--
Timur Tabi
Interactive Silicon
next prev parent reply other threads:[~2001-07-03 18:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <9LUWoC.A.W3G.sIQQ7@dinero.interactivesi.com.suse.lists.linux.kernel>
2001-07-02 23:33 ` pte_val(*pte) as lvalue Andi Kleen
2001-07-03 19:55 ` eCos Matthew M. DeLoera
2001-07-03 18:32 ` pte_val(*pte) as lvalue Timur Tabi
2001-07-03 18:43 ` Russell King
2001-07-03 18:50 ` Timur Tabi [this message]
2001-07-03 19:11 ` Russell King
2001-07-02 23:22 Timur Tabi
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=3B4213DD.50005@interactivesi.com \
--to=ttabi@interactivesi.com \
--cc=linux-kernel@vger.kernel.org \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.