From 6e04c1bc6120acb86f762bbd58031906492011b7 Mon Sep 17 00:00:00 2001
From: Julien Grall <julien.grall@linaro.org>
Date: Tue, 14 Jan 2014 01:41:15 +0000
Subject: [PATCH 22/48] xen/netfront: Define PTE flags per architecture

PG_* flags doesn't exists on ARM. As this code is not executed on this platform
(every guests use auto-translate address), it's possible to define as 0 the
flags.
---
 sys/dev/xen/netfront/netfront.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/sys/dev/xen/netfront/netfront.c b/sys/dev/xen/netfront/netfront.c
index b249808..eeaef19 100644
--- a/sys/dev/xen/netfront/netfront.c
+++ b/sys/dev/xen/netfront/netfront.c
@@ -1365,9 +1365,14 @@ xennet_get_responses(struct netfront_info *np,
 				mcl = np->rx_mcl + pages_flipped;
 				mmu = np->rx_mmu + pages_flipped;
 
+#ifdef __arm__
+# define PTE_FLAGS	0
+#else
+# define PTE_FLAGS	(PG_RW | PG_V | PG_M | PG_A)
+#endif
 				MULTI_update_va_mapping(mcl, (u_long)vaddr,
-				    (((vm_paddr_t)mfn) << PAGE_SHIFT) | PG_RW |
-				    PG_V | PG_M | PG_A, 0);
+					(((vm_paddr_t)mfn) << PAGE_SHIFT) |
+					PTE_FLAGS, 0);
 				pfn = (uintptr_t)m->m_ext.ext_arg1;
 				mmu->ptr = ((vm_paddr_t)mfn << PAGE_SHIFT) |
 				    MMU_MACHPHYS_UPDATE;
-- 
2.1.0

