Skip to content

Commit

Permalink
Merge branch 'config' of git://git.kernel.org/pub/scm/linux/kernel/gi…
Browse files Browse the repository at this point in the history
…t/arnd/bkl

* 'config' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl:
  BKL: introduce CONFIG_BKL.
  dabusb: remove the BKL
  sunrpc: remove the big kernel lock
  init/main.c: remove BKL notations
  blktrace: remove the big kernel lock
  rtmutex-tester: make it build without BKL
  dvb-core: kill the big kernel lock
  dvb/bt8xx: kill the big kernel lock
  tlclk: remove big kernel lock
  fix rawctl compat ioctls breakage on amd64 and itanic
  uml: kill big kernel lock
  parisc: remove big kernel lock
  cris: autoconvert trivial BKL users
  alpha: kill big kernel lock
  isapnp: BKL removal
  s390/block: kill the big kernel lock
  hpet: kill BKL, add compat_ioctl
  • Loading branch information
torvalds committed Oct 22, 2010
2 parents 9115124 + 6de5bd1 commit 5704e44
Show file tree
Hide file tree
Showing 53 changed files with 347 additions and 402 deletions.
7 changes: 4 additions & 3 deletions arch/cris/arch-v10/drivers/ds1302.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include <linux/module.h>
#include <linux/miscdevice.h>
#include <linux/delay.h>
#include <linux/smp_lock.h>
#include <linux/mutex.h>
#include <linux/bcd.h>
#include <linux/capability.h>

Expand All @@ -34,6 +34,7 @@

#define RTC_MAJOR_NR 121 /* local major, change later */

static DEFINE_MUTEX(ds1302_mutex);
static const char ds1302_name[] = "ds1302";

/* The DS1302 might be connected to different bits on different products.
Expand Down Expand Up @@ -357,9 +358,9 @@ static long rtc_unlocked_ioctl(struct file *file, unsigned int cmd, unsigned lon
{
int ret;

lock_kernel();
mutex_lock(&ds1302_mutex);
ret = rtc_ioctl(file, cmd, arg);
unlock_kernel();
mutex_unlock(&ds1302_mutex);

return ret;
}
Expand Down
6 changes: 3 additions & 3 deletions arch/cris/arch-v10/drivers/pcf8563.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
#include <linux/delay.h>
#include <linux/bcd.h>
#include <linux/mutex.h>
#include <linux/smp_lock.h>

#include <asm/uaccess.h>
#include <asm/system.h>
Expand All @@ -49,6 +48,7 @@
#define rtc_read(x) i2c_readreg(RTC_I2C_READ, x)
#define rtc_write(x,y) i2c_writereg(RTC_I2C_WRITE, x, y)

static DEFINE_MUTEX(pcf8563_mutex);
static DEFINE_MUTEX(rtc_lock); /* Protect state etc */

