[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8bd0f97a0805201601h1b08df6fw3fbf6c58759b07b4@mail.gmail.com>
Date: Tue, 20 May 2008 19:01:24 -0400
From: "Mike Frysinger" <vapier.adi@...il.com>
To: "Arnd Bergmann" <arnd@...db.de>, "Wu, Bryan" <Bryan.Wu@...log.com>
Cc: "Jonathan Corbet" <corbet@....net>,
"Linus Torvalds" <torvalds@...ux-foundation.org>,
"Ingo Molnar" <mingo@...e.hu>,
"Andrew Morton" <akpm@...ux-foundation.org>,
"Peter Zijlstra" <a.p.zijlstra@...llo.nl>,
"Thomas Gleixner" <tglx@...utronix.de>,
"Alan Cox" <alan@...rguk.ukuu.org.uk>,
"Alexander Viro" <viro@....linux.org.uk>,
linux-kernel@...r.kernel.org
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@...db.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists