From: Arnd Bergmann <arnd@arndb.de>
To: linux-kernel@vger.kernel.org
Subject: [PATCH 09/18] sh: kill big kernel lock
Date: Tue, 14 Sep 2010 21:40:13 +0200 [thread overview]
Message-ID: <1284493213-7263-10-git-send-email-arnd@arndb.de> (raw)
In-Reply-To: <1284493139-7233-1-git-send-email-arnd@arndb.de>
The only BKL user in arch/sh protects a single bit,
so we can trivially replace it with test_and_set_bit.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: linux-sh@vger.kernel.org
---
arch/sh/kernel/ptrace_64.c | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/arch/sh/kernel/ptrace_64.c b/arch/sh/kernel/ptrace_64.c
index 5fd644d..178b6b0 100644
--- a/arch/sh/kernel/ptrace_64.c
+++ b/arch/sh/kernel/ptrace_64.c
@@ -20,7 +20,7 @@
#include <linux/sched.h>
#include <linux/mm.h>
#include <linux/smp.h>
-#include <linux/smp_lock.h>
+#include <linux/bitops.h>
#include <linux/errno.h>
#include <linux/ptrace.h>
#include <linux/user.h>
@@ -395,10 +395,9 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
asmlinkage int sh64_ptrace(long request, long pid, long addr, long data)
{
#define WPC_DBRMODE 0x0d104008
- static int first_call = 1;
+ static unsigned long first_call;
- lock_kernel();
- if (first_call) {
+ if (!test_and_set_bit(0, &first_call)) {
/* Set WPC.DBRMODE to 0. This makes all debug events get
* delivered through RESVEC, i.e. into the handlers in entry.S.
* (If the kernel was downloaded using a remote gdb, WPC.DBRMODE
@@ -408,9 +407,7 @@ asmlinkage int sh64_ptrace(long request, long pid, long addr, long data)
* the remote gdb.) */
printk("DBRMODE set to 0 to permit native debugging\n");
poke_real_address_q(WPC_DBRMODE, 0);
- first_call = 0;
}
- unlock_kernel();
return sys_ptrace(request, pid, addr, data);
}
--
1.7.1
prev parent reply other threads:[~2010-09-14 19:40 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1284493139-7233-1-git-send-email-arnd@arndb.de>
2010-09-14 19:40 ` [PATCH 00/18] Make the big kernel lock optional Arnd Bergmann
2010-09-14 19:55 ` [PATCH 10/18] uml: kill big kernel lock Arnd Bergmann
2010-09-14 19:55 ` [PATCH 11/18] fix rawctl compat ioctls breakage on amd64 and itanic Arnd Bergmann
2010-09-14 19:55 ` [PATCH 12/18] tlclk: remove big kernel lock Arnd Bergmann
2010-09-14 19:55 ` [PATCH 13/18] i4l: kill " Arnd Bergmann
2010-09-14 19:55 ` [PATCH 14/18] misdn: " Arnd Bergmann
2010-09-14 19:55 ` [PATCH 15/18] dvb/bt8xx: kill the " Arnd Bergmann
2010-09-14 19:55 ` [PATCH 16/18] dvb-core: " Arnd Bergmann
2010-09-14 19:55 ` [PATCH 17/18] rtmutex-tester: make it build without BKL Arnd Bergmann
2010-09-14 19:55 ` [PATCH 18/18] BKL: introduce CONFIG_BKL Arnd Bergmann
2010-09-14 19:40 ` [PATCH 01/18] hpet: kill BKL, add compat_ioctl Arnd Bergmann
2010-09-14 19:40 ` [PATCH 02/18] proc/pci: kill BKL Arnd Bergmann
2010-09-14 19:40 ` [PATCH 03/18] s390/block: kill the big kernel lock Arnd Bergmann
2010-09-14 19:40 ` [PATCH 04/18] isapnp: BKL removal Arnd Bergmann
2010-09-15 9:31 ` Will Newton
2010-09-14 19:40 ` [PATCH 05/18] alpha: kill big kernel lock Arnd Bergmann
2010-09-14 19:40 ` [PATCH 06/18] cris: autoconvert trivial BKL users Arnd Bergmann
2010-09-14 19:40 ` [PATCH 07/18] m68k: remove big kernel lock Arnd Bergmann
2010-09-14 19:40 ` [PATCH 08/18] parisc: " Arnd Bergmann
2010-09-14 19:40 ` Arnd Bergmann [this message]
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=1284493213-7263-10-git-send-email-arnd@arndb.de \
--to=arnd@arndb.de \
--cc=linux-kernel@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
Powered by JetHome