static const unsigned char days_in_month[] =
Expand Down Expand Up @@ -343,9 +343,9 @@ static long pcf8563_unlocked_ioctl(struct file *filp, unsigned int cmd, unsigned
{
int ret;

lock_kernel();
mutex_lock(&pcf8563_mutex);
return pcf8563_ioctl(filp, cmd, arg);
unlock_kernel();
mutex_unlock(&pcf8563_mutex);

return ret;
}
Expand Down
11 changes: 6 additions & 5 deletions arch/cris/arch-v10/drivers/sync_serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include <linux/interrupt.h>
#include <linux/poll.h>
#include <linux/init.h>
#include <linux/smp_lock.h>
#include <linux/mutex.h>
#include <linux/timer.h>
#include <asm/irq.h>
#include <asm/dma.h>
Expand Down Expand Up @@ -149,6 +149,7 @@ struct sync_port {
};


static DEFINE_MUTEX(sync_serial_mutex);
static int etrax_sync_serial_init(void);
static void initialize_port(int portnbr);
static inline int sync_data_avail(struct sync_port *port);
Expand Down Expand Up @@ -445,7 +446,7 @@ static int sync_serial_open(struct inode *inode, struct file *file)
int mode;
int err = -EBUSY;

lock_kernel();
mutex_lock(&sync_serial_mutex);
DEBUG(printk(KERN_DEBUG "Open sync serial port %d\n", dev));

if (dev < 0 || dev >= NUMBER_OF_PORTS || !ports[dev].enabled) {
Expand Down Expand Up @@ -626,7 +627,7 @@ static int sync_serial_open(struct inode *inode, struct file *file)
ret = 0;

out:
unlock_kernel();
mutex_unlock(&sync_serial_mutex);
return ret;
}

Expand Down Expand Up @@ -961,9 +962,9 @@ static long sync_serial_ioctl(struct file *file,
{
long ret;

lock_kernel();
mutex_lock(&sync_serial_mutex);
ret = sync_serial_ioctl_unlocked(file, cmd, arg);
unlock_kernel();
mutex_unlock(&sync_serial_mutex);

return ret;
}
Expand Down
4 changes: 2 additions & 2 deletions arch/cris/arch-v32/drivers/cryptocop.c
Original file line number Diff line number Diff line change
Expand Up @@ -3139,9 +3139,9 @@ cryptocop_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
struct inode *inode = file->f_path.dentry->d_inode;
long ret;

lock_kernel();
mutex_lock(&cryptocop_mutex);
ret = cryptocop_ioctl_unlocked(inode, filp, cmd, arg);
unlock_kernel();
mutex_unlock(&cryptocop_mutex);

return ret;
}
Expand Down
11 changes: 6 additions & 5 deletions arch/cris/arch-v32/drivers/mach-a3/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/spinlock.h>
#include <linux/smp_lock.h>
#include <linux/mutex.h>

#include <asm/etraxgpio.h>
#include <hwregs/reg_map.h>
Expand Down Expand Up @@ -66,6 +66,7 @@ static int dp_cnt;
#define DP(x)
#endif

static DEFINE_MUTEX(gpio_mutex);
static char gpio_name[] = "etrax gpio";

#ifdef CONFIG_ETRAX_VIRTUAL_GPIO
Expand Down Expand Up @@ -391,7 +392,7 @@ static int gpio_open(struct inode *inode, struct file *filp)
if (!priv)
return -ENOMEM;

lock_kernel();
mutex_lock(&gpio_mutex);
memset(priv, 0, sizeof(*priv));

priv->minor = p;
Expand All @@ -414,7 +415,7 @@ static int gpio_open(struct inode *inode, struct file *filp)
spin_unlock_irq(&gpio_lock);
}

unlock_kernel();
mutex_unlock(&gpio_mutex);
return 0;
}

Expand Down Expand Up @@ -667,9 +668,9 @@ static long gpio_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{
long ret;

lock_kernel();
mutex_lock(&gpio_mutex);
ret = gpio_ioctl_unlocked(file, cmd, arg);
unlock_kernel();
mutex_unlock(&gpio_mutex);

return ret;
}
Expand Down
11 changes: 6 additions & 5 deletions arch/cris/arch-v32/drivers/mach-fs/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/spinlock.h>
#include <linux/smp_lock.h>
#include <linux/mutex.h>

#include <asm/etraxgpio.h>
#include <hwregs/reg_map.h>
Expand Down Expand Up @@ -64,6 +64,7 @@ static int dp_cnt;
#define DP(x)
#endif

static DEFINE_MUTEX(gpio_mutex);
static char gpio_name[] = "etrax gpio";

#if 0
Expand Down Expand Up @@ -429,7 +430,7 @@ gpio_open(struct inode *inode, struct file *filp)
if (!priv)
return -ENOMEM;

lock_kernel();
mutex_lock(&gpio_mutex);
memset(priv, 0, sizeof(*priv));

priv->minor = p;
Expand All @@ -450,7 +451,7 @@ gpio_open(struct inode *inode, struct file *filp)
alarmlist = priv;
spin_unlock_irq(&alarm_lock);

unlock_kernel();
mutex_unlock(&gpio_mutex);
return 0;
}

Expand Down Expand Up @@ -708,9 +709,9 @@ static long gpio_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{
long ret;

lock_kernel();
mutex_lock(&gpio_mutex);
ret = gpio_ioctl_unlocked(file, cmd, arg);
unlock_kernel();
mutex_unlock(&gpio_mutex);

return ret;
}
Expand Down
6 changes: 3 additions & 3 deletions arch/cris/arch-v32/drivers/pcf8563.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
#include <linux/init.h>
#include <linux/fs.h>
#include <linux/ioctl.h>
#include <linux/smp_lock.h>
#include <linux/delay.h>
#include <linux/bcd.h>
#include <linux/mutex.h>
Expand All @@ -45,6 +44,7 @@
#define rtc_read(x) i2c_readreg(RTC_I2C_READ, x)
#define rtc_write(x,y) i2c_writereg(RTC_I2C_WRITE, x, y)

static DEFINE_MUTEX(pcf8563_mutex);
static DEFINE_MUTEX(rtc_lock); /* Protect state etc */

