From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: In-Reply-To: <42541A55.1030606@nortel.com> References: <42541A55.1030606@nortel.com> Mime-Version: 1.0 (Apple Message framework v619.2) Content-Type: text/plain; charset=ISO-8859-1; format=flowed Message-Id: <5b292a628bb78373928a0e1626086707@freescale.com> From: Kumar Gala Date: Wed, 6 Apr 2005 12:58:53 -0500 To: "Chris Friesen" Cc: linux-ppc-embedded list , Paul Mackerras , linuxppc-dev list Subject: Re: pte_update and 64-bit PTEs on PPC32? List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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, > >=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 pte_t *ptep) > > { > >=A0=A0=A0=A0=A0=A0=A0=A0 pte_t tmp =3D *ptep; > >=A0=A0=A0=A0=A0=A0=A0=A0 pte_update(ptep, ~_PAGE_HASHPTE, 0); > >=A0=A0=A0=A0=A0=A0=A0=A0 return tmp; > > } > > Doesn't work.=A0 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=20= lkml :) Guess, I need to write a 64-bit pte version of pte_update, foo! - kumar