Subject: Re: pte_update and 64-bit PTEs on PPC32?

From: Chris Friesen <[email-masked]>
Date: Wed, 06 Apr 2005 11:20:21 -0600

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