aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>2005-06-28 08:12:39 +0000
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>2005-06-28 08:12:39 +0000
commit30055d0aafccbd27ef93a3bcb94b7828d5fe8b8d (patch)
treebcf6d9054701de826c56b9f28fef509a8137aa6d
parent610a270683cbeb62dafce25ed4cfb3414e52ca85 (diff)
downloadxen-30055d0aafccbd27ef93a3bcb94b7828d5fe8b8d.tar.gz
xen-30055d0aafccbd27ef93a3bcb94b7828d5fe8b8d.tar.bz2
xen-30055d0aafccbd27ef93a3bcb94b7828d5fe8b8d.zip
bitkeeper revision 1.1760.1.6 (42c10677TIdwirEem_EpnMFWS1MTtw)
Fix build on gcc <= 3.2. Signed-off-by: Keir Fraser <keir@xensource.com>
-rw-r--r--xen/common/grant_table.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/xen/common/grant_table.c b/xen/common/grant_table.c
index 2afdbca0bf..b0999f4194 100644
--- a/xen/common/grant_table.c
+++ b/xen/common/grant_table.c
@@ -32,6 +32,12 @@
#include <xen/mm.h>
#include <acm/acm_hooks.h>
+#if defined(CONFIG_X86_64)
+#define GRANT_PTE_FLAGS (_PAGE_PRESENT|_PAGE_ACCESSED|_PAGE_DIRTY|_PAGE_USER)
+#else
+#define GRANT_PTE_FLAGS (_PAGE_PRESENT|_PAGE_ACCESSED|_PAGE_DIRTY)
+#endif
+
#define PIN_FAIL(_lbl, _rc, _f, _a...) \
do { \
DPRINTK( _f, ## _a ); \
@@ -258,11 +264,7 @@ __gnttab_activate_grant_ref(
{
/* Write update into the pagetable. */
l1_pgentry_t pte;
- pte = l1e_from_pfn(frame, _PAGE_PRESENT | _PAGE_ACCESSED | _PAGE_DIRTY
-#if defined(__x86_64__)
- | _PAGE_USER
-#endif
- );
+ pte = l1e_from_pfn(frame, GRANT_PTE_FLAGS);
if ( !(dev_hst_ro_flags & GNTMAP_readonly) )
l1e_add_flags(pte,_PAGE_RW);
rc = update_grant_va_mapping( host_virt_addr, pte,