From: Martin Schwidefsky <schwidefsky@de.ibm.com>
To: linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org
Cc: heiko.carstens@de.ibm.com
Subject: [S390] Add/extend WARN_ONs in smp_call_function & smp_call_function_on.
Date: Tue, 6 Feb 2007 22:10:06 +0100 [thread overview]
Message-ID: <20070206211006.GB30335@skybase> (raw)
From: Heiko Carstens <heiko.carstens@de.ibm.com>
[S390] Add/extend WARN_ONs in smp_call_function & smp_call_function_on.
Let smp_call_function & smp_call_function_on complain if called with
interrupts disabled or called from a wrong context.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
---
arch/s390/kernel/smp.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff -urpN linux-2.6/arch/s390/kernel/smp.c linux-2.6-patched/arch/s390/kernel/smp.c
--- linux-2.6/arch/s390/kernel/smp.c 2007-02-06 21:43:03.000000000 +0100
+++ linux-2.6-patched/arch/s390/kernel/smp.c 2007-02-06 21:43:35.000000000 +0100
@@ -57,7 +57,7 @@ static void smp_ext_bitcall(int, ec_bit_
static void smp_ext_bitcall_others(ec_bit_sig);
/*
-5B * Structure and data for smp_call_function(). This is designed to minimise
+ * Structure and data for smp_call_function(). This is designed to minimise
* static memory requirements. It also looks cleaner.
*/
static DEFINE_SPINLOCK(call_lock);
@@ -113,8 +113,8 @@ int smp_call_function (void (*func) (voi
if (cpus <= 0)
return 0;
- /* Can deadlock when called with interrupts disabled */
- WARN_ON(irqs_disabled());
+ /* Can deadlock when interrupts are disabled or if in wrong context */
+ WARN_ON(irqs_disabled() || in_interrupt());
data.func = func;
data.info = info;
@@ -159,6 +159,9 @@ int smp_call_function_on(void (*func) (v
if (!cpu_online(cpu))
return -EINVAL;
+ /* Can deadlock when interrupts are disabled or if in wrong context */
+ WARN_ON(irqs_disabled() || in_irq());
+
/* disable preemption for local function call */
curr_cpu = get_cpu();
reply other threads:[~2007-02-06 21:10 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070206211006.GB30335@skybase \
--to=schwidefsky@de.ibm.com \
--cc=heiko.carstens@de.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®