mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Ingo Molnar <mingo@elte.hu>, Arnd Bergmann <arnd@arndb.de>,
	ALan Cox <alan@lxorguk.ukuu.org.uk>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Tony Luck <tony.luck@intel.com>
Subject: [patch 1/7] ia64: Remove the BKL from perfmon
Date: Thu, 15 Oct 2009 08:42:16 -0000	[thread overview]
Message-ID: <20091015083933.775584232@linutronix.de> (raw)
In-Reply-To: <20091015083906.716130653@linutronix.de>

[-- Attachment #1: ia64-remove-bkl-from-perfmon.patch --]
[-- Type: text/plain, Size: 2773 bytes --]

pfm_ioctl() is empty and can be safely converted to unlocked_ioctl. We
could also remove it, but that would change the return value.

sn_hwperf_ioctl() drops the BKL on entry and reacquires is on
exit. Convert to unlocked_ioctl.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Tony Luck <tony.luck@intel.com>
---
 arch/ia64/kernel/perfmon.c          |   21 ++++++++++-----------
 arch/ia64/sn/kernel/sn2/sn_hwperf.c |    8 ++------
 2 files changed, 12 insertions(+), 17 deletions(-)

Index: linux-2.6-tip/arch/ia64/kernel/perfmon.c
===================================================================
--- linux-2.6-tip.orig/arch/ia64/kernel/perfmon.c
+++ linux-2.6-tip/arch/ia64/kernel/perfmon.c
@@ -1701,8 +1701,7 @@ pfm_poll(struct file *filp, poll_table *
 	return mask;
 }
 
-static int
-pfm_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg)
+static long pfm_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 {
 	DPRINT(("pfm_ioctl called\n"));
 	return -EINVAL;
@@ -2179,15 +2178,15 @@ pfm_no_open(struct inode *irrelevant, st
 
 
 static const struct file_operations pfm_file_ops = {
-	.llseek   = no_llseek,
-	.read     = pfm_read,
-	.write    = pfm_write,
-	.poll     = pfm_poll,
-	.ioctl    = pfm_ioctl,
-	.open     = pfm_no_open,	/* special open code to disallow open via /proc */
-	.fasync   = pfm_fasync,
-	.release  = pfm_close,
-	.flush	  = pfm_flush
+	.llseek		= no_llseek,
+	.read		= pfm_read,
+	.write		= pfm_write,
+	.poll		= pfm_poll,
+	.unlocked_ioctl	= pfm_ioctl,
+	.open		= pfm_no_open,	/* special open code to disallow open via /proc */
+	.fasync		= pfm_fasync,
+	.release	= pfm_close,
+	.flush		= pfm_flush
 };
 
 static int
Index: linux-2.6-tip/arch/ia64/sn/kernel/sn2/sn_hwperf.c
===================================================================
--- linux-2.6-tip.orig/arch/ia64/sn/kernel/sn2/sn_hwperf.c
+++ linux-2.6-tip/arch/ia64/sn/kernel/sn2/sn_hwperf.c
@@ -682,8 +682,7 @@ static int sn_hwperf_map_err(int hwperf_
 /*
  * ioctl for "sn_hwperf" misc device
  */
-static int
-sn_hwperf_ioctl(struct inode *in, struct file *fp, u32 op, unsigned long arg)
+static long sn_hwperf_ioctl(struct file *fp, u32 op, unsigned long arg)
 {
 	struct sn_hwperf_ioctl_args a;
 	struct cpuinfo_ia64 *cdata;
@@ -699,8 +698,6 @@ sn_hwperf_ioctl(struct inode *in, struct
 	int i;
 	int j;
 
-	unlock_kernel();
-
 	/* only user requests are allowed here */
 	if ((op & SN_HWPERF_OP_MASK) < 10) {
 		r = -EINVAL;
@@ -858,12 +855,11 @@ sn_hwperf_ioctl(struct inode *in, struct
 error:
 	vfree(p);
 
-	lock_kernel();
 	return r;
 }
 
 static const struct file_operations sn_hwperf_fops = {
-	.ioctl = sn_hwperf_ioctl,
+	.unlocked_ioctl = sn_hwperf_ioctl,
 };
 
 static struct miscdevice sn_hwperf_dev = {



  reply	other threads:[~2009-10-15  8:43 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-15  8:42 [patch 0/7] BKL the next lot Thomas Gleixner
2009-10-15  8:42 ` Thomas Gleixner [this message]
2009-10-15  8:42 ` [patch 2/7] m68k: Remove BKL from rtc implementations Thomas Gleixner
2010-03-07 12:40   ` Geert Uytterhoeven
2009-10-15  8:42 ` [patch 3/7] powerpc: Use unlocked ioctl in nvram_64 Thomas Gleixner
2009-10-15  8:42 ` [patch 4/7] sh: Remove BKL from landisk gio Thomas Gleixner
2009-10-16  6:18   ` Paul Mundt
2009-10-15  8:42 ` [patch 5/7] um: Convert hostaudio to unlocked ioctl Thomas Gleixner
2009-10-15  8:42 ` [patch 6/7] um: Convert mmapper to unlocked_ioctl Thomas Gleixner
2009-10-15 13:00   ` Arnd Bergmann
2009-10-15 14:50     ` Thomas Gleixner
2009-10-15 15:29     ` Alan Cox
2009-10-16 19:42       ` Arnd Bergmann
2009-10-17  2:58         ` Thomas Gleixner
2009-10-15  8:42 ` [patch 7/7] um: Remove BKL from harddog Thomas Gleixner

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=20091015083933.775584232@linutronix.de \
    --to=tglx@linutronix.de \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=arnd@arndb.de \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tony.luck@intel.com \
    /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