Messages in this thread | | | Date | Tue, 20 May 2008 19:01:24 -0400 | From | "Mike Frysinger" <> | Subject | Re: [PATCH 1/3, RFC] misc char dev BKL pushdown |
| |
On Mon, May 19, 2008 at 7:26 PM, Arnd Bergmann wrote: > The Big Kernel Lock has been pushed down from chardev_open > to misc_open, this change moves it to the individual misc > driver open functions. > > As before, the change was purely mechanical, most drivers > should actually not need the BKL. In particular, we still > hold the misc_mtx() while calling the open() function > The patch should probably be split into one changeset > per driver. > > Signed-off-by: Arnd Bergmann <arnd@arndb.de> > > --- > Index: linux-2.6/arch/blackfin/mach-bf561/coreb.c > =================================================================== > --- linux-2.6.orig/arch/blackfin/mach-bf561/coreb.c > +++ linux-2.6/arch/blackfin/mach-bf561/coreb.c > @@ -32,6 +32,7 @@ > #include <linux/device.h> > #include <linux/ioport.h> > #include <linux/module.h> > +#include <linux/smp_lock.h> > #include <linux/uaccess.h> > #include <linux/fs.h> > #include <asm/dma.h> > @@ -196,6 +197,7 @@ static loff_t coreb_lseek(struct file *f > > static int coreb_open(struct inode *inode, struct file *file) > { > + lock_kernel(); > spin_lock_irq(&coreb_lock); > > if (coreb_status & COREB_IS_OPEN) > @@ -204,10 +206,12 @@ static int coreb_open(struct inode *inod > coreb_status |= COREB_IS_OPEN; > > spin_unlock_irq(&coreb_lock); > + unlock_kernel(); > return 0; > > out_busy: > spin_unlock_irq(&coreb_lock); > + unlock_kernel(); > return -EBUSY; > }
please drop the coreb.c changes from your patch -mike
| |