aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/mm
diff options
context:
space:
mode:
authorPekka Enberg <penberg@cs.helsinki.fi>2009-03-05 07:55:07 -0500
committerIngo Molnar <mingo@elte.hu>2009-03-05 08:17:18 -0500
commite53fb04fce6d246ebed755b904ed1b0b814a754c (patch)
treecdb45ab5d2bd8c076868038e76c9622f229e97cb /arch/x86/mm
parent298af9d89f3f5292e81a0a00f729c415adc4d8fb (diff)
x86: unify kernel_physical_mapping_init() function signatures
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>
Diffstat (limited to 'arch/x86/mm')
-rw-r--r--arch/x86/mm/init.c13
-rw-r--r--arch/x86/mm/init_32.c13
-rw-r--r--arch/x86/mm/init_64.c2
3 files changed, 14 insertions, 14 deletions
diff --git a/arch/x86/mm/init.c b/arch/x86/mm/init.c
index 5bbdfe7459d2..6475693a81ab 100644
--- a/arch/x86/mm/init.c
+++ b/arch/x86/mm/init.c
@@ -11,17 +11,12 @@
11 11
12#ifdef CONFIG_X86_32 12#ifdef CONFIG_X86_32
13extern void __init early_ioremap_page_table_range_init(void); 13extern void __init early_ioremap_page_table_range_init(void);
14extern void __init kernel_physical_mapping_init(unsigned long start_pfn,
15 unsigned long end_pfn,
16 int use_pse);
17#endif 14#endif
18 15
19#ifdef CONFIG_X86_64 16extern unsigned long __init
20extern unsigned long __meminit
21kernel_physical_mapping_init(unsigned long start, 17kernel_physical_mapping_init(unsigned long start,
22 unsigned long end, 18 unsigned long end,
23 unsigned long page_size_mask); 19 unsigned long page_size_mask);
24#endif
25 20
26unsigned long __initdata e820_table_start; 21unsigned long __initdata e820_table_start;
27unsigned long __meminitdata e820_table_end; 22unsigned long __meminitdata e820_table_end;
@@ -301,10 +296,8 @@ unsigned long __init_refok init_memory_mapping(unsigned long start,
301 296
302#ifdef CONFIG_X86_32 297#ifdef CONFIG_X86_32
303 for (i = 0; i < nr_range; i++) 298 for (i = 0; i < nr_range; i++)
304 kernel_physical_mapping_init( 299 kernel_physical_mapping_init(mr[i].start, mr[i].end,
305 mr[i].start >> PAGE_SHIFT, 300 mr[i].page_size_mask);
306 mr[i].end >> PAGE_SHIFT,
307 mr[i].page_size_mask == (1<<PG_LEVEL_2M));
308 ret = end; 301 ret = end;
309#else /* CONFIG_X86_64 */ 302#else /* CONFIG_X86_64 */
310 for (i = 0; i < nr_range; i++) 303 for (i = 0; i < nr_range; i++)
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;
diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c
index a1d33c58b497..f441ae316312 100644
--- a/arch/x86/mm/init_64.c
+++ b/arch/x86/mm/init_64.c
@@ -539,7 +539,7 @@ phys_pud_update(pgd_t *pgd, unsigned long addr, unsigned long end,
539 return phys_pud_init(pud, addr, end, page_size_mask); 539 return phys_pud_init(pud, addr, end, page_size_mask);
540} 540}
541 541
542unsigned long __meminit 542unsigned long __init
543kernel_physical_mapping_init(unsigned long start, 543kernel_physical_mapping_init(unsigned long start,
544 unsigned long end, 544 unsigned long end,
545 unsigned long page_size_mask) 545 unsigned long page_size_mask)