diff options
Diffstat (limited to 'arch/arm/kernel/smp.c')
-rw-r--r-- | arch/arm/kernel/smp.c | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c index 2cee7d1eb958..f6a4d32b0421 100644 --- a/arch/arm/kernel/smp.c +++ b/arch/arm/kernel/smp.c | |||
@@ -349,7 +349,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus) | |||
349 | * re-initialize the map in platform_smp_prepare_cpus() if | 349 | * re-initialize the map in platform_smp_prepare_cpus() if |
350 | * present != possible (e.g. physical hotplug). | 350 | * present != possible (e.g. physical hotplug). |
351 | */ | 351 | */ |
352 | init_cpu_present(&cpu_possible_map); | 352 | init_cpu_present(cpu_possible_mask); |
353 | 353 | ||
354 | /* | 354 | /* |
355 | * Initialise the SCU if there are more than one CPU | 355 | * Initialise the SCU if there are more than one CPU |
@@ -510,10 +510,6 @@ static void ipi_cpu_stop(unsigned int cpu) | |||
510 | local_fiq_disable(); | 510 | local_fiq_disable(); |
511 | local_irq_disable(); | 511 | local_irq_disable(); |
512 | 512 | ||
513 | #ifdef CONFIG_HOTPLUG_CPU | ||
514 | platform_cpu_kill(cpu); | ||
515 | #endif | ||
516 | |||
517 | while (1) | 513 | while (1) |
518 | cpu_relax(); | 514 | cpu_relax(); |
519 | } | 515 | } |
@@ -576,16 +572,25 @@ void smp_send_reschedule(int cpu) | |||
576 | smp_cross_call(cpumask_of(cpu), IPI_RESCHEDULE); | 572 | smp_cross_call(cpumask_of(cpu), IPI_RESCHEDULE); |
577 | } | 573 | } |
578 | 574 | ||
575 | #ifdef CONFIG_HOTPLUG_CPU | ||
576 | static void smp_kill_cpus(cpumask_t *mask) | ||
577 | { | ||
578 | unsigned int cpu; | ||
579 | for_each_cpu(cpu, mask) | ||
580 | platform_cpu_kill(cpu); | ||
581 | } | ||
582 | #else | ||
583 | static void smp_kill_cpus(cpumask_t *mask) { } | ||
584 | #endif | ||
585 | |||
579 | void smp_send_stop(void) | 586 | void smp_send_stop(void) |
580 | { | 587 | { |
581 | unsigned long timeout; | 588 | unsigned long timeout; |
589 | struct cpumask mask; | ||
582 | 590 | ||
583 | if (num_online_cpus() > 1) { | 591 | cpumask_copy(&mask, cpu_online_mask); |
584 | cpumask_t mask = cpu_online_map; | 592 | cpumask_clear_cpu(smp_processor_id(), &mask); |
585 | cpu_clear(smp_processor_id(), mask); | 593 | smp_cross_call(&mask, IPI_CPU_STOP); |
586 | |||
587 | smp_cross_call(&mask, IPI_CPU_STOP); | ||
588 | } | ||
589 | 594 | ||
590 | /* Wait up to one second for other CPUs to stop */ | 595 | /* Wait up to one second for other CPUs to stop */ |
591 | timeout = USEC_PER_SEC; | 596 | timeout = USEC_PER_SEC; |
@@ -594,6 +599,8 @@ void smp_send_stop(void) | |||
594 | 599 | ||
595 | if (num_online_cpus() > 1) | 600 | if (num_online_cpus() > 1) |
596 | pr_warning("SMP: failed to stop secondary CPUs\n"); | 601 | pr_warning("SMP: failed to stop secondary CPUs\n"); |
602 | |||
603 | smp_kill_cpus(&mask); | ||
597 | } | 604 | } |
598 | 605 | ||
599 | /* | 606 | /* |