Commit 673b864fd76a29031aa0b4b08fc80886d527b3b7

Authored by Linus Torvalds

Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
  arch/sparc/mm: Use GFP_KERNEL
  MAINTAINERS: Add trailing slash to SBUS path.
  sbus: autoconvert trivial BKL users to private mutex

Showing 7 changed files Side-by-side Diff

... ... @@ -5357,7 +5357,7 @@
5357 5357 T: git git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-next-2.6.git
5358 5358 S: Maintained
5359 5359 F: arch/sparc/
5360   -F: drivers/sbus
  5360 +F: drivers/sbus/
5361 5361  
5362 5362 SPARC SERIAL DRIVERS
5363 5363 M: "David S. Miller" <davem@davemloft.net>
arch/sparc/mm/iommu.c
... ... @@ -63,7 +63,7 @@
63 63 unsigned long *bitmap;
64 64 unsigned long tmp;
65 65  
66   - iommu = kmalloc(sizeof(struct iommu_struct), GFP_ATOMIC);
  66 + iommu = kmalloc(sizeof(struct iommu_struct), GFP_KERNEL);
67 67 if (!iommu) {
68 68 prom_printf("Unable to allocate iommu structure\n");
69 69 prom_halt();
drivers/sbus/char/display7seg.c
... ... @@ -13,7 +13,7 @@
13 13 #include <linux/miscdevice.h>
14 14 #include <linux/ioport.h> /* request_region */
15 15 #include <linux/slab.h>
16   -#include <linux/smp_lock.h>
  16 +#include <linux/mutex.h>
17 17 #include <linux/of.h>
18 18 #include <linux/of_device.h>
19 19 #include <asm/atomic.h>
... ... @@ -26,6 +26,7 @@
26 26 #define DRIVER_NAME "d7s"
27 27 #define PFX DRIVER_NAME ": "
28 28  
  29 +static DEFINE_MUTEX(d7s_mutex);
29 30 static int sol_compat = 0; /* Solaris compatibility mode */
30 31  
31 32 /* Solaris compatibility flag -
... ... @@ -74,7 +75,6 @@
74 75 {
75 76 if (D7S_MINOR != iminor(inode))
76 77 return -ENODEV;
77   - cycle_kernel_lock();
78 78 atomic_inc(&d7s_users);
79 79 return 0;
80 80 }
... ... @@ -110,7 +110,7 @@
110 110 if (D7S_MINOR != iminor(file->f_path.dentry->d_inode))
111 111 return -ENODEV;
112 112  
113   - lock_kernel();
  113 + mutex_lock(&d7s_mutex);
114 114 switch (cmd) {
115 115 case D7SIOCWR:
116 116 /* assign device register values we mask-out D7S_FLIP
... ... @@ -151,7 +151,7 @@
151 151 writeb(regs, p->regs);
152 152 break;
153 153 };
154   - unlock_kernel();
  154 + mutex_unlock(&d7s_mutex);
155 155  
156 156 return error;
157 157 }
drivers/sbus/char/envctrl.c
... ... @@ -27,7 +27,6 @@
27 27 #include <linux/kmod.h>
28 28 #include <linux/reboot.h>
29 29 #include <linux/slab.h>
30   -#include <linux/smp_lock.h>
31 30 #include <linux/of.h>
32 31 #include <linux/of_device.h>
33 32  
... ... @@ -699,7 +698,6 @@
699 698 static int
700 699 envctrl_open(struct inode *inode, struct file *file)
701 700 {
702   - cycle_kernel_lock();
703 701 file->private_data = NULL;
704 702 return 0;
705 703 }
drivers/sbus/char/flash.c
... ... @@ -10,7 +10,7 @@
10 10 #include <linux/fcntl.h>
11 11 #include <linux/poll.h>
12 12 #include <linux/init.h>
13   -#include <linux/smp_lock.h>
  13 +#include <linux/mutex.h>
14 14 #include <linux/spinlock.h>
15 15 #include <linux/mm.h>
16 16 #include <linux/of.h>
... ... @@ -22,6 +22,7 @@
22 22 #include <asm/io.h>
23 23 #include <asm/upa.h>
24 24  
  25 +static DEFINE_MUTEX(flash_mutex);
25 26 static DEFINE_SPINLOCK(flash_lock);
26 27 static struct {
27 28 unsigned long read_base; /* Physical read address */
... ... @@ -80,7 +81,7 @@
80 81 static long long
81 82 flash_llseek(struct file *file, long long offset, int origin)
82 83 {
83   - lock_kernel();
  84 + mutex_lock(&flash_mutex);
84 85 switch (origin) {
85 86 case 0:
86 87 file->f_pos = offset;
87 88  
... ... @@ -94,10 +95,10 @@
94 95 file->f_pos = flash.read_size;
95 96 break;
96 97 default:
97   - unlock_kernel();
  98 + mutex_unlock(&flash_mutex);
98 99 return -EINVAL;
99 100 }
100   - unlock_kernel();
  101 + mutex_unlock(&flash_mutex);
101 102 return file->f_pos;
102 103 }
103 104  
104 105  
105 106  
... ... @@ -125,13 +126,13 @@
125 126 static int
126 127 flash_open(struct inode *inode, struct file *file)
127 128 {
128   - lock_kernel();
  129 + mutex_lock(&flash_mutex);
129 130 if (test_and_set_bit(0, (void *)&flash.busy) != 0) {
130   - unlock_kernel();
  131 + mutex_unlock(&flash_mutex);
131 132 return -EBUSY;
132 133 }
133 134  
134   - unlock_kernel();
  135 + mutex_unlock(&flash_mutex);
135 136 return 0;
136 137 }
137 138  
drivers/sbus/char/openprom.c
... ... @@ -33,7 +33,7 @@
33 33 #include <linux/kernel.h>
34 34 #include <linux/errno.h>
35 35 #include <linux/slab.h>
36   -#include <linux/smp_lock.h>
  36 +#include <linux/mutex.h>
37 37 #include <linux/string.h>
38 38 #include <linux/miscdevice.h>
39 39 #include <linux/init.h>
... ... @@ -61,6 +61,7 @@
61 61 } DATA;
62 62  
63 63 /* ID of the PROM node containing all of the EEPROM options. */
  64 +static DEFINE_MUTEX(openprom_mutex);
