Commit e7b37895 authored by Yinghai Lu's avatar Yinghai Lu Committed by Ingo Molnar

x86: move fix mapping page table range early

do that in init_memory_mapping

also remove one init_ohci1394_dma_on_all_controllers
Signed-off-by: default avatarYinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 042623bb
...@@ -611,11 +611,6 @@ void __init setup_arch(char **cmdline_p) ...@@ -611,11 +611,6 @@ void __init setup_arch(char **cmdline_p)
#ifdef CONFIG_X86_32 #ifdef CONFIG_X86_32
probe_roms(); probe_roms();
#else
# ifdef CONFIG_PROVIDE_OHCI1394_DMA_INIT
if (init_ohci1394_dma_early)
init_ohci1394_dma_on_all_controllers();
# endif
#endif #endif
/* after parse_early_param, so could debug it */ /* after parse_early_param, so could debug it */
...@@ -672,6 +667,15 @@ void __init setup_arch(char **cmdline_p) ...@@ -672,6 +667,15 @@ void __init setup_arch(char **cmdline_p)
/* max_pfn_mapped is updated here */ /* max_pfn_mapped is updated here */
max_pfn_mapped = init_memory_mapping(0, (max_low_pfn << PAGE_SHIFT)); max_pfn_mapped = init_memory_mapping(0, (max_low_pfn << PAGE_SHIFT));
/*
* NOTE: On x86-32, only from this point on, fixmaps are ready for use.
*/
#ifdef CONFIG_PROVIDE_OHCI1394_DMA_INIT
if (init_ohci1394_dma_early)
init_ohci1394_dma_on_all_controllers();
#endif
reserve_initrd(); reserve_initrd();
#ifdef CONFIG_X86_64 #ifdef CONFIG_X86_64
...@@ -739,15 +743,6 @@ void __init setup_arch(char **cmdline_p) ...@@ -739,15 +743,6 @@ void __init setup_arch(char **cmdline_p)
map_vsyscall(); map_vsyscall();
#endif #endif
/*
* NOTE: On x86-32, only from this point on, fixmaps are ready for use.
*/
#if defined(CONFIG_PROVIDE_OHCI1394_DMA_INIT) && defined(CONFIG_X86_32)
if (init_ohci1394_dma_early)
init_ohci1394_dma_on_all_controllers();
#endif
#ifdef CONFIG_X86_GENERICARCH #ifdef CONFIG_X86_GENERICARCH
generic_apic_probe(); generic_apic_probe();
#endif #endif
......
...@@ -442,13 +442,10 @@ void __init native_pagetable_setup_done(pgd_t *base) ...@@ -442,13 +442,10 @@ void __init native_pagetable_setup_done(pgd_t *base)
* be partially populated, and so it avoids stomping on any existing * be partially populated, and so it avoids stomping on any existing
* mappings. * mappings.
*/ */
static void __init pagetable_init(void) static void __init early_ioremap_page_table_range_init(pgd_t *pgd_base)
{ {
pgd_t *pgd_base = swapper_pg_dir;
unsigned long vaddr, end; unsigned long vaddr, end;
paravirt_pagetable_setup_start(pgd_base);
/* /*
* Fixed mappings, only the page table structure has to be * Fixed mappings, only the page table structure has to be
* created - mappings will be set by set_fixmap(): * created - mappings will be set by set_fixmap():
...@@ -458,6 +455,13 @@ static void __init pagetable_init(void) ...@@ -458,6 +455,13 @@ static void __init pagetable_init(void)
end = (FIXADDR_TOP + PMD_SIZE - 1) & PMD_MASK; end = (FIXADDR_TOP + PMD_SIZE - 1) & PMD_MASK;
page_table_range_init(vaddr, end, pgd_base); page_table_range_init(vaddr, end, pgd_base);
early_ioremap_reset(); early_ioremap_reset();
}
static void __init pagetable_init(void)
{
pgd_t *pgd_base = swapper_pg_dir;
paravirt_pagetable_setup_start(pgd_base);
permanent_kmaps_init(pgd_base); permanent_kmaps_init(pgd_base);
...@@ -788,6 +792,8 @@ unsigned long __init_refok init_memory_mapping(unsigned long start, ...@@ -788,6 +792,8 @@ unsigned long __init_refok init_memory_mapping(unsigned long start,
kernel_physical_mapping_init(pgd_base, start, end); kernel_physical_mapping_init(pgd_base, start, end);
early_ioremap_page_table_range_init(pgd_base);
load_cr3(swapper_pg_dir); load_cr3(swapper_pg_dir);
__flush_tlb_all(); __flush_tlb_all();
...@@ -799,6 +805,7 @@ unsigned long __init_refok init_memory_mapping(unsigned long start, ...@@ -799,6 +805,7 @@ unsigned long __init_refok init_memory_mapping(unsigned long start,
return end >> PAGE_SHIFT; return end >> PAGE_SHIFT;
} }
/* /*
* paging_init() sets up the page tables - note that the first 8MB are * paging_init() sets up the page tables - note that the first 8MB are
* already mapped by head.S. * already mapped by head.S.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment