diff options
Diffstat (limited to 'arch/cris')
24 files changed, 170 insertions, 178 deletions
diff --git a/arch/cris/arch-v10/drivers/ds1302.c b/arch/cris/arch-v10/drivers/ds1302.c index 884275629ef7..3d655dcc65da 100644 --- a/arch/cris/arch-v10/drivers/ds1302.c +++ b/arch/cris/arch-v10/drivers/ds1302.c | |||
@@ -19,7 +19,7 @@ | |||
19 | #include <linux/module.h> | 19 | #include <linux/module.h> |
20 | #include <linux/miscdevice.h> | 20 | #include <linux/miscdevice.h> |
21 | #include <linux/delay.h> | 21 | #include <linux/delay.h> |
22 | #include <linux/smp_lock.h> | 22 | #include <linux/mutex.h> |
23 | #include <linux/bcd.h> | 23 | #include <linux/bcd.h> |
24 | #include <linux/capability.h> | 24 | #include <linux/capability.h> |
25 | 25 | ||
@@ -34,6 +34,7 @@ | |||
34 | 34 | ||
35 | #define RTC_MAJOR_NR 121 /* local major, change later */ | 35 | #define RTC_MAJOR_NR 121 /* local major, change later */ |
36 | 36 | ||
37 | static DEFINE_MUTEX(ds1302_mutex); | ||
37 | static const char ds1302_name[] = "ds1302"; | 38 | static const char ds1302_name[] = "ds1302"; |
38 | 39 | ||
39 | /* The DS1302 might be connected to different bits on different products. | 40 | /* The DS1302 might be connected to different bits on different products. |
@@ -357,9 +358,9 @@ static long rtc_unlocked_ioctl(struct file *file, unsigned int cmd, unsigned lon | |||
357 | { | 358 | { |
358 | int ret; | 359 | int ret; |
359 | 360 | ||
360 | lock_kernel(); | 361 | mutex_lock(&ds1302_mutex); |
361 | ret = rtc_ioctl(file, cmd, arg); | 362 | ret = rtc_ioctl(file, cmd, arg); |
362 | unlock_kernel(); | 363 | mutex_unlock(&ds1302_mutex); |
363 | 364 | ||
364 | return ret; | 365 | return ret; |
365 | } | 366 | } |
@@ -387,6 +388,7 @@ print_rtc_status(void) | |||
387 | static const struct file_operations rtc_fops = { | 388 | static const struct file_operations rtc_fops = { |
388 | .owner = THIS_MODULE, | 389 | .owner = THIS_MODULE, |
389 | .unlocked_ioctl = rtc_unlocked_ioctl, | 390 | .unlocked_ioctl = rtc_unlocked_ioctl, |
391 | .llseek = noop_llseek, | ||
390 | }; | 392 | }; |
391 | 393 | ||
392 | /* Probe for the chip by writing something to its RAM and try reading it back. */ | 394 | /* Probe for the chip by writing something to its RAM and try reading it back. */ |
diff --git a/arch/cris/arch-v10/drivers/gpio.c b/arch/cris/arch-v10/drivers/gpio.c index a07b6d25b0c7..a276f0811731 100644 --- a/arch/cris/arch-v10/drivers/gpio.c +++ b/arch/cris/arch-v10/drivers/gpio.c | |||
@@ -745,6 +745,7 @@ static const struct file_operations gpio_fops = { | |||
745 | .write = gpio_write, | 745 | .write = gpio_write, |
746 | .open = gpio_open, | 746 | .open = gpio_open, |
747 | .release = gpio_release, | 747 | .release = gpio_release, |
748 | .llseek = noop_llseek, | ||
748 | }; | 749 | }; |
749 | 750 | ||
750 | static void ioif_watcher(const unsigned int gpio_in_available, | 751 | static void ioif_watcher(const unsigned int gpio_in_available, |
diff --git a/arch/cris/arch-v10/drivers/i2c.c b/arch/cris/arch-v10/drivers/i2c.c index 77a941813819..c413539d4205 100644 --- a/arch/cris/arch-v10/drivers/i2c.c +++ b/arch/cris/arch-v10/drivers/i2c.c | |||
@@ -617,6 +617,7 @@ static const struct file_operations i2c_fops = { | |||
617 | .unlocked_ioctl = i2c_ioctl, | 617 | .unlocked_ioctl = i2c_ioctl, |
618 | .open = i2c_open, | 618 | .open = i2c_open, |
619 | .release = i2c_release, | 619 | .release = i2c_release, |
620 | .llseek = noop_llseek, | ||
620 | }; | 621 | }; |
621 | 622 | ||
622 | int __init | 623 | int __init |
diff --git a/arch/cris/arch-v10/drivers/pcf8563.c b/arch/cris/arch-v10/drivers/pcf8563.c index 7dcb1f85f42b..ea69faba9b62 100644 --- a/arch/cris/arch-v10/drivers/pcf8563.c +++ b/arch/cris/arch-v10/drivers/pcf8563.c | |||
@@ -27,7 +27,6 @@ | |||
27 | #include <linux/delay.h> | 27 | #include <linux/delay.h> |
28 | #include <linux/bcd.h> | 28 | #include <linux/bcd.h> |
29 | #include <linux/mutex.h> | 29 | #include <linux/mutex.h> |
30 | #include <linux/smp_lock.h> | ||
31 | 30 | ||
32 | #include <asm/uaccess.h> | 31 | #include <asm/uaccess.h> |
33 | #include <asm/system.h> | 32 | #include <asm/system.h> |
@@ -49,6 +48,7 @@ | |||
49 | #define rtc_read(x) i2c_readreg(RTC_I2C_READ, x) | 48 | #define rtc_read(x) i2c_readreg(RTC_I2C_READ, x) |
50 | #define rtc_write(x,y) i2c_writereg(RTC_I2C_WRITE, x, y) | 49 | #define rtc_write(x,y) i2c_writereg(RTC_I2C_WRITE, x, y) |
51 | 50 | ||
51 | static DEFINE_MUTEX(pcf8563_mutex); | ||
52 | static DEFINE_MUTEX(rtc_lock); /* Protect state etc */ | 52 | static DEFINE_MUTEX(rtc_lock); /* Protect state etc */ |
53 | 53 | ||
54 | static const unsigned char days_in_month[] = | 54 | static const unsigned char days_in_month[] = |
@@ -64,6 +64,7 @@ static int voltage_low; | |||
64 | static const struct file_operations pcf8563_fops = { | 64 | static const struct file_operations pcf8563_fops = { |
65 | .owner = THIS_MODULE, | 65 | .owner = THIS_MODULE, |
66 | .unlocked_ioctl = pcf8563_unlocked_ioctl, | 66 | .unlocked_ioctl = pcf8563_unlocked_ioctl, |
67 | .llseek = noop_llseek, | ||
67 | }; | 68 | }; |
68 | 69 | ||
69 | unsigned char | 70 | unsigned char |
@@ -343,9 +344,9 @@ static long pcf8563_unlocked_ioctl(struct file *filp, unsigned int cmd, unsigned | |||
343 | { | 344 | { |
344 | int ret; | 345 | int ret; |
345 | 346 | ||
346 | lock_kernel(); | 347 | mutex_lock(&pcf8563_mutex); |
347 | return pcf8563_ioctl(filp, cmd, arg); | 348 | return pcf8563_ioctl(filp, cmd, arg); |
348 | unlock_kernel(); | 349 | mutex_unlock(&pcf8563_mutex); |
349 | 350 | ||
350 | return ret; | 351 | return ret; |
351 | } | 352 | } |
diff --git a/arch/cris/arch-v10/drivers/sync_serial.c b/arch/cris/arch-v10/drivers/sync_serial.c index ee2dd4323daf..399dc1ec8e6f 100644 --- a/arch/cris/arch-v10/drivers/sync_serial.c +++ b/arch/cris/arch-v10/drivers/sync_serial.c | |||
@@ -20,7 +20,7 @@ | |||
20 | #include <linux/interrupt.h> | 20 | #include <linux/interrupt.h> |
21 | #include <linux/poll.h> | 21 | #include <linux/poll.h> |
22 | #include <linux/init.h> | 22 | #include <linux/init.h> |
23 | #include <linux/smp_lock.h> | 23 | #include <linux/mutex.h> |
24 | #include <linux/timer.h> | 24 | #include <linux/timer.h> |
25 | #include <asm/irq.h> | 25 | #include <asm/irq.h> |
26 | #include <asm/dma.h> | 26 | #include <asm/dma.h> |
@@ -149,6 +149,7 @@ struct sync_port { | |||
149 | }; | 149 | }; |
150 | 150 | ||
151 | 151 | ||
152 | static DEFINE_MUTEX(sync_serial_mutex); | ||
152 | static int etrax_sync_serial_init(void); | 153 | static int etrax_sync_serial_init(void); |
153 | static void initialize_port(int portnbr); | 154 | static void initialize_port(int portnbr); |
154 | static inline int sync_data_avail(struct sync_port *port); | 155 | static inline int sync_data_avail(struct sync_port *port); |
@@ -250,7 +251,8 @@ static const struct file_operations sync_serial_fops = { | |||
250 | .poll = sync_serial_poll, | 251 | .poll = sync_serial_poll, |
251 | .unlocked_ioctl = sync_serial_ioctl, | 252 | .unlocked_ioctl = sync_serial_ioctl, |
252 | .open = sync_serial_open, | 253 | .open = sync_serial_open, |
253 | .release = sync_serial_release | 254 | .release = sync_serial_release, |
255 | .llseek = noop_llseek, | ||
254 | }; | 256 | }; |
255 | 257 | ||
256 | static int __init etrax_sync_serial_init(void) | 258 | static int __init etrax_sync_serial_init(void) |
@@ -445,7 +447,7 @@ static int sync_serial_open(struct inode *inode, struct file *file) | |||
445 | int mode; | 447 | int mode; |
446 | int err = -EBUSY; | 448 | int err = -EBUSY; |
447 | 449 | ||
448 | lock_kernel(); | 450 | mutex_lock(&sync_serial_mutex); |
449 | DEBUG(printk(KERN_DEBUG "Open sync serial port %d\n", dev)); | 451 | DEBUG(printk(KERN_DEBUG "Open sync serial port %d\n", dev)); |
450 | 452 | ||
451 | if (dev < 0 || dev >= NUMBER_OF_PORTS || !ports[dev].enabled) { | 453 | if (dev < 0 || dev >= NUMBER_OF_PORTS || !ports[dev].enabled) { |
@@ -626,7 +628,7 @@ static int sync_serial_open(struct inode *inode, struct file *file) | |||
626 | ret = 0; | 628 | ret = 0; |
627 | 629 | ||
628 | out: | 630 | out: |
629 | unlock_kernel(); | 631 | mutex_unlock(&sync_serial_mutex); |
630 | return ret; | 632 | return ret; |
631 | } | 633 | } |
632 | 634 | ||
@@ -961,9 +963,9 @@ static long sync_serial_ioctl(struct file *file, | |||
961 | { | 963 | { |
962 | long ret; | 964 | long ret; |
963 | 965 | ||
964 | lock_kernel(); | 966 | mutex_lock(&sync_serial_mutex); |
965 | ret = sync_serial_ioctl_unlocked(file, cmd, arg); | 967 | ret = sync_serial_ioctl_unlocked(file, cmd, arg); |
966 | unlock_kernel(); | 968 | mutex_unlock(&sync_serial_mutex); |
967 | 969 | ||
968 | return ret; | 970 | return ret; |
969 | } | 971 | } |
diff --git a/arch/cris/arch-v10/kernel/process.c b/arch/cris/arch-v10/kernel/process.c index 93f0f64b1326..9a57db6907f5 100644 --- a/arch/cris/arch-v10/kernel/process.c +++ b/arch/cris/arch-v10/kernel/process.c | |||
@@ -204,7 +204,9 @@ asmlinkage int sys_vfork(long r10, long r11, long r12, long r13, long mof, long | |||
204 | /* | 204 | /* |
205 | * sys_execve() executes a new program. | 205 | * sys_execve() executes a new program. |
206 | */ | 206 | */ |
207 | asmlinkage int sys_execve(const char *fname, char **argv, char **envp, | 207 | asmlinkage int sys_execve(const char *fname, |
208 | const char *const *argv, | ||
209 | const char *const *envp, | ||
208 | long r13, long mof, long srp, | 210 | long r13, long mof, long srp, |
209 | struct pt_regs *regs) | 211 | struct pt_regs *regs) |
210 | { | 212 | { |
diff --git a/arch/cris/arch-v10/kernel/ptrace.c b/arch/cris/arch-v10/kernel/ptrace.c index e70c804e9377..320065f3cbe5 100644 --- a/arch/cris/arch-v10/kernel/ptrace.c +++ b/arch/cris/arch-v10/kernel/ptrace.c | |||
@@ -76,9 +76,11 @@ ptrace_disable(struct task_struct *child) | |||
76 | * (in user space) where the result of the ptrace call is written (instead of | 76 | * (in user space) where the result of the ptrace call is written (instead of |
77 | * being returned). | 77 | * being returned). |
78 | */ | 78 | */ |
79 | long arch_ptrace(struct task_struct *child, long request, long addr, long data) | 79 | long arch_ptrace(struct task_struct *child, long request, |
80 | unsigned long addr, unsigned long data) | ||
80 | { | 81 | { |
81 | int ret; | 82 | int ret; |
83 | unsigned int regno = addr >> 2; | ||
82 | unsigned long __user *datap = (unsigned long __user *)data; | 84 | unsigned long __user *datap = (unsigned long __user *)data; |
83 | 85 | ||
84 | switch (request) { | 86 | switch (request) { |
@@ -93,10 +95,10 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
93 | unsigned long tmp; | 95 | unsigned long tmp; |
94 | 96 | ||
95 | ret = -EIO; | 97 | ret = -EIO; |
96 | if ((addr & 3) || addr < 0 || addr > PT_MAX << 2) | 98 | if ((addr & 3) || regno > PT_MAX) |
97 | break; | 99 | break; |
98 | 100 | ||
99 | tmp = get_reg(child, addr >> 2); | 101 | tmp = get_reg(child, regno); |
100 | ret = put_user(tmp, datap); | 102 | ret = put_user(tmp, datap); |
101 | break; | 103 | break; |
102 | } | 104 | } |
@@ -110,19 +112,17 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
110 | /* Write the word at location address in the USER area. */ | 112 | /* Write the word at location address in the USER area. */ |
111 | case PTRACE_POKEUSR: | 113 | case PTRACE_POKEUSR: |
112 | ret = -EIO; | 114 | ret = -EIO; |
113 | if ((addr & 3) || addr < 0 || addr > PT_MAX << 2) | 115 | if ((addr & 3) || regno > PT_MAX) |
114 | break; | 116 | break; |
115 | 117 | ||
116 | addr >>= 2; | 118 | if (regno == PT_DCCR) { |
117 | |||
118 | if (addr == PT_DCCR) { | ||
119 | /* don't allow the tracing process to change stuff like | 119 | /* don't allow the tracing process to change stuff like |
120 | * interrupt enable, kernel/user bit, dma enables etc. | 120 | * interrupt enable, kernel/user bit, dma enables etc. |
121 | */ | 121 | */ |
122 | data &= DCCR_MASK; | 122 | data &= DCCR_MASK; |
123 | data |= get_reg(child, PT_DCCR) & ~DCCR_MASK; | 123 | data |= get_reg(child, PT_DCCR) & ~DCCR_MASK; |
124 | } | 124 | } |
125 | if (put_reg(child, addr, data)) | 125 | if (put_reg(child, regno, data)) |
126 | break; | 126 | break; |
127 | ret = 0; | 127 | ret = 0; |
128 | break; | 128 | break; |
@@ -141,7 +141,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
141 | break; | 141 | break; |
142 | } | 142 | } |
143 | 143 | ||
144 | data += sizeof(long); | 144 | datap++; |
145 | } | 145 | } |
146 | 146 | ||
147 | break; | 147 | break; |
@@ -165,7 +165,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
165 | } | 165 | } |
166 | 166 | ||
167 | put_reg(child, i, tmp); | 167 | put_reg(child, i, tmp); |
168 | data += sizeof(long); | 168 | datap++; |
169 | } | 169 | } |
170 | 170 | ||
171 | break; | 171 | break; |
diff --git a/arch/cris/arch-v32/drivers/cryptocop.c b/arch/cris/arch-v32/drivers/cryptocop.c index b07646a30509..c03bc3bc30c2 100644 --- a/arch/cris/arch-v32/drivers/cryptocop.c +++ b/arch/cris/arch-v32/drivers/cryptocop.c | |||
@@ -281,7 +281,8 @@ const struct file_operations cryptocop_fops = { | |||
281 | .owner = THIS_MODULE, | 281 | .owner = THIS_MODULE, |
282 | .open = cryptocop_open, | 282 | .open = cryptocop_open, |
283 | .release = cryptocop_release, | 283 | .release = cryptocop_release, |
284 | .unlocked_ioctl = cryptocop_ioctl | 284 | .unlocked_ioctl = cryptocop_ioctl, |
285 | .llseek = noop_llseek, | ||
285 | }; | 286 | }; |
286 | 287 | ||
287 | 288 | ||
@@ -3139,9 +3140,9 @@ cryptocop_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) | |||
3139 | struct inode *inode = file->f_path.dentry->d_inode; | 3140 | struct inode *inode = file->f_path.dentry->d_inode; |
3140 | long ret; | 3141 | long ret; |
3141 | 3142 | ||
3142 | lock_kernel(); | 3143 | mutex_lock(&cryptocop_mutex); |
3143 | ret = cryptocop_ioctl_unlocked(inode, filp, cmd, arg); | 3144 | ret = cryptocop_ioctl_unlocked(inode, filp, cmd, arg); |
3144 | unlock_kernel(); | 3145 | mutex_unlock(&cryptocop_mutex); |
3145 | 3146 | ||
3146 | return ret; | 3147 | return ret; |
3147 | } | 3148 | } |
diff --git a/arch/cris/arch-v32/drivers/i2c.c b/arch/cris/arch-v32/drivers/i2c.c index 5a3e900c9a78..ddb23996f11a 100644 --- a/arch/cris/arch-v32/drivers/i2c.c +++ b/arch/cris/arch-v32/drivers/i2c.c | |||
@@ -698,6 +698,7 @@ static const struct file_operations i2c_fops = { | |||
698 | .unlocked_ioctl = i2c_ioctl, | 698 | .unlocked_ioctl = i2c_ioctl, |
699 | .open = i2c_open, | 699 | .open = i2c_open, |
700 | .release = i2c_release, | 700 | .release = i2c_release, |
701 | .llseek = noop_llseek, | ||
701 | }; | 702 | }; |
702 | 703 | ||
703 | static int __init i2c_init(void) | 704 | static int __init i2c_init(void) |
diff --git a/arch/cris/arch-v32/drivers/mach-a3/gpio.c b/arch/cris/arch-v32/drivers/mach-a3/gpio.c index 2dcd27adbad4..c845831e2225 100644 --- a/arch/cris/arch-v32/drivers/mach-a3/gpio.c +++ b/arch/cris/arch-v32/drivers/mach-a3/gpio.c | |||
@@ -23,7 +23,7 @@ | |||
23 | #include <linux/init.h> | 23 | #include <linux/init.h> |
24 | #include <linux/interrupt.h> | 24 | #include <linux/interrupt.h> |
25 | #include <linux/spinlock.h> | 25 | #include <linux/spinlock.h> |
26 | #include <linux/smp_lock.h> | 26 | #include <linux/mutex.h> |
27 | 27 | ||
28 | #include <asm/etraxgpio.h> | 28 | #include <asm/etraxgpio.h> |
29 | #include <hwregs/reg_map.h> | 29 | #include <hwregs/reg_map.h> |
@@ -66,6 +66,7 @@ static int dp_cnt; | |||
66 | #define DP(x) | 66 | #define DP(x) |
67 | #endif | 67 | #endif |
68 | 68 | ||
69 | static DEFINE_MUTEX(gpio_mutex); | ||
69 | static char gpio_name[] = "etrax gpio"; | 70 | static char gpio_name[] = "etrax gpio"; |
70 | 71 | ||
71 | #ifdef CONFIG_ETRAX_VIRTUAL_GPIO | 72 | #ifdef CONFIG_ETRAX_VIRTUAL_GPIO |
@@ -391,7 +392,7 @@ static int gpio_open(struct inode *inode, struct file *filp) | |||
391 | if (!priv) | 392 | if (!priv) |
392 | return -ENOMEM; | 393 | return -ENOMEM; |
393 | 394 | ||
394 | lock_kernel(); | 395 | mutex_lock(&gpio_mutex); |
395 | memset(priv, 0, sizeof(*priv)); | 396 | memset(priv, 0, sizeof(*priv)); |
396 | 397 | ||
397 | priv->minor = p; | 398 | priv->minor = p; |
@@ -414,7 +415,7 @@ static int gpio_open(struct inode *inode, struct file *filp) | |||
414 | spin_unlock_irq(&gpio_lock); | 415 | spin_unlock_irq(&gpio_lock); |
415 | } | 416 | } |
416 | 417 | ||
417 | unlock_kernel(); | 418 | mutex_unlock(&gpio_mutex); |
418 | return 0; | 419 | return 0; |
419 | } | 420 | } |
420 | 421 | ||
@@ -667,9 +668,9 @@ static long gpio_ioctl(struct file *file, unsigned int cmd, unsigned long arg) | |||
667 | { | 668 | { |
668 | long ret; | 669 | long ret; |
669 | 670 | ||
670 | lock_kernel(); | 671 | mutex_lock(&gpio_mutex); |
671 | ret = gpio_ioctl_unlocked(file, cmd, arg); | 672 | ret = gpio_ioctl_unlocked(file, cmd, arg); |
672 | unlock_kernel(); | 673 | mutex_unlock(&gpio_mutex); |
673 | 674 | ||
674 | return ret; | 675 | return ret; |
675 | } | 676 | } |
@@ -893,6 +894,7 @@ static const struct file_operations gpio_fops = { | |||
893 | .write = gpio_write, | 894 | .write = gpio_write, |
894 | .open = gpio_open, | 895 | .open = gpio_open, |
895 | .release = gpio_release, | 896 | .release = gpio_release, |
897 | .llseek = noop_llseek, | ||
896 | }; | 898 | }; |
897 | 899 | ||
898 | #ifdef CONFIG_ETRAX_VIRTUAL_GPIO | 900 | #ifdef CONFIG_ETRAX_VIRTUAL_GPIO |
diff --git a/arch/cris/arch-v32/drivers/mach-fs/gpio.c b/arch/cris/arch-v32/drivers/mach-fs/gpio.c index 5ec8a7d4e7d7..ee90d2659be7 100644 --- a/arch/cris/arch-v32/drivers/mach-fs/gpio.c +++ b/arch/cris/arch-v32/drivers/mach-fs/gpio.c | |||
@@ -22,7 +22,7 @@ | |||
22 | #include <linux/init.h> | 22 | #include <linux/init.h> |
23 | #include <linux/interrupt.h> | 23 | #include <linux/interrupt.h> |
24 | #include <linux/spinlock.h> | 24 | #include <linux/spinlock.h> |
25 | #include <linux/smp_lock.h> | 25 | #include <linux/mutex.h> |
26 | 26 | ||
27 | #include <asm/etraxgpio.h> | 27 | #include <asm/etraxgpio.h> |
28 | #include <hwregs/reg_map.h> | 28 | #include <hwregs/reg_map.h> |
@@ -64,6 +64,7 @@ static int dp_cnt; | |||
64 | #define DP(x) | 64 | #define DP(x) |
65 | #endif | 65 | #endif |
66 | 66 | ||
67 | static DEFINE_MUTEX(gpio_mutex); | ||
67 | static char gpio_name[] = "etrax gpio"; | 68 | static char gpio_name[] = "etrax gpio"; |
68 | 69 | ||
69 | #if 0 | 70 | #if 0 |
@@ -429,7 +430,7 @@ gpio_open(struct inode *inode, struct file *filp) | |||
429 | if (!priv) | 430 | if (!priv) |
430 | return -ENOMEM; | 431 | return -ENOMEM; |
431 | 432 | ||
432 | lock_kernel(); | 433 | mutex_lock(&gpio_mutex); |
433 | memset(priv, 0, sizeof(*priv)); | 434 | memset(priv, 0, sizeof(*priv)); |
434 | 435 | ||
435 | priv->minor = p; | 436 | priv->minor = p; |
@@ -450,7 +451,7 @@ gpio_open(struct inode *inode, struct file *filp) | |||
450 | alarmlist = priv; | 451 | alarmlist = priv; |
451 | spin_unlock_irq(&alarm_lock); | 452 | spin_unlock_irq(&alarm_lock); |
452 | 453 | ||
453 | unlock_kernel(); | 454 | mutex_unlock(&gpio_mutex); |
454 | return 0; | 455 | return 0; |
455 | } | 456 | } |
456 | 457 | ||
@@ -708,9 +709,9 @@ static long gpio_ioctl(struct file *file, unsigned int cmd, unsigned long arg) | |||
708 | { | 709 | { |
709 | long ret; | 710 | long ret; |
710 | 711 | ||
711 | lock_kernel(); | 712 | mutex_lock(&gpio_mutex); |
712 | ret = gpio_ioctl_unlocked(file, cmd, arg); | 713 | ret = gpio_ioctl_unlocked(file, cmd, arg); |
713 | unlock_kernel(); | 714 | mutex_unlock(&gpio_mutex); |
714 | 715 | ||
715 | return ret; | 716 | return ret; |
716 | } | 717 | } |
@@ -870,6 +871,7 @@ static const struct file_operations gpio_fops = { | |||
870 | .write = gpio_write, | 871 | .write = gpio_write, |
871 | .open = gpio_open, | 872 | .open = gpio_open, |
872 | .release = gpio_release, | 873 | .release = gpio_release, |
874 | .llseek = noop_llseek, | ||
873 | }; | 875 | }; |
874 | 876 | ||
875 | #ifdef CONFIG_ETRAX_VIRTUAL_GPIO | 877 | #ifdef CONFIG_ETRAX_VIRTUAL_GPIO |
diff --git a/arch/cris/arch-v32/drivers/pcf8563.c b/arch/cris/arch-v32/drivers/pcf8563.c index bef6eb53b153..b6e4fc0aad42 100644 --- a/arch/cris/arch-v32/drivers/pcf8563.c +++ b/arch/cris/arch-v32/drivers/pcf8563.c | |||
@@ -24,7 +24,6 @@ | |||
24 | #include <linux/init.h> | 24 | #include <linux/init.h> |
25 | #include <linux/fs.h> | 25 | #include <linux/fs.h> |
26 | #include <linux/ioctl.h> | 26 | #include <linux/ioctl.h> |
27 | #include <linux/smp_lock.h> | ||
28 | #include <linux/delay.h> | 27 | #include <linux/delay.h> |
29 | #include <linux/bcd.h> | 28 | #include <linux/bcd.h> |
30 | #include <linux/mutex.h> | 29 | #include <linux/mutex.h> |
@@ -45,6 +44,7 @@ | |||
45 | #define rtc_read(x) i2c_readreg(RTC_I2C_READ, x) | 44 | #define rtc_read(x) i2c_readreg(RTC_I2C_READ, x) |
46 | #define rtc_write(x,y) i2c_writereg(RTC_I2C_WRITE, x, y) | 45 | #define rtc_write(x,y) i2c_writereg(RTC_I2C_WRITE, x, y) |
47 | 46 | ||
47 | static DEFINE_MUTEX(pcf8563_mutex); | ||
48 | static DEFINE_MUTEX(rtc_lock); /* Protect state etc */ | 48 | static DEFINE_MUTEX(rtc_lock); /* Protect state etc */ |
49 | 49 | ||
50 | static const unsigned char days_in_month[] = | 50 | static const unsigned char days_in_month[] = |
@@ -60,6 +60,7 @@ static int voltage_low; | |||
60 | static const struct file_operations pcf8563_fops = { | 60 | static const struct file_operations pcf8563_fops = { |
61 | .owner = THIS_MODULE, | 61 | .owner = THIS_MODULE, |
62 | .unlocked_ioctl = pcf8563_unlocked_ioctl, | 62 | .unlocked_ioctl = pcf8563_unlocked_ioctl, |
63 | .llseek = noop_llseek, | ||
63 | }; | 64 | }; |
64 | 65 | ||
65 | unsigned char | 66 | unsigned char |
@@ -339,9 +340,9 @@ static long pcf8563_unlocked_ioctl(struct file *filp, unsigned int cmd, unsigned | |||
339 | { | 340 | { |
340 | int ret; | 341 | int ret; |
341 | 342 | ||
342 | lock_kernel(); | 343 | mutex_lock(&pcf8563_mutex); |
343 | return pcf8563_ioctl(filp, cmd, arg); | 344 | return pcf8563_ioctl(filp, cmd, arg); |
344 | unlock_kernel(); | 345 | mutex_unlock(&pcf8563_mutex); |
345 | 346 | ||
346 | return ret; | 347 | return ret; |
347 | } | 348 | } |
diff --git a/arch/cris/arch-v32/drivers/sync_serial.c b/arch/cris/arch-v32/drivers/sync_serial.c index ca248f3adb80..c8637a9195ea 100644 --- a/arch/cris/arch-v32/drivers/sync_serial.c +++ b/arch/cris/arch-v32/drivers/sync_serial.c | |||
@@ -13,7 +13,7 @@ | |||
13 | #include <linux/errno.h> | 13 | #include <linux/errno.h> |
14 | #include <linux/major.h> | 14 | #include <linux/major.h> |
15 | #include <linux/sched.h> | 15 | #include <linux/sched.h> |
16 | #include <linux/smp_lock.h> | 16 | #include <linux/mutex.h> |
17 | #include <linux/interrupt.h> | 17 | #include <linux/interrupt.h> |
18 | #include <linux/poll.h> | 18 | #include <linux/poll.h> |
19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
@@ -145,6 +145,7 @@ typedef struct sync_port | |||
145 | spinlock_t lock; | 145 | spinlock_t lock; |
146 | } sync_port; | 146 | } sync_port; |
147 | 147 | ||
148 | static DEFINE_MUTEX(sync_serial_mutex); | ||
148 | static int etrax_sync_serial_init(void); | 149 | static int etrax_sync_serial_init(void); |
149 | static void initialize_port(int portnbr); | 150 | static void initialize_port(int portnbr); |
150 | static inline int sync_data_avail(struct sync_port *port); | 151 | static inline int sync_data_avail(struct sync_port *port); |
@@ -247,7 +248,8 @@ static const struct file_operations sync_serial_fops = { | |||
247 | .poll = sync_serial_poll, | 248 | .poll = sync_serial_poll, |
248 | .unlocked_ioctl = sync_serial_ioctl, | 249 | .unlocked_ioctl = sync_serial_ioctl, |
249 | .open = sync_serial_open, | 250 | .open = sync_serial_open, |
250 | .release = sync_serial_release | 251 | .release = sync_serial_release, |
252 | .llseek = noop_llseek, | ||
251 | }; | 253 | }; |
252 | 254 | ||
253 | static int __init etrax_sync_serial_init(void) | 255 | static int __init etrax_sync_serial_init(void) |
@@ -434,7 +436,7 @@ static int sync_serial_open(struct inode *inode, struct file *file) | |||
434 | reg_dma_rw_cfg cfg = {.en = regk_dma_yes}; | 436 | reg_dma_rw_cfg cfg = {.en = regk_dma_yes}; |
435 | reg_dma_rw_intr_mask intr_mask = {.data = regk_dma_yes}; | 437 | reg_dma_rw_intr_mask intr_mask = {.data = regk_dma_yes}; |
436 | 438 | ||
437 | lock_kernel(); | 439 | mutex_lock(&sync_serial_mutex); |
438 | DEBUG(printk(KERN_DEBUG "Open sync serial port %d\n", dev)); | 440 | DEBUG(printk(KERN_DEBUG "Open sync serial port %d\n", dev)); |
439 | 441 | ||
440 | if (dev < 0 || dev >= NBR_PORTS || !ports[dev].enabled) | 442 | if (dev < 0 || dev >= NBR_PORTS || !ports[dev].enabled) |
@@ -583,7 +585,7 @@ static int sync_serial_open(struct inode *inode, struct file *file) | |||
583 | port->busy++; | 585 | port->busy++; |
584 | ret = 0; | 586 | ret = 0; |
585 | out: | 587 | out: |
586 | unlock_kernel(); | 588 | mutex_unlock(&sync_serial_mutex); |
587 | return ret; | 589 | return ret; |
588 | } | 590 | } |
589 | 591 | ||
@@ -966,9 +968,9 @@ static long sync_serial_ioctl(struct file *file, | |||
966 | { | 968 | { |
967 | long ret; | 969 | long ret; |
968 | 970 | ||
969 | lock_kernel(); | 971 | mutex_lock(&sync_serial_mutex); |
970 | ret = sync_serial_ioctl_unlocked(file, cmd, arg); | 972 | ret = sync_serial_ioctl_unlocked(file, cmd, arg); |
971 | unlock_kernel(); | 973 | mutex_unlock(&sync_serial_mutex); |
972 | 974 | ||
973 | return ret; | 975 | return ret; |
974 | } | 976 | } |
diff --git a/arch/cris/arch-v32/kernel/process.c b/arch/cris/arch-v32/kernel/process.c index 2661a9529d70..562f84718906 100644 --- a/arch/cris/arch-v32/kernel/process.c +++ b/arch/cris/arch-v32/kernel/process.c | |||
@@ -218,8 +218,10 @@ sys_vfork(long r10, long r11, long r12, long r13, long mof, long srp, | |||
218 | 218 | ||
219 | /* sys_execve() executes a new program. */ | 219 | /* sys_execve() executes a new program. */ |
220 | asmlinkage int | 220 | asmlinkage int |
221 | sys_execve(const char *fname, char **argv, char **envp, long r13, long mof, long srp, | 221 | sys_execve(const char *fname, |
222 | struct pt_regs *regs) | 222 | const char *const *argv, |
223 | const char *const *envp, long r13, long mof, long srp, | ||
224 | struct pt_regs *regs) | ||
223 | { | 225 | { |
224 | int error; | 226 | int error; |
225 | char *filename; | 227 | char *filename; |
diff --git a/arch/cris/arch-v32/kernel/ptrace.c b/arch/cris/arch-v32/kernel/ptrace.c index f4ebd1e7d0f5..511ece94a574 100644 --- a/arch/cris/arch-v32/kernel/ptrace.c +++ b/arch/cris/arch-v32/kernel/ptrace.c | |||
@@ -126,9 +126,11 @@ ptrace_disable(struct task_struct *child) | |||
126 | } | 126 | } |
127 | 127 | ||
128 | 128 | ||
129 | long arch_ptrace(struct task_struct *child, long request, long addr, long data) | 129 | long arch_ptrace(struct task_struct *child, long request, |
130 | unsigned long addr, unsigned long data) | ||
130 | { | 131 | { |
131 | int ret; | 132 | int ret; |
133 | unsigned int regno = addr >> 2; | ||
132 | unsigned long __user *datap = (unsigned long __user *)data; | 134 | unsigned long __user *datap = (unsigned long __user *)data; |
133 | 135 | ||
134 | switch (request) { | 136 | switch (request) { |
@@ -163,10 +165,10 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
163 | unsigned long tmp; | 165 | unsigned long tmp; |
164 | 166 | ||
165 | ret = -EIO; | 167 | ret = -EIO; |
166 | if ((addr & 3) || addr < 0 || addr > PT_MAX << 2) | 168 | if ((addr & 3) || regno > PT_MAX) |
167 | break; | 169 | break; |
168 | 170 | ||
169 | tmp = get_reg(child, addr >> 2); | 171 | tmp = get_reg(child, regno); |
170 | ret = put_user(tmp, datap); | 172 | ret = put_user(tmp, datap); |
171 | break; | 173 | break; |
172 | } | 174 | } |
@@ -180,19 +182,17 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
180 | /* Write the word at location address in the USER area. */ | 182 | /* Write the word at location address in the USER area. */ |
181 | case PTRACE_POKEUSR: | 183 | case PTRACE_POKEUSR: |
182 | ret = -EIO; | 184 | ret = -EIO; |
183 | if ((addr & 3) || addr < 0 || addr > PT_MAX << 2) | 185 | if ((addr & 3) || regno > PT_MAX) |
184 | break; | 186 | break; |
185 | 187 | ||
186 | addr >>= 2; | 188 | if (regno == PT_CCS) { |
187 | |||
188 | if (addr == PT_CCS) { | ||
189 | /* don't allow the tracing process to change stuff like | 189 | /* don't allow the tracing process to change stuff like |
190 | * interrupt enable, kernel/user bit, dma enables etc. | 190 | * interrupt enable, kernel/user bit, dma enables etc. |
191 | */ | 191 | */ |
192 | data &= CCS_MASK; | 192 | data &= CCS_MASK; |
193 | data |= get_reg(child, PT_CCS) & ~CCS_MASK; | 193 | data |= get_reg(child, PT_CCS) & ~CCS_MASK; |
194 | } | 194 | } |
195 | if (put_reg(child, addr, data)) | 195 | if (put_reg(child, regno, data)) |
196 | break; | 196 | break; |
197 | ret = 0; | 197 | ret = 0; |
198 | break; | 198 | break; |
diff --git a/arch/cris/include/arch-v10/arch/irqflags.h b/arch/cris/include/arch-v10/arch/irqflags.h new file mode 100644 index 000000000000..75ef18991240 --- /dev/null +++ b/arch/cris/include/arch-v10/arch/irqflags.h | |||
@@ -0,0 +1,45 @@ | |||
1 | #ifndef __ASM_CRIS_ARCH_IRQFLAGS_H | ||
2 | #define __ASM_CRIS_ARCH_IRQFLAGS_H | ||
3 | |||
4 | #include <linux/types.h> | ||
5 | |||
6 | static inline unsigned long arch_local_save_flags(void) | ||
7 | { | ||
8 | unsigned long flags; | ||
9 | asm volatile("move $ccr,%0" : "=rm" (flags) : : "memory"); | ||
10 | return flags; | ||
11 | } | ||
12 | |||
13 | static inline void arch_local_irq_disable(void) | ||
14 | { | ||
15 | asm volatile("di" : : : "memory"); | ||
16 | } | ||
17 | |||
18 | static inline void arch_local_irq_enable(void) | ||
19 | { | ||
20 | asm volatile("ei" : : : "memory"); | ||
21 | } | ||
22 | |||
23 | static inline unsigned long arch_local_irq_save(void) | ||
24 | { | ||
25 | unsigned long flags = arch_local_save_flags(); | ||
26 | arch_local_irq_disable(); | ||
27 | return flags; | ||
28 | } | ||
29 | |||
30 | static inline void arch_local_irq_restore(unsigned long flags) | ||
31 | { | ||
32 | asm volatile("move %0,$ccr" : : "rm" (flags) : "memory"); | ||
33 | } | ||
34 | |||
35 | static inline bool arch_irqs_disabled_flags(unsigned long flags) | ||
36 | { | ||
37 | return !(flags & (1 << 5)); | ||
38 | } | ||
39 | |||
40 | static inline bool arch_irqs_disabled(void) | ||
41 | { | ||
42 | return arch_irqs_disabled_flags(arch_local_save_flags()); | ||
43 | } | ||
44 | |||
45 | #endif /* __ASM_CRIS_ARCH_IRQFLAGS_H */ | ||
diff --git a/arch/cris/include/arch-v10/arch/system.h b/arch/cris/include/arch-v10/arch/system.h index 4a9cd36c9e16..935fde34aa15 100644 --- a/arch/cris/include/arch-v10/arch/system.h +++ b/arch/cris/include/arch-v10/arch/system.h | |||
@@ -44,20 +44,4 @@ static inline unsigned long _get_base(char * addr) | |||
44 | struct __xchg_dummy { unsigned long a[100]; }; | 44 | struct __xchg_dummy { unsigned long a[100]; }; |
45 | #define __xg(x) ((struct __xchg_dummy *)(x)) | 45 | #define __xg(x) ((struct __xchg_dummy *)(x)) |
46 | 46 | ||
47 | /* interrupt control.. */ | ||
48 | #define local_save_flags(x) __asm__ __volatile__ ("move $ccr,%0" : "=rm" (x) : : "memory"); | ||
49 | #define local_irq_restore(x) __asm__ __volatile__ ("move %0,$ccr" : : "rm" (x) : "memory"); | ||
50 | #define local_irq_disable() __asm__ __volatile__ ( "di" : : :"memory"); | ||
51 | #define local_irq_enable() __asm__ __volatile__ ( "ei" : : :"memory"); | ||
52 | |||
53 | #define irqs_disabled() \ | ||
54 | ({ \ | ||
55 | unsigned long flags; \ | ||
56 | local_save_flags(flags); \ | ||
57 | !(flags & (1<<5)); \ | ||
58 | }) | ||
59 | |||
60 | /* For spinlocks etc */ | ||
61 | #define local_irq_save(x) __asm__ __volatile__ ("move $ccr,%0\n\tdi" : "=rm" (x) : : "memory"); | ||
62 | |||
63 | #endif | 47 | #endif |
diff --git a/arch/cris/include/arch-v32/arch/irqflags.h b/arch/cris/include/arch-v32/arch/irqflags.h new file mode 100644 index 000000000000..041851f8ec6f --- /dev/null +++ b/arch/cris/include/arch-v32/arch/irqflags.h | |||
@@ -0,0 +1,46 @@ | |||
1 | #ifndef __ASM_CRIS_ARCH_IRQFLAGS_H | ||
2 | #define __ASM_CRIS_ARCH_IRQFLAGS_H | ||
3 | |||
4 | #include <linux/types.h> | ||
5 | #include <arch/ptrace.h> | ||
6 | |||
7 | static inline unsigned long arch_local_save_flags(void) | ||
8 | { | ||
9 | unsigned long flags; | ||
10 | asm volatile("move $ccs,%0" : "=rm" (flags) : : "memory"); | ||
11 | return flags; | ||
12 | } | ||
13 | |||
14 | static inline void arch_local_irq_disable(void) | ||
15 | { | ||
16 | asm volatile("di" : : : "memory"); | ||
17 | } | ||
18 | |||
19 | static inline void arch_local_irq_enable(void) | ||
20 | { | ||
21 | asm volatile("ei" : : : "memory"); | ||
22 | } | ||
23 | |||
24 | static inline unsigned long arch_local_irq_save(void) | ||
25 | { | ||
26 | unsigned long flags = arch_local_save_flags(); | ||
27 | arch_local_irq_disable(); | ||
28 | return flags; | ||
29 | } | ||
30 | |||
31 | static inline void arch_local_irq_restore(unsigned long flags) | ||
32 | { | ||
33 | asm volatile("move %0,$ccs" : : "rm" (flags) : "memory"); | ||
34 | } | ||
35 | |||
36 | static inline bool arch_irqs_disabled_flags(unsigned long flags) | ||
37 | { | ||
38 | return !(flags & (1 << I_CCS_BITNR)); | ||
39 | } | ||
40 | |||
41 | static inline bool arch_irqs_disabled(void) | ||
42 | { | ||
43 | return arch_irqs_disabled_flags(arch_local_save_flags()); | ||
44 | } | ||
45 | |||
46 | #endif /* __ASM_CRIS_ARCH_IRQFLAGS_H */ | ||
diff --git a/arch/cris/include/arch-v32/arch/system.h b/arch/cris/include/arch-v32/arch/system.h index 6ca90f1f110a..76cea99eaa60 100644 --- a/arch/cris/include/arch-v32/arch/system.h +++ b/arch/cris/include/arch-v32/arch/system.h | |||
@@ -44,26 +44,4 @@ static inline unsigned long rdsp(void) | |||
44 | struct __xchg_dummy { unsigned long a[100]; }; | 44 | struct __xchg_dummy { unsigned long a[100]; }; |
45 | #define __xg(x) ((struct __xchg_dummy *)(x)) | 45 | #define __xg(x) ((struct __xchg_dummy *)(x)) |
46 | 46 | ||
47 | /* Used for interrupt control. */ | ||
48 | #define local_save_flags(x) \ | ||
49 | __asm__ __volatile__ ("move $ccs, %0" : "=rm" (x) : : "memory"); | ||
50 | |||
51 | #define local_irq_restore(x) \ | ||
52 | __asm__ __volatile__ ("move %0, $ccs" : : "rm" (x) : "memory"); | ||
53 | |||
54 | #define local_irq_disable() __asm__ __volatile__ ("di" : : : "memory"); | ||
55 | #define local_irq_enable() __asm__ __volatile__ ("ei" : : : "memory"); | ||
56 | |||
57 | #define irqs_disabled() \ | ||
58 | ({ \ | ||
59 | unsigned long flags; \ | ||
60 | \ | ||
61 | local_save_flags(flags);\ | ||
62 | !(flags & (1 << I_CCS_BITNR)); \ | ||
63 | }) | ||
64 | |||
65 | /* Used for spinlocks, etc. */ | ||
66 | #define local_irq_save(x) \ | ||
67 | __asm__ __volatile__ ("move $ccs, %0\n\tdi" : "=rm" (x) : : "memory"); | ||
68 | |||
69 | #endif /* _ASM_CRIS_ARCH_SYSTEM_H */ | 47 | #endif /* _ASM_CRIS_ARCH_SYSTEM_H */ |
diff --git a/arch/cris/include/asm/ioctls.h b/arch/cris/include/asm/ioctls.h index c9129ed37443..488fbb3f5e84 100644 --- a/arch/cris/include/asm/ioctls.h +++ b/arch/cris/include/asm/ioctls.h | |||
@@ -1,93 +1,11 @@ | |||
1 | #ifndef __ARCH_CRIS_IOCTLS_H__ | 1 | #ifndef __ARCH_CRIS_IOCTLS_H__ |
2 | #define __ARCH_CRIS_IOCTLS_H__ | 2 | #define __ARCH_CRIS_IOCTLS_H__ |
3 | 3 | ||
4 | /* verbatim copy of asm-i386/ioctls.h */ | ||
5 | |||
6 | #include <asm/ioctl.h> | ||
7 | |||
8 | /* 0x54 is just a magic number to make these relatively unique ('T') */ | ||
9 | |||
10 | #define TCGETS 0x5401 | ||
11 | #define TCSETS 0x5402 | ||
12 | #define TCSETSW 0x5403 | ||
13 | #define TCSETSF 0x5404 | ||
14 | #define TCGETA 0x5405 | ||
15 | #define TCSETA 0x5406 | ||
16 | #define TCSETAW 0x5407 | ||
17 | #define TCSETAF 0x5408 | ||
18 | #define TCSBRK 0x5409 | ||
19 | #define TCXONC 0x540A | ||
20 | #define TCFLSH 0x540B | ||
21 | #define TIOCEXCL 0x540C | ||
22 | #define TIOCNXCL 0x540D | ||
23 | #define TIOCSCTTY 0x540E | ||
24 | #define TIOCGPGRP 0x540F | ||
25 | #define TIOCSPGRP 0x5410 | ||
26 | #define TIOCOUTQ 0x5411 | ||
27 | #define TIOCSTI 0x5412 | ||
28 | #define TIOCGWINSZ 0x5413 | ||
29 | #define TIOCSWINSZ 0x5414 | ||
30 | #define TIOCMGET 0x5415 | ||
31 | #define TIOCMBIS 0x5416 | ||
32 | #define TIOCMBIC 0x5417 | ||
33 | #define TIOCMSET 0x5418 | ||
34 | #define TIOCGSOFTCAR 0x5419 | ||
35 | #define TIOCSSOFTCAR 0x541A | ||
36 | #define FIONREAD 0x541B | ||
37 | #define TIOCINQ FIONREAD | ||
38 | #define TIOCLINUX 0x541C | ||
39 | #define TIOCCONS 0x541D | ||
40 | #define TIOCGSERIAL 0x541E | ||
41 | #define TIOCSSERIAL 0x541F | ||
42 | #define TIOCPKT 0x5420 | ||
43 | #define FIONBIO 0x5421 | ||
44 | #define TIOCNOTTY 0x5422 | ||
45 | #define TIOCSETD 0x5423 | ||
46 | #define TIOCGETD 0x5424 | ||
47 | #define TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */ | ||
48 | #define TIOCSBRK 0x5427 /* BSD compatibility */ | ||
49 | #define TIOCCBRK 0x5428 /* BSD compatibility */ | ||
50 | #define TIOCGSID 0x5429 /* Return the session ID of FD */ | ||
51 | #define TCGETS2 _IOR('T',0x2A, struct termios2) | ||
52 | #define TCSETS2 _IOW('T',0x2B, struct termios2) | ||
53 | #define TCSETSW2 _IOW('T',0x2C, struct termios2) | ||
54 | #define TCSETSF2 _IOW('T',0x2D, struct termios2) | ||
55 | #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ | ||
56 | #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ | ||
57 | #define TIOCSIG _IOW('T',0x36, int) /* Generate signal on Pty slave */ | ||
58 | |||
59 | #define FIONCLEX 0x5450 /* these numbers need to be adjusted. */ | ||
60 | #define FIOCLEX 0x5451 | ||
61 | #define FIOASYNC 0x5452 | ||
62 | #define TIOCSERCONFIG 0x5453 | ||
63 | #define TIOCSERGWILD 0x5454 | ||
64 | #define TIOCSERSWILD 0x5455 | ||
65 | #define TIOCGLCKTRMIOS 0x5456 | ||
66 | #define TIOCSLCKTRMIOS 0x5457 | ||
67 | #define TIOCSERGSTRUCT 0x5458 /* For debugging only */ | 4 | #define TIOCSERGSTRUCT 0x5458 /* For debugging only */ |
68 | #define TIOCSERGETLSR 0x5459 /* Get line status register */ | ||
69 | #define TIOCSERGETMULTI 0x545A /* Get multiport config */ | ||
70 | #define TIOCSERSETMULTI 0x545B /* Set multiport config */ | ||
71 | |||
72 | #define TIOCMIWAIT 0x545C /* wait for a change on serial input line(s) */ | ||
73 | #define TIOCGICOUNT 0x545D /* read serial port inline interrupt counts */ | ||
74 | #define FIOQSIZE 0x5460 | ||
75 | |||
76 | #define TIOCSERSETRS485 0x5461 /* enable rs-485 (deprecated) */ | 5 | #define TIOCSERSETRS485 0x5461 /* enable rs-485 (deprecated) */ |
77 | #define TIOCSERWRRS485 0x5462 /* write rs-485 */ | 6 | #define TIOCSERWRRS485 0x5462 /* write rs-485 */ |
78 | #define TIOCSRS485 0x5463 /* enable rs-485 */ | 7 | #define TIOCSRS485 0x5463 /* enable rs-485 */ |
79 | #define TIOCGRS485 0x542E /* get rs-485 */ | ||
80 | |||
81 | /* Used for packet mode */ | ||
82 | #define TIOCPKT_DATA 0 | ||
83 | #define TIOCPKT_FLUSHREAD 1 | ||
84 | #define TIOCPKT_FLUSHWRITE 2 | ||
85 | #define TIOCPKT_STOP 4 | ||
86 | #define TIOCPKT_START 8 | ||
87 | #define TIOCPKT_NOSTOP 16 | ||
88 | #define TIOCPKT_DOSTOP 32 | ||
89 | #define TIOCPKT_IOCTL 64 | ||
90 | 8 | ||
91 | #define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ | 9 | #include <asm-generic/ioctls.h> |
92 | 10 | ||
93 | #endif | 11 | #endif |
diff --git a/arch/cris/include/asm/irqflags.h b/arch/cris/include/asm/irqflags.h new file mode 100644 index 000000000000..943ba5ca6d2c --- /dev/null +++ b/arch/cris/include/asm/irqflags.h | |||
@@ -0,0 +1 @@ | |||
#include <arch/irqflags.h> | |||
diff --git a/arch/cris/include/asm/pgtable.h b/arch/cris/include/asm/pgtable.h index f63d6fccbc6c..9eaae217b21b 100644 --- a/arch/cris/include/asm/pgtable.h +++ b/arch/cris/include/asm/pgtable.h | |||
@@ -248,10 +248,8 @@ static inline pgd_t * pgd_offset(const struct mm_struct *mm, unsigned long addre | |||
248 | ((pte_t *) pmd_page_vaddr(*(dir)) + __pte_offset(address)) | 248 | ((pte_t *) pmd_page_vaddr(*(dir)) + __pte_offset(address)) |
249 | #define pte_offset_map(dir, address) \ | 249 | #define pte_offset_map(dir, address) \ |
250 | ((pte_t *)page_address(pmd_page(*(dir))) + __pte_offset(address)) | 250 | ((pte_t *)page_address(pmd_page(*(dir))) + __pte_offset(address)) |
251 | #define pte_offset_map_nested(dir, address) pte_offset_map(dir, address) | ||
252 | 251 | ||
253 | #define pte_unmap(pte) do { } while (0) | 252 | #define pte_unmap(pte) do { } while (0) |
254 | #define pte_unmap_nested(pte) do { } while (0) | ||
255 | #define pte_pfn(x) ((unsigned long)(__va((x).pte)) >> PAGE_SHIFT) | 253 | #define pte_pfn(x) ((unsigned long)(__va((x).pte)) >> PAGE_SHIFT) |
256 | #define pfn_pte(pfn, prot) __pte(((pfn) << PAGE_SHIFT) | pgprot_val(prot)) | 254 | #define pfn_pte(pfn, prot) __pte(((pfn) << PAGE_SHIFT) | pgprot_val(prot)) |
257 | 255 | ||
diff --git a/arch/cris/include/asm/system.h b/arch/cris/include/asm/system.h index 8657b084a922..ea10592f7d75 100644 --- a/arch/cris/include/asm/system.h +++ b/arch/cris/include/asm/system.h | |||
@@ -1,6 +1,7 @@ | |||
1 | #ifndef __ASM_CRIS_SYSTEM_H | 1 | #ifndef __ASM_CRIS_SYSTEM_H |
2 | #define __ASM_CRIS_SYSTEM_H | 2 | #define __ASM_CRIS_SYSTEM_H |
3 | 3 | ||
4 | #include <linux/irqflags.h> | ||
4 | #include <arch/system.h> | 5 | #include <arch/system.h> |
5 | 6 | ||
6 | /* the switch_to macro calls resume, an asm function in entry.S which does the actual | 7 | /* the switch_to macro calls resume, an asm function in entry.S which does the actual |
diff --git a/arch/cris/kernel/profile.c b/arch/cris/kernel/profile.c index 195ec5fa0dd2..b82e08615d1b 100644 --- a/arch/cris/kernel/profile.c +++ b/arch/cris/kernel/profile.c | |||
@@ -59,6 +59,7 @@ write_cris_profile(struct file *file, const char __user *buf, | |||
59 | static const struct file_operations cris_proc_profile_operations = { | 59 | static const struct file_operations cris_proc_profile_operations = { |
60 | .read = read_cris_profile, | 60 | .read = read_cris_profile, |
61 | .write = write_cris_profile, | 61 | .write = write_cris_profile, |
62 | .llseek = default_llseek, | ||
62 | }; | 63 | }; |
63 | 64 | ||
64 | static int __init init_cris_profile(void) | 65 | static int __init init_cris_profile(void) |