direct-io.hg

changeset 6155:d47c61f72572

merge
author smh22@firebug.cl.cam.ac.uk
date Sun Aug 14 20:34:41 2005 +0000 (2005-08-14)
parents e59f04598620 0daaf1e5ca36
children 22ce5159334e
files linux-2.6-xen-sparse/drivers/xen/netback/common.h linux-2.6-xen-sparse/drivers/xen/netback/interface.c linux-2.6-xen-sparse/drivers/xen/netback/netback.c linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c linux-2.6-xen-sparse/include/asm-xen/asm-i386/page.h tools/python/xen/lowlevel/xu/xu.c tools/python/xen/xend/XendDomainInfo.py tools/python/xen/xend/server/netif.py xen/common/grant_table.c xen/include/public/io/domain_controller.h
line diff
     5.1 --- a/linux-2.6-xen-sparse/include/asm-xen/asm-i386/page.h	Sun Aug 14 20:34:13 2005 +0000
     5.2 +++ b/linux-2.6-xen-sparse/include/asm-xen/asm-i386/page.h	Sun Aug 14 20:34:41 2005 +0000
     5.3 @@ -63,15 +63,20 @@
     5.4  extern unsigned int *phys_to_machine_mapping;
     5.5  #define pfn_to_mfn(_pfn) ((unsigned long)(phys_to_machine_mapping[(_pfn)]))
     5.6  #define mfn_to_pfn(_mfn) ((unsigned long)(machine_to_phys_mapping[(_mfn)]))
     5.7 -static inline unsigned long phys_to_machine(unsigned long phys)
     5.8 +#ifdef CONFIG_X86_PAE
     5.9 +typedef unsigned long long physaddr_t;
    5.10 +#else
    5.11 +typedef unsigned long physaddr_t;
    5.12 +#endif
    5.13 +static inline physaddr_t phys_to_machine(physaddr_t phys)
    5.14  {
    5.15 -	unsigned long machine = pfn_to_mfn(phys >> PAGE_SHIFT);
    5.16 +	physaddr_t machine = pfn_to_mfn(phys >> PAGE_SHIFT);
    5.17  	machine = (machine << PAGE_SHIFT) | (phys & ~PAGE_MASK);
    5.18  	return machine;
    5.19  }
    5.20 -static inline unsigned long machine_to_phys(unsigned long machine)
    5.21 +static inline physaddr_t machine_to_phys(physaddr_t machine)
    5.22  {
    5.23 -	unsigned long phys = mfn_to_pfn(machine >> PAGE_SHIFT);
    5.24 +	physaddr_t phys = mfn_to_pfn(machine >> PAGE_SHIFT);
    5.25  	phys = (phys << PAGE_SHIFT) | (machine & ~PAGE_MASK);
    5.26  	return phys;
    5.27  }
    5.28 @@ -86,8 +91,9 @@ typedef struct { unsigned long pte_low, 
    5.29  typedef struct { unsigned long long pmd; } pmd_t;
    5.30  typedef struct { unsigned long long pgd; } pgd_t;
    5.31  typedef struct { unsigned long long pgprot; } pgprot_t;
    5.32 -#define __pte(x) ({ unsigned long long _x = (x); \
    5.33 -    (((_x)&1) ? ((pte_t) {phys_to_machine(_x)}) : ((pte_t) {(_x)})); })
    5.34 +#define __pte(x) ({ unsigned long long _x = (x);        \
    5.35 +    if (_x & 1) _x = phys_to_machine(_x);               \
    5.36 +    ((pte_t) {(unsigned long)(_x), (unsigned long)(_x>>32)}); })
    5.37  #define __pgd(x) ({ unsigned long long _x = (x); \
    5.38      (((_x)&1) ? ((pgd_t) {phys_to_machine(_x)}) : ((pgd_t) {(_x)})); })
    5.39  #define __pmd(x) ({ unsigned long long _x = (x); \