*
* Does not return until remote CPUs are nearly ready to execute <func>
* or are or have executed.
+ * You must not call this function with disabled interrupts or from a
+ * hardware interrupt handler or from a bottom half handler.
*/
int
* remote CPUs are nearly ready to execute <<func>> or are or have executed.
*
* You must not call this function with disabled interrupts or from a
- * hardware interrupt handler, you may call it from a bottom half handler.
+ * hardware interrupt handler or from a bottom half handler.
*/
{
struct call_data_struct data;
if (wait)
atomic_set(&data.finished, 0);
- spin_lock_bh(&call_lock);
+ spin_lock(&call_lock);
call_data = &data;
wmb();
/* Send a message to all other CPUs and wait for them to respond */
if (wait)
while (atomic_read(&data.finished) != cpus)
barrier();
- spin_unlock_bh(&call_lock);
+ spin_unlock(&call_lock);
return 0;
}
* Does not return until remote CPUs are nearly ready to execute <func> or are or have
* executed.
*
- * You must not call this function with disabled interrupts or from a hardware interrupt
- * handler, you may call it from a bottom half handler.
+ * You must not call this function with disabled interrupts or from a
+ * hardware interrupt handler or from a bottom half handler.
*/
int
smp_call_function (void (*func) (void *info), void *info, int nonatomic, int wait)
if (wait)
atomic_set(&data.finished, 0);
- spin_lock_bh(&call_lock);
+ spin_lock(&call_lock);
call_data = &data;
mb(); /* ensure store to call_data precedes setting of IPI_CALL_FUNC */
barrier();
call_data = NULL;
- spin_unlock_bh(&call_lock);
+ spin_unlock(&call_lock);
return 0;
}
* The caller of this wants the passed function to run on every cpu. If wait
* is set, wait until all cpus have finished the function before returning.
* The lock is here to protect the call structure.
+ * You must not call this function with disabled interrupts or from a
+ * hardware interrupt handler or from a bottom half handler.
*/
int smp_call_function (void (*func) (void *info), void *info, int retry,
int wait)
return 0;
}
- spin_lock_bh(&smp_fn_call.lock);
+ spin_lock(&smp_fn_call.lock);
atomic_set(&smp_fn_call.finished, 0);
smp_fn_call.fn = func;
while(atomic_read(&smp_fn_call.finished) != cpus) {}
}
- spin_unlock_bh(&smp_fn_call.lock);
+ spin_unlock(&smp_fn_call.lock);
return 0;
}
* remote CPUs are nearly ready to execute <<func>> or are or have executed.
*
* You must not call this function with disabled interrupts or from a
- * hardware interrupt handler, you may call it from a bottom half handler.
+ * hardware interrupt handler or from a bottom half handler.
*/
{
if (smp_num_cpus <= 1)
if (wait)
atomic_set(&data.finished, 0);
- spin_lock_bh(&call_lock);
+ spin_lock(&call_lock);
call_data = &data;
/* Send a message to all other CPUs and wait for them to respond */
smp_message_pass(target, PPC_MSG_CALL_FUNCTION, 0, 0);
ret = 0;
out:
- spin_unlock_bh(&call_lock);
+ spin_unlock(&call_lock);
return ret;
}
* remote CPUs are nearly ready to execute <<func>> or are or have executed.
*
* You must not call this function with disabled interrupts or from a
- * hardware interrupt handler, you may call it from a bottom half handler.
+ * hardware interrupt handler or from a bottom half handler.
*/
int smp_call_function (void (*func) (void *info), void *info, int nonatomic,
int wait)
if (wait)
atomic_set(&data.finished, 0);
- spin_lock_bh(&call_lock);
+ spin_lock(&call_lock);
call_data = &data;
/* Send a message to all other CPUs and wait for them to respond */
smp_message_pass(MSG_ALL_BUT_SELF, PPC_MSG_CALL_FUNCTION, 0, 0);
out:
HMT_medium();
- spin_unlock_bh(&call_lock);
+ spin_unlock(&call_lock);
return ret;
}
* remote CPUs are nearly ready to execute <<func>> or are or have executed.
*
* You must not call this function with disabled interrupts or from a
- * hardware interrupt handler, you may call it from a bottom half handler.
+ * hardware interrupt handler or from a bottom half handler.
*/
{
struct call_data_struct data;
if (wait)
atomic_set(&data.finished, 0);
- spin_lock_bh(&call_lock);
+ spin_lock(&call_lock);
call_data = &data;
/* Send a message to all other CPUs and wait for them to respond */
smp_ext_bitcall_others(ec_call_function);
if (wait)
while (atomic_read(&data.finished) != cpus)
barrier();
- spin_unlock_bh(&call_lock);
+ spin_unlock(&call_lock);
return 0;
}
* remote CPUs are nearly ready to execute <<func>> or are or have executed.
*
* You must not call this function with disabled interrupts or from a
- * hardware interrupt handler, you may call it from a bottom half handler.
+ * hardware interrupt handler or from a bottom half handler.
*/
{
struct call_data_struct data;
if (wait)
atomic_set(&data.finished, 0);
- spin_lock_bh(&call_lock);
+ spin_lock(&call_lock);
call_data = &data;
/* Send a message to all other CPUs and wait for them to respond */
smp_ext_bitcall_others(ec_call_function);
if (wait)
while (atomic_read(&data.finished) != cpus)
barrier();
- spin_unlock_bh(&call_lock);
+ spin_unlock(&call_lock);
return 0;
}
extern unsigned long xcall_call_function;
+/*
+ * You must not call this function with disabled interrupts or from a
+ * hardware interrupt handler or from a bottom half handler.
+ */
int smp_call_function(void (*func)(void *info), void *info,
int nonatomic, int wait)
{
atomic_set(&data.finished, 0);
data.wait = wait;
- spin_lock_bh(&call_lock);
+ spin_lock(&call_lock);
call_data = &data;
udelay(1);
}
- spin_unlock_bh(&call_lock);
+ spin_unlock(&call_lock);
return 0;
out_timeout:
- spin_unlock_bh(&call_lock);
+ spin_unlock(&call_lock);
printk("XCALL: Remote cpus not responding, ncpus=%d finished=%d\n",
smp_num_cpus - 1, atomic_read(&data.finished));
return 0;
* remote CPUs are nearly ready to execute <<func>> or are or have executed.
*
* You must not call this function with disabled interrupts or from a
- * hardware interrupt handler, you may call it from a bottom half handler.
+ * hardware interrupt handler or from a bottom half handler.
*/
{
struct call_data_struct data;
if (wait)
atomic_set(&data.finished, 0);
- spin_lock_bh(&call_lock);
+ spin_lock(&call_lock);
call_data = &data;
wmb();
/* Send a message to all other CPUs and wait for them to respond */
if (wait)
while (atomic_read(&data.finished) != cpus)
barrier();
- spin_unlock_bh(&call_lock);
+ spin_unlock(&call_lock);
return 0;
}