direct-io.hg

changeset 5594:c2b00e4bfb8f

bitkeeper revision 1.1760.1.6 (42c10677TIdwirEem_EpnMFWS1MTtw)

Fix build on gcc <= 3.2.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Tue Jun 28 08:12:39 2005 +0000 (2005-06-28)
parents 384059d92d3b
children 63c1bb85fcea
files xen/common/grant_table.c
line diff
     1.1 --- a/xen/common/grant_table.c	Tue Jun 28 08:09:04 2005 +0000
     1.2 +++ b/xen/common/grant_table.c	Tue Jun 28 08:12:39 2005 +0000
     1.3 @@ -32,6 +32,12 @@
     1.4  #include <xen/mm.h>
     1.5  #include <acm/acm_hooks.h>
     1.6  
     1.7 +#if defined(CONFIG_X86_64)
     1.8 +#define GRANT_PTE_FLAGS (_PAGE_PRESENT|_PAGE_ACCESSED|_PAGE_DIRTY|_PAGE_USER)
     1.9 +#else
    1.10 +#define GRANT_PTE_FLAGS (_PAGE_PRESENT|_PAGE_ACCESSED|_PAGE_DIRTY)
    1.11 +#endif
    1.12 +
    1.13  #define PIN_FAIL(_lbl, _rc, _f, _a...)   \
    1.14      do {                           \
    1.15          DPRINTK( _f, ## _a );      \
    1.16 @@ -258,11 +264,7 @@ static int
    1.17      {
    1.18          /* Write update into the pagetable. */
    1.19          l1_pgentry_t pte;
    1.20 -        pte = l1e_from_pfn(frame, _PAGE_PRESENT | _PAGE_ACCESSED | _PAGE_DIRTY
    1.21 -#if defined(__x86_64__)
    1.22 -            | _PAGE_USER               
    1.23 -#endif
    1.24 -            );
    1.25 +        pte = l1e_from_pfn(frame, GRANT_PTE_FLAGS);
    1.26          if ( !(dev_hst_ro_flags & GNTMAP_readonly) )
    1.27              l1e_add_flags(pte,_PAGE_RW);
    1.28          rc = update_grant_va_mapping( host_virt_addr, pte,