Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 40563
b: refs/heads/master
c: 5ee7737
h: refs/heads/master
i:
  40561: be05f7d
  40559: c798b67
v: v3
  • Loading branch information
Kenji Kaneshige authored and Tony Luck committed Oct 31, 2006
1 parent 0c93cfe commit 94873eb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 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: f2454a1a4b2aca38d3b7887619f43291d773c1ee
refs/heads/master: 5ee7737379b1d7f0c977c0f1661fbaf01a8d4721
10 changes: 6 additions & 4 deletions trunk/arch/ia64/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -328,10 +328,14 @@ int
smp_call_function (void (*func) (void *info), void *info, int nonatomic, int wait)
{
struct call_data_struct data;
int cpus = num_online_cpus()-1;
int cpus;

if (!cpus)
spin_lock(&call_lock);
cpus = num_online_cpus() - 1;
if (!cpus) {
spin_unlock(&call_lock);
return 0;
}

/* Can deadlock when called with interrupts disabled */
WARN_ON(irqs_disabled());
Expand All @@ -343,8 +347,6 @@ smp_call_function (void (*func) (void *info), void *info, int nonatomic, int wai
if (wait)
atomic_set(&data.finished, 0);

spin_lock(&call_lock);

call_data = &data;
mb(); /* ensure store to call_data precedes setting of IPI_CALL_FUNC */
send_IPI_allbutself(IPI_CALL_FUNC);
Expand Down

0 comments on commit 94873eb

Please sign in to comment.