diff options
Diffstat (limited to 'arch/i386/mach-voyager')
-rw-r--r-- | arch/i386/mach-voyager/voyager_cat.c | 6 | ||||
-rw-r--r-- | arch/i386/mach-voyager/voyager_smp.c | 14 |
2 files changed, 15 insertions, 5 deletions
diff --git a/arch/i386/mach-voyager/voyager_cat.c b/arch/i386/mach-voyager/voyager_cat.c index f50c6c6ad680..943a9473b138 100644 --- a/arch/i386/mach-voyager/voyager_cat.c +++ b/arch/i386/mach-voyager/voyager_cat.c | |||
@@ -776,7 +776,7 @@ voyager_cat_init(void) | |||
776 | for(asic=0; asic < (*modpp)->num_asics; asic++) { | 776 | for(asic=0; asic < (*modpp)->num_asics; asic++) { |
777 | int j; | 777 | int j; |
778 | voyager_asic_t *asicp = *asicpp | 778 | voyager_asic_t *asicp = *asicpp |
779 | = kmalloc(sizeof(voyager_asic_t), GFP_KERNEL); /*&voyager_asic_storage[asic_count++];*/ | 779 | = kzalloc(sizeof(voyager_asic_t), GFP_KERNEL); /*&voyager_asic_storage[asic_count++];*/ |
780 | voyager_sp_table_t *sp_table; | 780 | voyager_sp_table_t *sp_table; |
781 | voyager_at_t *asic_table; | 781 | voyager_at_t *asic_table; |
782 | voyager_jtt_t *jtag_table; | 782 | voyager_jtt_t *jtag_table; |
@@ -785,7 +785,6 @@ voyager_cat_init(void) | |||
785 | printk("**WARNING** kmalloc failure in cat_init\n"); | 785 | printk("**WARNING** kmalloc failure in cat_init\n"); |
786 | continue; | 786 | continue; |
787 | } | 787 | } |
788 | memset(asicp, 0, sizeof(voyager_asic_t)); | ||
789 | asicpp = &(asicp->next); | 788 | asicpp = &(asicp->next); |
790 | asicp->asic_location = asic; | 789 | asicp->asic_location = asic; |
791 | sp_table = (voyager_sp_table_t *)(eprom_buf + sp_offset); | 790 | sp_table = (voyager_sp_table_t *)(eprom_buf + sp_offset); |
@@ -851,8 +850,7 @@ voyager_cat_init(void) | |||
851 | #endif | 850 | #endif |
852 | 851 | ||
853 | { | 852 | { |
854 | struct resource *res = kmalloc(sizeof(struct resource),GFP_KERNEL); | 853 | struct resource *res = kzalloc(sizeof(struct resource),GFP_KERNEL); |
855 | memset(res, 0, sizeof(struct resource)); | ||
856 | res->name = kmalloc(128, GFP_KERNEL); | 854 | res->name = kmalloc(128, GFP_KERNEL); |
857 | sprintf((char *)res->name, "Voyager %s Quad CPI", cat_module_name(i)); | 855 | sprintf((char *)res->name, "Voyager %s Quad CPI", cat_module_name(i)); |
858 | res->start = qic_addr; | 856 | res->start = qic_addr; |
diff --git a/arch/i386/mach-voyager/voyager_smp.c b/arch/i386/mach-voyager/voyager_smp.c index f3fea2ad50fe..55428e656a3f 100644 --- a/arch/i386/mach-voyager/voyager_smp.c +++ b/arch/i386/mach-voyager/voyager_smp.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <asm/pgalloc.h> | 28 | #include <asm/pgalloc.h> |
29 | #include <asm/tlbflush.h> | 29 | #include <asm/tlbflush.h> |
30 | #include <asm/arch_hooks.h> | 30 | #include <asm/arch_hooks.h> |
31 | #include <asm/pda.h> | ||
31 | 32 | ||
32 | /* TLB state -- visible externally, indexed physically */ | 33 | /* TLB state -- visible externally, indexed physically */ |
33 | DEFINE_PER_CPU(struct tlb_state, cpu_tlbstate) ____cacheline_aligned = { &init_mm, 0 }; | 34 | DEFINE_PER_CPU(struct tlb_state, cpu_tlbstate) ____cacheline_aligned = { &init_mm, 0 }; |
@@ -422,6 +423,7 @@ find_smp_config(void) | |||
422 | VOYAGER_SUS_IN_CONTROL_PORT); | 423 | VOYAGER_SUS_IN_CONTROL_PORT); |
423 | 424 | ||
424 | current_thread_info()->cpu = boot_cpu_id; | 425 | current_thread_info()->cpu = boot_cpu_id; |
426 | write_pda(cpu_number, boot_cpu_id); | ||
425 | } | 427 | } |
426 | 428 | ||
427 | /* | 429 | /* |
@@ -458,7 +460,7 @@ start_secondary(void *unused) | |||
458 | /* external functions not defined in the headers */ | 460 | /* external functions not defined in the headers */ |
459 | extern void calibrate_delay(void); | 461 | extern void calibrate_delay(void); |
460 | 462 | ||
461 | cpu_init(); | 463 | secondary_cpu_init(); |
462 | 464 | ||
463 | /* OK, we're in the routine */ | 465 | /* OK, we're in the routine */ |
464 | ack_CPI(VIC_CPU_BOOT_CPI); | 466 | ack_CPI(VIC_CPU_BOOT_CPI); |
@@ -578,6 +580,15 @@ do_boot_cpu(__u8 cpu) | |||
578 | /* init_tasks (in sched.c) is indexed logically */ | 580 | /* init_tasks (in sched.c) is indexed logically */ |
579 | stack_start.esp = (void *) idle->thread.esp; | 581 | stack_start.esp = (void *) idle->thread.esp; |
580 | 582 | ||
583 | /* Pre-allocate and initialize the CPU's GDT and PDA so it | ||
584 | doesn't have to do any memory allocation during the | ||
585 | delicate CPU-bringup phase. */ | ||
586 | if (!init_gdt(cpu, idle)) { | ||
587 | printk(KERN_INFO "Couldn't allocate GDT/PDA for CPU %d\n", cpu); | ||
588 | cpucount--; | ||
589 | return; | ||
590 | } | ||
591 | |||
581 | irq_ctx_init(cpu); | 592 | irq_ctx_init(cpu); |
582 | 593 | ||
583 | /* Note: Don't modify initial ss override */ | 594 | /* Note: Don't modify initial ss override */ |
@@ -1963,4 +1974,5 @@ void __init | |||
1963 | smp_setup_processor_id(void) | 1974 | smp_setup_processor_id(void) |
1964 | { | 1975 | { |
1965 | current_thread_info()->cpu = hard_smp_processor_id(); | 1976 | current_thread_info()->cpu = hard_smp_processor_id(); |
1977 | write_pda(cpu_number, hard_smp_processor_id()); | ||
1966 | } | 1978 | } |