Impact: cleanup
In preparation for moving the function declaration to a header file,
unify 32-bit and 64-bit signatures.
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Yinghai Lu <yinghai@kernel.org>
LKML-Reference: <
1236257708-27269-16-git-send-email-penberg@cs.helsinki.fi>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
#ifdef CONFIG_X86_32
extern void __init early_ioremap_page_table_range_init(void);
-extern void __init kernel_physical_mapping_init(unsigned long start_pfn,
- unsigned long end_pfn,
- int use_pse);
#endif
-#ifdef CONFIG_X86_64
-extern unsigned long __meminit
+extern unsigned long __init
kernel_physical_mapping_init(unsigned long start,
unsigned long end,
unsigned long page_size_mask);
-#endif
unsigned long __initdata e820_table_start;
unsigned long __meminitdata e820_table_end;
#ifdef CONFIG_X86_32
for (i = 0; i < nr_range; i++)
- kernel_physical_mapping_init(
- mr[i].start >> PAGE_SHIFT,
- mr[i].end >> PAGE_SHIFT,
- mr[i].page_size_mask == (1<<PG_LEVEL_2M));
+ kernel_physical_mapping_init(mr[i].start, mr[i].end,
+ mr[i].page_size_mask);
ret = end;
#else /* CONFIG_X86_64 */
for (i = 0; i < nr_range; i++)
* of max_low_pfn pages, by creating page tables starting from address
* PAGE_OFFSET:
*/
-void __init kernel_physical_mapping_init(unsigned long start_pfn,
- unsigned long end_pfn,
- int use_pse)
+unsigned long __init
+kernel_physical_mapping_init(unsigned long start,
+ unsigned long end,
+ unsigned long page_size_mask)
{
+ int use_pse = page_size_mask == (1<<PG_LEVEL_2M);
+ unsigned long start_pfn, end_pfn;
pgd_t *pgd_base = swapper_pg_dir;
int pgd_idx, pmd_idx, pte_ofs;
unsigned long pfn;
unsigned pages_2m, pages_4k;
int mapping_iter;
+ start_pfn = start >> PAGE_SHIFT;
+ end_pfn = end >> PAGE_SHIFT;
+
/*
* First iteration will setup identity mapping using large/small pages
* based on use_pse, with other attributes same as set by
mapping_iter = 2;
goto repeat;
}
+ return 0;
}
pte_t *kmap_pte;
return phys_pud_init(pud, addr, end, page_size_mask);
}
-unsigned long __meminit
+unsigned long __init
kernel_physical_mapping_init(unsigned long start,
unsigned long end,
unsigned long page_size_mask)