static const unsigned char days_in_month[] =
Expand Down Expand Up @@ -339,9 +339,9 @@ static long pcf8563_unlocked_ioctl(struct file *filp, unsigned int cmd, unsigned
{
int ret;

lock_kernel();
mutex_lock(&pcf8563_mutex);
return pcf8563_ioctl(filp, cmd, arg);
unlock_kernel();
mutex_unlock(&pcf8563_mutex);

return ret;
}
Expand Down
11 changes: 6 additions & 5 deletions arch/cris/arch-v32/drivers/sync_serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include <linux/errno.h>
#include <linux/major.h>
#include <linux/sched.h>
#include <linux/smp_lock.h>
#include <linux/mutex.h>
#include <linux/interrupt.h>
#include <linux/poll.h>
#include <linux/init.h>
Expand Down Expand Up @@ -145,6 +145,7 @@ typedef struct sync_port
spinlock_t lock;
} sync_port;

static DEFINE_MUTEX(sync_serial_mutex);
static int etrax_sync_serial_init(void);
static void initialize_port(int portnbr);
static inline int sync_data_avail(struct sync_port *port);
Expand Down Expand Up @@ -434,7 +435,7 @@ static int sync_serial_open(struct inode *inode, struct file *file)
reg_dma_rw_cfg cfg = {.en = regk_dma_yes};
reg_dma_rw_intr_mask intr_mask = {.data = regk_dma_yes};

lock_kernel();
mutex_lock(&sync_serial_mutex);
DEBUG(printk(KERN_DEBUG "Open sync serial port %d\n", dev));

if (dev < 0 || dev >= NBR_PORTS || !ports[dev].enabled)
Expand Down Expand Up @@ -583,7 +584,7 @@ static int sync_serial_open(struct inode *inode, struct file *file)
port->busy++;
ret = 0;
out:
unlock_kernel();
mutex_unlock(&sync_serial_mutex);
return ret;
}

Expand Down Expand Up @@ -966,9 +967,9 @@ static long sync_serial_ioctl(struct file *file,
{
long ret;

lock_kernel();
mutex_lock(&sync_serial_mutex);
ret = sync_serial_ioctl_unlocked(file, cmd, arg);
unlock_kernel();
mutex_unlock(&sync_serial_mutex);

return ret;
}
Expand Down
4 changes: 0 additions & 4 deletions arch/parisc/kernel/perf.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
#include <linux/init.h>
#include <linux/proc_fs.h>
#include <linux/miscdevice.h>
#include <linux/smp_lock.h>
#include <linux/spinlock.h>

#include <asm/uaccess.h>
Expand Down Expand Up @@ -261,16 +260,13 @@ printk("Preparing to start counters\n");
*/
static int perf_open(struct inode *inode, struct file *file)
{
lock_kernel();
spin_lock(&perf_lock);
if (perf_enabled) {
spin_unlock(&perf_lock);
unlock_kernel();
return -EBUSY;
}
perf_enabled = 1;
spin_unlock(&perf_lock);
unlock_kernel();

return 0;
}
Expand Down
13 changes: 7 additions & 6 deletions arch/um/drivers/harddog_kern.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,15 @@
#include <linux/miscdevice.h>
#include <linux/watchdog.h>
#include <linux/reboot.h>
#include <linux/smp_lock.h>
#include <linux/mutex.h>
#include <linux/init.h>
#include <linux/spinlock.h>
#include <asm/uaccess.h>
#include "mconsole.h"

MODULE_LICENSE("GPL");

static DEFINE_MUTEX(harddog_mutex);
static DEFINE_SPINLOCK(lock);
static int timer_alive;
static int harddog_in_fd = -1;
Expand All @@ -66,7 +67,7 @@ static int harddog_open(struct inode *inode, struct file *file)
int err = -EBUSY;
char *sock = NULL;

lock_kernel();
mutex_lock(&harddog_mutex);
spin_lock(&lock);
if(timer_alive)
goto err;
Expand All @@ -83,11 +84,11 @@ static int harddog_open(struct inode *inode, struct file *file)

timer_alive = 1;
spin_unlock(&lock);
unlock_kernel();
mutex_unlock(&harddog_mutex);
return nonseekable_open(inode, file);
err:
spin_unlock(&lock);
unlock_kernel();
mutex_unlock(&harddog_mutex);
return err;
}

Expand Down Expand Up @@ -153,9 +154,9 @@ static long harddog_ioctl(struct file *file,
{
long ret;

lock_kernel();
mutex_lock(&harddog_mutex);
ret = harddog_ioctl_unlocked(file, cmd, arg);
unlock_kernel();
mutex_unlock(&harddog_mutex);

return ret;
}
Expand Down
Loading

0 comments on commit 5704e44

Please sign in to comment.