aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/mm/init_32.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/mm/init_32.c')
-rw-r--r--arch/x86/mm/init_32.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c
index e9df0d9cdeb6..5ca9c6c3439e 100644
--- a/arch/x86/mm/init_32.c
+++ b/arch/x86/mm/init_32.c
@@ -223,10 +223,13 @@ static inline int is_kernel_text(unsigned long addr)
223 * of max_low_pfn pages, by creating page tables starting from address 223 * of max_low_pfn pages, by creating page tables starting from address
224 * PAGE_OFFSET: 224 * PAGE_OFFSET:
225 */ 225 */
226void __init kernel_physical_mapping_init(unsigned long start_pfn, 226unsigned long __init
227 unsigned long end_pfn, 227kernel_physical_mapping_init(unsigned long start,
228 int use_pse) 228 unsigned long end,
229 unsigned long page_size_mask)
229{ 230{
231 int use_pse = page_size_mask == (1<<PG_LEVEL_2M);
232 unsigned long start_pfn, end_pfn;
230 pgd_t *pgd_base = swapper_pg_dir; 233 pgd_t *pgd_base = swapper_pg_dir;
231 int pgd_idx, pmd_idx, pte_ofs; 234 int pgd_idx, pmd_idx, pte_ofs;
232 unsigned long pfn; 235 unsigned long pfn;
@@ -236,6 +239,9 @@ void __init kernel_physical_mapping_init(unsigned long start_pfn,
236 unsigned pages_2m, pages_4k; 239 unsigned pages_2m, pages_4k;
237 int mapping_iter; 240 int mapping_iter;
238 241
242 start_pfn = start >> PAGE_SHIFT;
243 end_pfn = end >> PAGE_SHIFT;
244
239 /* 245 /*
240 * First iteration will setup identity mapping using large/small pages 246 * First iteration will setup identity mapping using large/small pages
241 * based on use_pse, with other attributes same as set by 247 * based on use_pse, with other attributes same as set by
@@ -350,6 +356,7 @@ repeat:
350 mapping_iter = 2; 356 mapping_iter = 2;
351 goto repeat; 357 goto repeat;
352 } 358 }
359 return 0;
353} 360}
354 361
355pte_t *kmap_pte; 362pte_t *kmap_pte;