64 65 static struct device_node *options_node;
65 66  
66 67 /*
... ... @@ -316,7 +317,7 @@
316 317 if (bufsize < 0)
317 318 return bufsize;
318 319  
319   - lock_kernel();
  320 + mutex_lock(&openprom_mutex);
320 321  
321 322 switch (cmd) {
322 323 case OPROMGETOPT:
... ... @@ -367,7 +368,7 @@
367 368 }
368 369  
369 370 kfree(opp);
370   - unlock_kernel();
  371 + mutex_unlock(&openprom_mutex);
371 372  
372 373 return error;
373 374 }
... ... @@ -558,7 +559,7 @@
558 559 void __user *argp = (void __user *)arg;
559 560 int err;
560 561  
561   - lock_kernel();
  562 + mutex_lock(&openprom_mutex);
562 563 switch (cmd) {
563 564 case OPIOCGET:
564 565 err = opiocget(argp, data);
... ... @@ -589,7 +590,7 @@
589 590 err = -EINVAL;
590 591 break;
591 592 };
592   - unlock_kernel();
  593 + mutex_unlock(&openprom_mutex);
593 594  
594 595 return err;
595 596 }
596 597  
... ... @@ -697,11 +698,11 @@
697 698 if (!data)
698 699 return -ENOMEM;
699 700  
700   - lock_kernel();
  701 + mutex_lock(&openprom_mutex);
701 702 data->current_node = of_find_node_by_path("/");
702 703 data->lastnode = data->current_node;
703 704 file->private_data = (void *) data;
704   - unlock_kernel();
  705 + mutex_unlock(&openprom_mutex);
705 706  
706 707 return 0;
707 708 }
drivers/sbus/char/uctrl.c
... ... @@ -9,7 +9,7 @@
9 9 #include <linux/delay.h>
10 10 #include <linux/interrupt.h>
11 11 #include <linux/slab.h>
12   -#include <linux/smp_lock.h>
  12 +#include <linux/mutex.h>
13 13 #include <linux/ioport.h>
14 14 #include <linux/init.h>
15 15 #include <linux/miscdevice.h>
... ... @@ -72,6 +72,7 @@
72 72 #define UCTRL_STAT_RXNE_STA 0x04 /* receive FIFO not empty status */
73 73 #define UCTRL_STAT_RXO_STA 0x08 /* receive FIFO overflow status */
74 74  
  75 +static DEFINE_MUTEX(uctrl_mutex);
75 76 static const char *uctrl_extstatus[16] = {
76 77 "main power available",
77 78 "internal battery attached",
78 79  
... ... @@ -210,10 +211,10 @@
210 211 static int
211 212 uctrl_open(struct inode *inode, struct file *file)
212 213 {
213   - lock_kernel();
  214 + mutex_lock(&uctrl_mutex);
214 215 uctrl_get_event_status(global_driver);
215 216 uctrl_get_external_status(global_driver);
216   - unlock_kernel();
  217 + mutex_unlock(&uctrl_mutex);
217 218 return 0;
218 219 }
219 220