diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-22 23:37:50 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-22 23:37:50 -0400 |
commit | 10f2a2b0f68abf39c06cf519cbc1740fa50f900b (patch) | |
tree | 70b33e4437ae0d5ac92f56c60b048756bde7f3e4 /arch/x86/kernel/setup.c | |
parent | 8814011679d1a47d8b0158fc991727a5859471a0 (diff) | |
parent | b40827fa7268fda8a62490728a61c2856f33830b (diff) |
Merge branch 'x86-trampoline-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'x86-trampoline-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
x86-32, mm: Add an initial page table for core bootstrapping
Diffstat (limited to 'arch/x86/kernel/setup.c')
-rw-r--r-- | arch/x86/kernel/setup.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index 420e64197850..95a32746fbf9 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c | |||
@@ -700,6 +700,17 @@ void __init setup_arch(char **cmdline_p) | |||
700 | #ifdef CONFIG_X86_32 | 700 | #ifdef CONFIG_X86_32 |
701 | memcpy(&boot_cpu_data, &new_cpu_data, sizeof(new_cpu_data)); | 701 | memcpy(&boot_cpu_data, &new_cpu_data, sizeof(new_cpu_data)); |
702 | visws_early_detect(); | 702 | visws_early_detect(); |
703 | |||
704 | /* | ||
705 | * copy kernel address range established so far and switch | ||
706 | * to the proper swapper page table | ||
707 | */ | ||
708 | clone_pgd_range(swapper_pg_dir + KERNEL_PGD_BOUNDARY, | ||
709 | initial_page_table + KERNEL_PGD_BOUNDARY, | ||
710 | KERNEL_PGD_PTRS); | ||
711 | |||
712 | load_cr3(swapper_pg_dir); | ||
713 | __flush_tlb_all(); | ||
703 | #else | 714 | #else |
704 | printk(KERN_INFO "Command line: %s\n", boot_command_line); | 715 | printk(KERN_INFO "Command line: %s\n", boot_command_line); |
705 | #endif | 716 | #endif |
@@ -985,7 +996,12 @@ void __init setup_arch(char **cmdline_p) | |||
985 | paging_init(); | 996 | paging_init(); |
986 | x86_init.paging.pagetable_setup_done(swapper_pg_dir); | 997 | x86_init.paging.pagetable_setup_done(swapper_pg_dir); |
987 | 998 | ||
988 | setup_trampoline_page_table(); | 999 | #ifdef CONFIG_X86_32 |
1000 | /* sync back kernel address range */ | ||
1001 | clone_pgd_range(initial_page_table + KERNEL_PGD_BOUNDARY, | ||
1002 | swapper_pg_dir + KERNEL_PGD_BOUNDARY, | ||
1003 | KERNEL_PGD_PTRS); | ||
1004 | #endif | ||
989 | 1005 | ||
990 | tboot_probe(); | 1006 | tboot_probe(); |
991 | 1007 | ||