diff options
author | Yinghai Lu <yhlu.kernel@gmail.com> | 2008-06-26 00:51:28 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-08 07:16:01 -0400 |
commit | e7b3789524eecc96213dd69d6686efd429235051 (patch) | |
tree | 2d723f289663fdbbf49e967e50c1347f91e6d95f | |
parent | 042623bbabae168246ad8a37693f0ecb6c450aea (diff) |
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: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r-- | arch/x86/kernel/setup.c | 23 | ||||
-rw-r--r-- | arch/x86/mm/init_32.c | 15 |
2 files changed, 20 insertions, 18 deletions
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index 161609c6925e..bf528b23750a 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c | |||
@@ -611,11 +611,6 @@ void __init setup_arch(char **cmdline_p) | |||
611 | 611 | ||
612 | #ifdef CONFIG_X86_32 | 612 | #ifdef CONFIG_X86_32 |
613 | probe_roms(); | 613 | probe_roms(); |
614 | #else | ||
615 | # ifdef CONFIG_PROVIDE_OHCI1394_DMA_INIT | ||
616 | if (init_ohci1394_dma_early) | ||
617 | init_ohci1394_dma_on_all_controllers(); | ||
618 | # endif | ||
619 | #endif | 614 | #endif |
620 | 615 | ||
621 | /* after parse_early_param, so could debug it */ | 616 | /* after parse_early_param, so could debug it */ |
@@ -672,6 +667,15 @@ void __init setup_arch(char **cmdline_p) | |||
672 | /* max_pfn_mapped is updated here */ | 667 | /* max_pfn_mapped is updated here */ |
673 | max_pfn_mapped = init_memory_mapping(0, (max_low_pfn << PAGE_SHIFT)); | 668 | max_pfn_mapped = init_memory_mapping(0, (max_low_pfn << PAGE_SHIFT)); |
674 | 669 | ||
670 | /* | ||
671 | * NOTE: On x86-32, only from this point on, fixmaps are ready for use. | ||
672 | */ | ||
673 | |||
674 | #ifdef CONFIG_PROVIDE_OHCI1394_DMA_INIT | ||
675 | if (init_ohci1394_dma_early) | ||
676 | init_ohci1394_dma_on_all_controllers(); | ||
677 | #endif | ||
678 | |||
675 | reserve_initrd(); | 679 | reserve_initrd(); |
676 | 680 | ||
677 | #ifdef CONFIG_X86_64 | 681 | #ifdef CONFIG_X86_64 |
@@ -739,15 +743,6 @@ void __init setup_arch(char **cmdline_p) | |||
739 | map_vsyscall(); | 743 | map_vsyscall(); |
740 | #endif | 744 | #endif |
741 | 745 | ||
742 | /* | ||
743 | * NOTE: On x86-32, only from this point on, fixmaps are ready for use. | ||
744 | */ | ||
745 | |||
746 | #if defined(CONFIG_PROVIDE_OHCI1394_DMA_INIT) && defined(CONFIG_X86_32) | ||
747 | if (init_ohci1394_dma_early) | ||
748 | init_ohci1394_dma_on_all_controllers(); | ||
749 | #endif | ||
750 | |||
751 | #ifdef CONFIG_X86_GENERICARCH | 746 | #ifdef CONFIG_X86_GENERICARCH |
752 | generic_apic_probe(); | 747 | generic_apic_probe(); |
753 | #endif | 748 | #endif |
diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c index 156000de6e62..b9cf7f705302 100644 --- a/arch/x86/mm/init_32.c +++ b/arch/x86/mm/init_32.c | |||
@@ -442,13 +442,10 @@ void __init native_pagetable_setup_done(pgd_t *base) | |||
442 | * be partially populated, and so it avoids stomping on any existing | 442 | * be partially populated, and so it avoids stomping on any existing |
443 | * mappings. | 443 | * mappings. |
444 | */ | 444 | */ |
445 | static void __init pagetable_init(void) | 445 | static void __init early_ioremap_page_table_range_init(pgd_t *pgd_base) |
446 | { | 446 | { |
447 | pgd_t *pgd_base = swapper_pg_dir; | ||
448 | unsigned long vaddr, end; | 447 | unsigned long vaddr, end; |
449 | 448 | ||
450 | paravirt_pagetable_setup_start(pgd_base); | ||
451 | |||
452 | /* | 449 | /* |
453 | * Fixed mappings, only the page table structure has to be | 450 | * Fixed mappings, only the page table structure has to be |
454 | * created - mappings will be set by set_fixmap(): | 451 | * created - mappings will be set by set_fixmap(): |
@@ -458,6 +455,13 @@ static void __init pagetable_init(void) | |||
458 | end = (FIXADDR_TOP + PMD_SIZE - 1) & PMD_MASK; | 455 | end = (FIXADDR_TOP + PMD_SIZE - 1) & PMD_MASK; |
459 | page_table_range_init(vaddr, end, pgd_base); | 456 | page_table_range_init(vaddr, end, pgd_base); |
460 | early_ioremap_reset(); | 457 | early_ioremap_reset(); |
458 | } | ||
459 | |||
460 | static void __init pagetable_init(void) | ||
461 | { | ||
462 | pgd_t *pgd_base = swapper_pg_dir; | ||
463 | |||
464 | paravirt_pagetable_setup_start(pgd_base); | ||
461 | 465 | ||
462 | permanent_kmaps_init(pgd_base); | 466 | permanent_kmaps_init(pgd_base); |
463 | 467 | ||
@@ -788,6 +792,8 @@ unsigned long __init_refok init_memory_mapping(unsigned long start, | |||
788 | 792 | ||
789 | kernel_physical_mapping_init(pgd_base, start, end); | 793 | kernel_physical_mapping_init(pgd_base, start, end); |
790 | 794 | ||
795 | early_ioremap_page_table_range_init(pgd_base); | ||
796 | |||
791 | load_cr3(swapper_pg_dir); | 797 | load_cr3(swapper_pg_dir); |
792 | 798 | ||
793 | __flush_tlb_all(); | 799 | __flush_tlb_all(); |
@@ -799,6 +805,7 @@ unsigned long __init_refok init_memory_mapping(unsigned long start, | |||
799 | return end >> PAGE_SHIFT; | 805 | return end >> PAGE_SHIFT; |
800 | } | 806 | } |
801 | 807 | ||
808 | |||
802 | /* | 809 | /* |
803 | * paging_init() sets up the page tables - note that the first 8MB are | 810 | * paging_init() sets up the page tables - note that the first 8MB are |
804 | * already mapped by head.S. | 811 | * already mapped by head.S. |