diff options
Diffstat (limited to 'arch/mips/kernel/smtc.c')
-rw-r--r-- | arch/mips/kernel/smtc.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/arch/mips/kernel/smtc.c b/arch/mips/kernel/smtc.c index f5dd38f1d015..15b5f3cfd20c 100644 --- a/arch/mips/kernel/smtc.c +++ b/arch/mips/kernel/smtc.c | |||
@@ -322,7 +322,7 @@ int __init smtc_build_cpu_map(int start_cpu_slot) | |||
322 | 322 | ||
323 | /* | 323 | /* |
324 | * Common setup before any secondaries are started | 324 | * Common setup before any secondaries are started |
325 | * Make sure all CPU's are in a sensible state before we boot any of the | 325 | * Make sure all CPUs are in a sensible state before we boot any of the |
326 | * secondaries. | 326 | * secondaries. |
327 | * | 327 | * |
328 | * For MIPS MT "SMTC" operation, we set up all TCs, spread as evenly | 328 | * For MIPS MT "SMTC" operation, we set up all TCs, spread as evenly |
@@ -340,12 +340,12 @@ static void smtc_tc_setup(int vpe, int tc, int cpu) | |||
340 | /* | 340 | /* |
341 | * TCContext gets an offset from the base of the IPIQ array | 341 | * TCContext gets an offset from the base of the IPIQ array |
342 | * to be used in low-level code to detect the presence of | 342 | * to be used in low-level code to detect the presence of |
343 | * an active IPI queue | 343 | * an active IPI queue. |
344 | */ | 344 | */ |
345 | write_tc_c0_tccontext((sizeof(struct smtc_ipi_q) * cpu) << 16); | 345 | write_tc_c0_tccontext((sizeof(struct smtc_ipi_q) * cpu) << 16); |
346 | /* Bind tc to vpe */ | 346 | /* Bind tc to vpe */ |
347 | write_tc_c0_tcbind(vpe); | 347 | write_tc_c0_tcbind(vpe); |
348 | /* In general, all TCs should have the same cpu_data indications */ | 348 | /* In general, all TCs should have the same cpu_data indications. */ |
349 | memcpy(&cpu_data[cpu], &cpu_data[0], sizeof(struct cpuinfo_mips)); | 349 | memcpy(&cpu_data[cpu], &cpu_data[0], sizeof(struct cpuinfo_mips)); |
350 | /* For 34Kf, start with TC/CPU 0 as sole owner of single FPU context */ | 350 | /* For 34Kf, start with TC/CPU 0 as sole owner of single FPU context */ |
351 | if (cpu_data[0].cputype == CPU_34K || | 351 | if (cpu_data[0].cputype == CPU_34K || |
@@ -358,8 +358,8 @@ static void smtc_tc_setup(int vpe, int tc, int cpu) | |||
358 | } | 358 | } |
359 | 359 | ||
360 | /* | 360 | /* |
361 | * Tweak to get Count registes in as close a sync as possible. | 361 | * Tweak to get Count registes in as close a sync as possible. The |
362 | * Value seems good for 34K-class cores. | 362 | * value seems good for 34K-class cores. |
363 | */ | 363 | */ |
364 | 364 | ||
365 | #define CP0_SKEW 8 | 365 | #define CP0_SKEW 8 |
@@ -615,7 +615,6 @@ void __cpuinit smtc_boot_secondary(int cpu, struct task_struct *idle) | |||
615 | 615 | ||
616 | void smtc_init_secondary(void) | 616 | void smtc_init_secondary(void) |
617 | { | 617 | { |
618 | local_irq_enable(); | ||
619 | } | 618 | } |
620 | 619 | ||
621 | void smtc_smp_finish(void) | 620 | void smtc_smp_finish(void) |
@@ -631,6 +630,8 @@ void smtc_smp_finish(void) | |||
631 | if (cpu > 0 && (cpu_data[cpu].vpe_id != cpu_data[cpu - 1].vpe_id)) | 630 | if (cpu > 0 && (cpu_data[cpu].vpe_id != cpu_data[cpu - 1].vpe_id)) |
632 | write_c0_compare(read_c0_count() + mips_hpt_frequency/HZ); | 631 | write_c0_compare(read_c0_count() + mips_hpt_frequency/HZ); |
633 | 632 | ||
633 | local_irq_enable(); | ||
634 | |||
634 | printk("TC %d going on-line as CPU %d\n", | 635 | printk("TC %d going on-line as CPU %d\n", |
635 | cpu_data[smp_processor_id()].tc_id, smp_processor_id()); | 636 | cpu_data[smp_processor_id()].tc_id, smp_processor_id()); |
636 | } | 637 | } |