[lkml]   [2001]   [Jul]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: pte_val(*pte) as lvalue
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)

if (pat_index & 2)
p |= _PAGE_PCD;

if (pat_index & 1)
p |= _PAGE_PWT;

pte->pte_high = 0;
pte->pte_low = p;
pte_val(*pte) = p;

Timur Tabi
Interactive Silicon

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:56    [W:0.045 / U:0.504 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site