]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/mini-os.git/commitdiff
minios: fix p2m on x86
authorKeir Fraser <keir.fraser@citrix.com>
Mon, 9 Feb 2009 14:22:07 +0000 (14:22 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Mon, 9 Feb 2009 14:22:07 +0000 (14:22 +0000)
15675:bf85b467ee89 Fixed p2m on x86_64, but instead broke it on x86.

Signed-off-by: Samuel Thibault <samuel.thibaut@ens-lyon.org>
arch/x86/mm.c

index 07b6da8d1e050241122cd38191a3e8eaf8fc4a84..a0e2ae68bc9423e174096b608d29e33a07294c28 100644 (file)
@@ -550,9 +550,15 @@ static void clear_bootstrap(void)
 
 void arch_init_p2m(unsigned long max_pfn)
 {
+#ifdef __x86_64__
 #define L1_P2M_SHIFT    9
 #define L2_P2M_SHIFT    18    
 #define L3_P2M_SHIFT    27    
+#else
+#define L1_P2M_SHIFT    10
+#define L2_P2M_SHIFT    20    
+#define L3_P2M_SHIFT    30    
+#endif
 #define L1_P2M_ENTRIES  (1 << L1_P2M_SHIFT)    
 #define L2_P2M_ENTRIES  (1 << (L2_P2M_SHIFT - L1_P2M_SHIFT))    
 #define L3_P2M_ENTRIES  (1 << (L3_P2M_SHIFT - L2_P2M_SHIFT))