* Re: [PATCH] nvram: Convert nvram_ioctl to unlocked_ioctl, remove smp_lock.h [not found] <1269866171-7331-2-git-send-email-jkacur@redhat.com> @ 2010-03-29 13:33 ` John Kacur 2010-03-29 18:56 ` Frederic Weisbecker 0 siblings, 1 reply; 3+ messages in thread From: John Kacur @ 2010-03-29 13:33 UTC (permalink / raw) To: Ingo Molnar Cc: Alan Cox, Arnd Bergmann, Andrew Morton, Frederic Weisbecker, Jan Blunck, Matthew Wilcox, Oleg Nesterov, Thomas Gleixner, linux-kernel ----- "John Kacur" <jkacur@redhat.com> wrote: > After removing the BKL from open, we can also convert nvram_ioctl to > an unlocked_ioctl. It has it's only spin_lock, and doesn't rely on the > BKL > > This file no longer uses the BKL so smp_lock.h can be removed. > > Signed-off-by: John Kacur <jkacur@redhat.com> > --- > drivers/char/nvram.c | 18 ++++++++---------- > 1 files changed, 8 insertions(+), 10 deletions(-) > > diff --git a/drivers/char/nvram.c b/drivers/char/nvram.c > index 5eb83c3..0c3ba6a 100644 > --- a/drivers/char/nvram.c > +++ b/drivers/char/nvram.c > @@ -110,7 +110,6 @@ > #include <linux/spinlock.h> > #include <linux/io.h> > #include <linux/uaccess.h> > -#include <linux/smp_lock.h> > > #include <asm/system.h> > > @@ -297,8 +296,7 @@ checksum_err: > return -EIO; > } > > -static int nvram_ioctl(struct inode *inode, struct file *file, > - unsigned int cmd, unsigned long arg) > +static long nvram_ioctl(struct file *file, unsigned int cmd, unsigned > long arg) > { > int i; > > @@ -419,13 +417,13 @@ static int nvram_add_proc_fs(void) > #endif /* CONFIG_PROC_FS */ > > static const struct file_operations nvram_fops = { > - .owner = THIS_MODULE, > - .llseek = nvram_llseek, > - .read = nvram_read, > - .write = nvram_write, > - .ioctl = nvram_ioctl, > - .open = nvram_open, > - .release = nvram_release, > + .owner = THIS_MODULE, > + .llseek = nvram_llseek, > + .read = nvram_read, > + .write = nvram_write, > + .unlocked_ioctl = nvram_ioctl, > + .open = nvram_open, > + .release = nvram_release, > }; > > static struct miscdevice nvram_dev = { > -- > 1.6.0.6 Sorry for the double send, I must have messed-up something with git-send-email. The --compose failed on me, and that part of the message was lost afaict. What I wanted to say was, Ingo, in the past you carried nvram fixes, so if no-one objects to this change, can you integrate this one? This did have a curiosity in the history. It seems that Linus's tree had the remove smp_lock.h patch before the patch to remove BKL hit his tree. So I combined that little bit with my previous patch that turns this into an unlocked ioctl. (resend of http://lkml.indiana.edu/hypermail/linux/kernel/0910.2/01608.html) Thanks John ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] nvram: Convert nvram_ioctl to unlocked_ioctl, remove smp_lock.h 2010-03-29 13:33 ` [PATCH] nvram: Convert nvram_ioctl to unlocked_ioctl, remove smp_lock.h John Kacur @ 2010-03-29 18:56 ` Frederic Weisbecker 2010-03-29 19:06 ` John Kacur 0 siblings, 1 reply; 3+ messages in thread From: Frederic Weisbecker @ 2010-03-29 18:56 UTC (permalink / raw) To: John Kacur Cc: Ingo Molnar, Alan Cox, Arnd Bergmann, Andrew Morton, Jan Blunck, Matthew Wilcox, Oleg Nesterov, Thomas Gleixner, linux-kernel On Mon, Mar 29, 2010 at 09:33:42AM -0400, John Kacur wrote: > Sorry for the double send, I must have messed-up something with > git-send-email. The --compose failed on me, and that part of the message was > lost afaict. > > What I wanted to say was, Ingo, in the past you carried nvram fixes, so > if no-one objects to this change, can you integrate this one? Note: Just in case, as I don't know if Ingo or Thomas still maintain a kill-bkl tree, I keep this patch somewhere so that if it's not merged in a tree in one week or so, I'll queue it up in mine. Thanks. ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] nvram: Convert nvram_ioctl to unlocked_ioctl, remove smp_lock.h 2010-03-29 18:56 ` Frederic Weisbecker @ 2010-03-29 19:06 ` John Kacur 0 siblings, 0 replies; 3+ messages in thread From: John Kacur @ 2010-03-29 19:06 UTC (permalink / raw) To: Frederic Weisbecker Cc: Ingo Molnar, Alan Cox, Arnd Bergmann, Andrew Morton, Jan Blunck, Matthew Wilcox, Oleg Nesterov, Thomas Gleixner, linux-kernel On Mon, Mar 29, 2010 at 8:56 PM, Frederic Weisbecker <fweisbec@gmail.com> wrote: > On Mon, Mar 29, 2010 at 09:33:42AM -0400, John Kacur wrote: >> Sorry for the double send, I must have messed-up something with >> git-send-email. The --compose failed on me, and that part of the message was >> lost afaict. >> >> What I wanted to say was, Ingo, in the past you carried nvram fixes, so >> if no-one objects to this change, can you integrate this one? > > > > Note: Just in case, as I don't know if Ingo or Thomas still maintain > a kill-bkl tree, I keep this patch somewhere so that if it's not merged > in a tree in one week or so, I'll queue it up in mine. > In this particular case, I would like to see it get tip testing though. Thanks. ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-03-29 19:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1269866171-7331-2-git-send-email-jkacur@redhat.com>
2010-03-29 13:33 ` [PATCH] nvram: Convert nvram_ioctl to unlocked_ioctl, remove smp_lock.h John Kacur
2010-03-29 18:56 ` Frederic Weisbecker
2010-03-29 19:06 ` John Kacur
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.