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

[Minios-devel] [PATCH v3 03/43] mini-os: replace the L1_PAGETABLE_SHIFT with PAGE_SHIFT



The L1_PAGETABLE_SHIFT is a confusing macro for arm.
Replace it with PAGE_SHIFT.

Reviewed-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>
Signed-off-by: Huang Shijie <shijie.huang@xxxxxxx>
---
 include/arm/arch_mm.h | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/include/arm/arch_mm.h b/include/arm/arch_mm.h
index 79d9e05..8ad0d2a 100644
--- a/include/arm/arch_mm.h
+++ b/include/arm/arch_mm.h
@@ -12,17 +12,15 @@ 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_PAGETABLE_SHIFT      12
-
 #define L1_PROT          0
 
 #define to_phys(x)                 (((paddr_t)(x)+physical_address_offset) & 
0xffffffff)
 #define to_virt(x)                 ((void *)(((x)-physical_address_offset) & 
0xffffffff))
 
-#define PFN_UP(x)    (unsigned long)(((x) + PAGE_SIZE-1) >> L1_PAGETABLE_SHIFT)
-#define PFN_DOWN(x)    (unsigned long)((x) >> L1_PAGETABLE_SHIFT)
-#define PFN_PHYS(x)    ((uint64_t)(x) << L1_PAGETABLE_SHIFT)
-#define PHYS_PFN(x)    (unsigned long)((x) >> L1_PAGETABLE_SHIFT)
+#define PFN_UP(x)                  (unsigned long)(((x) + PAGE_SIZE-1) >> 
PAGE_SHIFT)
+#define PFN_DOWN(x)                (unsigned long)((x) >> PAGE_SHIFT)
+#define PFN_PHYS(x)                ((uint64_t)(x) << PAGE_SHIFT)
+#define PHYS_PFN(x)                (unsigned long)((x) >> PAGE_SHIFT)
 
 #define virt_to_pfn(_virt)         (PFN_DOWN(to_phys(_virt)))
 #define virt_to_mfn(_virt)         (PFN_DOWN(to_phys(_virt)))
-- 
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®.