Skip to contentSkip to conversation

pte_val(*pte) as lvalue

DISCUSSION Timur Tabi 1 participant 1 message Jul 2, 2001

lore
Share & tools
lore

Timur Tabi

author
#0 lore raw

In my driver, I have this code:

    unsigned long p = pte_val(*pte);

    [set some bits in "p"]

    pte_val(*pte) = p;

This works fine in 2.2, and 2.4 when PAE support is disabled. When PAE support is enabled, it doesn't work, because the pte_val macro can no longer be an lvalue.

What is the accepted way to assign an integer to a pte that works in 2.2 and 2.4?

Signature · 2 lines
Timur Tabi - [email protected]
Interactive Silicon - http://www.interactivesi.com