[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Minios-devel] [PATCH v3 04/43] mini-os: rename the L1_PROT to DEF_PAGE_PROT



The L1_PROT is confusing, so rename it to DEF_PAGE_PROT.

Acked-by: Juergen Gross <jgross@xxxxxxxx>
Signed-off-by: Huang Shijie <shijie.huang@xxxxxxx>
---
 include/arm/arch_mm.h | 2 +-
 include/x86/arch_mm.h | 2 ++
 mm.c                  | 2 +-
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/include/arm/arch_mm.h b/include/arm/arch_mm.h
index 8ad0d2a..98b86af 100644
--- a/include/arm/arch_mm.h
+++ b/include/arm/arch_mm.h
@@ -12,7 +12,7 @@ extern uint32_t physical_address_offset;      /* Add this to 
a virtual address to get
 #define PAGE_SIZE        (1 << PAGE_SHIFT)
 #define PAGE_MASK       (~(PAGE_SIZE-1))
 
-#define L1_PROT          0
+#define DEF_PAGE_PROT     0
 
 #define to_phys(x)                 (((paddr_t)(x)+physical_address_offset) & 
0xffffffff)
 #define to_virt(x)                 ((void *)(((x)-physical_address_offset) & 
0xffffffff))
diff --git a/include/x86/arch_mm.h b/include/x86/arch_mm.h
index cbbeb21..c7354e0 100644
--- a/include/x86/arch_mm.h
+++ b/include/x86/arch_mm.h
@@ -184,6 +184,8 @@ typedef unsigned long pgentry_t;
 #define L4_PROT (_PAGE_PRESENT|_PAGE_RW|_PAGE_ACCESSED|_PAGE_DIRTY|_PAGE_USER)
 #endif /* __i386__ || __x86_64__ */
 
+#define DEF_PAGE_PROT L1_PROT
+
 /* flags for ioremap */
 #define IO_PROT (L1_PROT)
 #define IO_PROT_NOCACHE (L1_PROT | _PAGE_PCD)
diff --git a/mm.c b/mm.c
index 4880b5e..0a6cf5e 100644
--- a/mm.c
+++ b/mm.c
@@ -350,7 +350,7 @@ int free_physical_pages(xen_pfn_t *mfns, int n)
 
 int map_frame_rw(unsigned long addr, unsigned long mfn)
 {
-    return do_map_frames(addr, &mfn, 1, 1, 1, DOMID_SELF, NULL, L1_PROT);
+    return do_map_frames(addr, &mfn, 1, 1, 1, DOMID_SELF, NULL, DEF_PAGE_PROT);
 }
 
 #ifdef HAVE_LIBC
-- 
2.7.4


_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.