From d920d8c8a6b88a3628ed4374e8aaeb3897058f42 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Thu, 10 Feb 2005 12:00:06 +0000 Subject: [PATCH] --- yaml --- r: 10989 b: refs/heads/master c: 57f0060b8a2bb2a70a4cce1a37d5e0158cea92a6 h: refs/heads/master i: 10987: deec58989903ed8c3ecdd9e39cd84d9921ce6ccd v: v3 --- [refs] | 2 +- trunk/arch/mips/kernel/smp.c | 14 +++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 4cba7ae1dccf..ce007f5b8b76 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 26852d5cdb2bac01f2a48b815194a045e8a8e300 +refs/heads/master: 57f0060b8a2bb2a70a4cce1a37d5e0158cea92a6 diff --git a/trunk/arch/mips/kernel/smp.c b/trunk/arch/mips/kernel/smp.c index af5cd3b8a396..1d3a4b501949 100644 --- a/trunk/arch/mips/kernel/smp.c +++ b/trunk/arch/mips/kernel/smp.c @@ -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)