From: Martin Schwidefsky <schwidefsky@de.ibm.com>
To: linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>,
Martin Schwidefsky <schwidefsky@de.ibm.com>
Subject: [patch 2/9] Improve __smp_call_function_map.
Date: Mon, 23 Jul 2007 10:45:50 +0200 [thread overview]
Message-ID: <20070723085640.135097226@de.ibm.com> (raw)
In-Reply-To: 20070723084548.394178614@de.ibm.com
[-- Attachment #1: 002-smp-call.diff --]
[-- Type: text/plain, Size: 1549 bytes --]
From: Heiko Carstens <heiko.carstens@de.ibm.com>
There is no need to disable bottom halves when holding call_lock. Also
this could imply that it is legal to call smp_call_function* from
bh context, which it is not.
Also test if func will be executed locally before disabling
and aterwards enabling interrupts again. It's not necessary to disable
and enable interrupts each time __smp_call_function_map gets called.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
---
arch/s390/kernel/smp.c | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
Index: quilt-2.6/arch/s390/kernel/smp.c
===================================================================
--- quilt-2.6.orig/arch/s390/kernel/smp.c
+++ quilt-2.6/arch/s390/kernel/smp.c
@@ -120,7 +120,7 @@ static void __smp_call_function_map(void
if (wait)
data.finished = CPU_MASK_NONE;
- spin_lock_bh(&call_lock);
+ spin_lock(&call_lock);
call_data = &data;
for_each_cpu_mask(cpu, map)
@@ -129,18 +129,16 @@ static void __smp_call_function_map(void
/* Wait for response */
while (!cpus_equal(map, data.started))
cpu_relax();
-
if (wait)
while (!cpus_equal(map, data.finished))
cpu_relax();
-
- spin_unlock_bh(&call_lock);
-
+ spin_unlock(&call_lock);
out:
- local_irq_disable();
- if (local)
+ if (local) {
+ local_irq_disable();
func(info);
- local_irq_enable();
+ local_irq_enable();
+ }
}
/*
--
blue skies,
Martin.
"Reality continues to ruin my life." - Calvin.
next prev parent reply other threads:[~2007-07-23 8:54 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-23 8:45 [patch 0/9] s390 update for 2.6.23-rc1 Martin Schwidefsky
2007-07-23 8:45 ` [patch 1/9] Convert to smp_call_function_single Martin Schwidefsky
2007-07-23 8:45 ` Martin Schwidefsky [this message]
2007-07-23 8:45 ` [patch 3/9] cio: css_sch_device_register() can be made static Martin Schwidefsky
2007-07-23 8:45 ` [patch 4/9] cio: Remove remains of _ccw_device_get_device_number() Martin Schwidefsky
2007-07-23 8:45 ` [patch 5/9] sclp: kill unused SCLP config option Martin Schwidefsky
2007-07-23 8:45 ` [patch 6/9] Get rid of new section mismatch warnings Martin Schwidefsky
2007-07-23 8:45 ` [patch 7/9] cio: Remove deprecated rdc/rcd Martin Schwidefsky
2007-07-23 8:45 ` [patch 8/9] add types.h include to s390_ext.h Martin Schwidefsky
2007-07-23 8:45 ` [patch 9/9] Wire up sys_fallocate Martin Schwidefsky
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=20070723085640.135097226@de.ibm.com \
--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