From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from zcars04f.nortelnetworks.com (zcars04f.nortelnetworks.com [47.129.242.57]) by ozlabs.org (Postfix) with ESMTP id 23EFC67A33 for ; Thu, 7 Apr 2005 03:20:29 +1000 (EST) Message-ID: <42541A55.1030606@nortel.com> Date: Wed, 06 Apr 2005 11:20:21 -0600 From: Chris Friesen MIME-Version: 1.0 To: Kumar Gala References: <1112770418.9567.137.camel@gaston> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed 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: , 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