CVSROOT: /home/cvs
Module name: linux
Changes by: ralf@ftp.linux-mips.org 05/02/10 12:00:07
Modified files:
arch/mips/kernel: smp.c
Log message:
Document why calling smp_call_function will deadlock when called with
interrupts disabled.
diff -urN linux/arch/mips/kernel/smp.c linux/arch/mips/kernel/smp.c
--- linux/arch/mips/kernel/smp.c 2005/01/15 01:31:05 1.73
+++ linux/arch/mips/kernel/smp.c 2005/02/10 12:00:06 1.74
@@ -139,7 +139,19 @@
* 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)
|