pte_update and 64-bit PTEs on PPC32?

Chris Friesen cfriesen at nortel.com
Thu Apr 7 03:20:21 EST 2005


Kumar Gala wrote:

> static inline pte_t ptep_get_and_clear(struct mm_struct *mm, unsigned 
> long addr,
>                                        pte_t *ptep)
> {
>         pte_t tmp = *ptep;
>         pte_update(ptep, ~_PAGE_HASHPTE, 0);
>         return tmp;
> }

Doesn't work.  The update and storing of the old value must be atomic. 
The value of the pte can change between storing the tmp value and 
calling pte_update().

Chris




More information about the Linuxppc-embedded mailing list