From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: In-Reply-To: <5b292a628bb78373928a0e1626086707@freescale.com> References: <5b292a628bb78373928a0e1626086707@freescale.com> Mime-Version: 1.0 (Apple Message framework v619.2) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <05453aab0716da8fcade8f835418d680@freescale.com> From: Kumar Gala Date: Wed, 6 Apr 2005 16:33:14 -0500 To: Paul Mackerras Cc: linuxppc-dev list , linux-ppc-embedded 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: , Here is a version that works if CONFIG_PTE_64BIT is defined. If we like this, I can simplify the pte_update so we dont need the (unsigned long)(p+1) - 4) trick anymore. Let me know. - kumar #ifdef CONFIG_PTE_64BIT static inline unsigned long long pte_update(pte_t *p, unsigned long clr, unsigned long set) { unsigned long long old; unsigned long tmp; __asm__ __volatile__("\ 1: lwarx %L0,0,%4\n\ lwzx %0,0,%3\n\ andc %1,%L0,%5\n\ or %1,%1,%6\n\ stwcx. %1,0,%4\n\ bne- 1b" : "=&r" (old), "=&r" (tmp), "=m" (*p) : "r" (p), "r" ((unsigned long)(p) + 4), "r" (clr), "r" (set), "m" (*p) : "cc" ); return old; } #else ... code that exists today ... #endif