From: "Jan Beulich" Subject: [PATCH] linux/i386-pae: fix __pte_ma() Date: Wed, 05 Mar 2008 16:04:18 +0000 Message-ID: <47CED292.76E4.0078.0@novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org While at present there's no use of the macro that would suffer from its problem, this is a latent bug and should therefore be fixed (just like __pte() in the native kernel). As usual, written and tested on 2.6.25-rc3 and made apply to the 2.6.18 tree without further testing. Signed-off-by: Jan Beulich --- a/include/asm-i386/mach-xen/asm/maddr.h +++ b/include/asm-i386/mach-xen/asm/maddr.h @@ -154,6 +154,7 @@ #endif =20 #ifdef CONFIG_X86_PAE +#define __pte_ma(x) ((pte_t) { (x), (x) >> 32 } ) static inline pte_t pfn_pte_ma(unsigned long page_nr, pgprot_t pgprot) { pte_t pte; @@ -166,10 +166,9 @@ return pte; } #else +#define __pte_ma(x) ((pte_t) { (x) } ) #define pfn_pte_ma(pfn, prot) __pte_ma(((pfn) << PAGE_SHIFT) | pgprot_val= (prot)) #endif - -#define __pte_ma(x) ((pte_t) { (x) } ) =20 #else /* !CONFIG_XEN */ =20