On Apr 6, 2005, at 12:20 PM, Chris Friesen wrote: > 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().
Thanks, realized this after a bit more thought, and some discussion on lkml :) Guess, I need to write a 64-bit pte version of pte_update, foo! - kumar