ia64/linux-2.6.18-xen.hg

changeset 468:3e732c70d5e9

linux/i386-pae: fix __pte_ma()

While at present there's no use of the macro that would suffer from
this problem, this is a latent bug and should therefore be fixed (just
like __pte() in the native kernel).

Signed-off-by: Jan Beulich <jbeulich@novell.com>
author Keir Fraser <keir.fraser@citrix.com>
date Wed Mar 05 17:27:36 2008 +0000 (2008-03-05)
parents e56eb4ff7606
children 2da185c11693
files include/asm-i386/mach-xen/asm/maddr.h
line diff
     1.1 --- a/include/asm-i386/mach-xen/asm/maddr.h	Wed Mar 05 17:27:09 2008 +0000
     1.2 +++ b/include/asm-i386/mach-xen/asm/maddr.h	Wed Mar 05 17:27:36 2008 +0000
     1.3 @@ -154,6 +154,7 @@ static inline paddr_t pte_machine_to_phy
     1.4  #endif
     1.5  
     1.6  #ifdef CONFIG_X86_PAE
     1.7 +#define __pte_ma(x)	((pte_t) { (x), (x) >> 32 } )
     1.8  static inline pte_t pfn_pte_ma(unsigned long page_nr, pgprot_t pgprot)
     1.9  {
    1.10  	pte_t pte;
    1.11 @@ -166,11 +167,10 @@ static inline pte_t pfn_pte_ma(unsigned 
    1.12  	return pte;
    1.13  }
    1.14  #else
    1.15 +#define __pte_ma(x)	((pte_t) { (x) } )
    1.16  #define pfn_pte_ma(pfn, prot)	__pte_ma(((pfn) << PAGE_SHIFT) | pgprot_val(prot))
    1.17  #endif
    1.18  
    1.19 -#define __pte_ma(x)	((pte_t) { (x) } )
    1.20 -
    1.21  #else /* !CONFIG_XEN */
    1.22  
    1.23  #define pfn_to_mfn(pfn) (pfn)