]> err.no Git - linux-2.6/commitdiff
Document why calling smp_call_function will deadlock when called with
authorRalf Baechle <ralf@linux-mips.org>
Thu, 10 Feb 2005 12:00:06 +0000 (12:00 +0000)
committerRalf Baechle <ralf@linux-mips.org>
Sat, 29 Oct 2005 18:30:30 +0000 (19:30 +0100)
interrupts disabled.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/kernel/smp.c

index af5cd3b8a39683fc25bea766f2f9748dca2ffd35..1d3a4b50194942d731e7bcaeb9bd97f7b4f3106f 100644 (file)
@@ -121,7 +121,19 @@ struct call_data_struct *call_data;
  * 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.
+ * hardware interrupt handler or from a bottom half handler:
+ *
+ * CPU A                               CPU B
+ * Disable interrupts
+ *                                     smp_call_function()
+ *                                     Take call_lock
+ *                                     Send IPIs
+ *                                     Wait for all cpus to acknowledge IPI
+ *                                     CPU A has not responded, spin waiting
+ *                                     for cpu A to respond, holding call_lock
+ * smp_call_function()
+ * Spin waiting for call_lock
+ * Deadlock                            Deadlock
  */
 int smp_call_function (void (*func) (void *info), void *info, int retry,
                                                                int wait)