aboutsummaryrefslogtreecommitdiffstats
path: root/arch/i386/mach-voyager
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2007-04-30 11:57:40 -0400
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2007-05-01 11:11:32 -0400
commit9d0e59a34116f5ee48efc9a397fb09aaedc3b2f0 (patch)
tree3249c82e85b8386e2342208fe35ec08fc1a4dde7 /arch/i386/mach-voyager
parentf3402a4e52fc1bdfc386a7f512e6e384cd69ecad (diff)
[VOYAGER] Use modern techniques to setup and teardown low identiy mappings.
This is a trivial and hopefully obviously correct patch to setup and teardown the identity mappings the way the rest of arch/i386 does. My new page table setup code will break some assumptions below so this is my attempt to keep voyager working. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'arch/i386/mach-voyager')
-rw-r--r--arch/i386/mach-voyager/voyager_smp.c38
1 files changed, 6 insertions, 32 deletions
diff --git a/arch/i386/mach-voyager/voyager_smp.c b/arch/i386/mach-voyager/voyager_smp.c
index a126baeaa423..535fb9e754fb 100644
--- a/arch/i386/mach-voyager/voyager_smp.c
+++ b/arch/i386/mach-voyager/voyager_smp.c
@@ -536,15 +536,6 @@ do_boot_cpu(__u8 cpu)
536 & ~( voyager_extended_vic_processors 536 & ~( voyager_extended_vic_processors
537 & voyager_allowed_boot_processors); 537 & voyager_allowed_boot_processors);
538 538
539 /* For the 486, we can't use the 4Mb page table trick, so
540 * must map a region of memory */
541#ifdef CONFIG_M486
542 int i;
543 unsigned long *page_table_copies = (unsigned long *)
544 __get_free_page(GFP_KERNEL);
545#endif
546 pgd_t orig_swapper_pg_dir0;
547
548 /* This is an area in head.S which was used to set up the 539 /* This is an area in head.S which was used to set up the
549 * initial kernel stack. We need to alter this to give the 540 * initial kernel stack. We need to alter this to give the
550 * booting CPU a new stack (taken from its idle process) */ 541 * booting CPU a new stack (taken from its idle process) */
@@ -595,24 +586,11 @@ do_boot_cpu(__u8 cpu)
595 VDEBUG(("VOYAGER SMP: Booting CPU%d at 0x%lx[%x:%x], stack %p\n", cpu, 586 VDEBUG(("VOYAGER SMP: Booting CPU%d at 0x%lx[%x:%x], stack %p\n", cpu,
596 (unsigned long)hijack_source.val, hijack_source.idt.Segment, 587 (unsigned long)hijack_source.val, hijack_source.idt.Segment,
597 hijack_source.idt.Offset, stack_start.esp)); 588 hijack_source.idt.Offset, stack_start.esp));
598 /* set the original swapper_pg_dir[0] to map 0 to 4Mb transparently 589
599 * (so that the booting CPU can find start_32 */ 590 /* init lowmem identity mapping */
600 orig_swapper_pg_dir0 = swapper_pg_dir[0]; 591 clone_pgd_range(swapper_pg_dir, swapper_pg_dir + USER_PGD_PTRS,
601#ifdef CONFIG_M486 592 min_t(unsigned long, KERNEL_PGD_PTRS, USER_PGD_PTRS));
602 if(page_table_copies == NULL) 593 flush_tlb_all();
603 panic("No free memory for 486 page tables\n");
604 for(i = 0; i < PAGE_SIZE/sizeof(unsigned long); i++)
605 page_table_copies[i] = (i * PAGE_SIZE)
606 | _PAGE_RW | _PAGE_USER | _PAGE_PRESENT;
607
608 ((unsigned long *)swapper_pg_dir)[0] =
609 ((virt_to_phys(page_table_copies)) & PAGE_MASK)
610 | _PAGE_RW | _PAGE_USER | _PAGE_PRESENT;
611#else
612 ((unsigned long *)swapper_pg_dir)[0] =
613 (virt_to_phys(pg0) & PAGE_MASK)
614 | _PAGE_RW | _PAGE_USER | _PAGE_PRESENT;
615#endif
616 594
617 if(quad_boot) { 595 if(quad_boot) {
618 printk("CPU %d: non extended Quad boot\n", cpu); 596 printk("CPU %d: non extended Quad boot\n", cpu);
@@ -655,11 +633,7 @@ do_boot_cpu(__u8 cpu)
655 udelay(100); 633 udelay(100);
656 } 634 }
657 /* reset the page table */ 635 /* reset the page table */
658 swapper_pg_dir[0] = orig_swapper_pg_dir0; 636 zap_low_mappings();
659 local_flush_tlb();
660#ifdef CONFIG_M486
661 free_page((unsigned long)page_table_copies);
662#endif
663 637
664 if (cpu_booted_map) { 638 if (cpu_booted_map) {
665 VDEBUG(("CPU%d: Booted successfully, back in CPU %d\n", 639 VDEBUG(("CPU%d: Booted successfully, back in CPU %d\n",