Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 225877
b: refs/heads/master
c: 28e1829
h: refs/heads/master
i:
  225875: 6a826e1
v: v3
  • Loading branch information
Russell King committed Dec 20, 2010
1 parent b3e7aab commit 6c9c4f2
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0eb0511d176534674600a1986c3c766756288908
refs/heads/master: 28e18293cf0f8d23a0950d7b1d2212d11af494dc
18 changes: 15 additions & 3 deletions trunk/arch/arm/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -575,10 +575,22 @@ void smp_send_reschedule(int cpu)

void smp_send_stop(void)
{
cpumask_t mask = cpu_online_map;
cpu_clear(smp_processor_id(), mask);
if (!cpus_empty(mask))
unsigned long timeout;

if (num_online_cpus() > 1) {
cpumask_t mask = cpu_online_map;
cpu_clear(smp_processor_id(), mask);

smp_cross_call(&mask, IPI_CPU_STOP);
}

/* Wait up to one second for other CPUs to stop */
timeout = USEC_PER_SEC;
while (num_online_cpus() > 1 && timeout--)
udelay(1);

if (num_online_cpus() > 1)
pr_warning("SMP: failed to stop secondary CPUs\n");
}

/*
Expand Down

0 comments on commit 6c9c4f2

Please sign in to comment.