diff options
27 files changed, 243 insertions, 339 deletions
diff --git a/MAINTAINERS b/MAINTAINERS index 92aa0a7e58ea..2340cfb1e25d 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
@@ -665,12 +665,18 @@ S: Maintained | |||
665 | 665 | ||
666 | ATMEL AT91 MCI DRIVER | 666 | ATMEL AT91 MCI DRIVER |
667 | P: Nicolas Ferre | 667 | P: Nicolas Ferre |
668 | M: nicolas.ferre@rfo.atmel.com | 668 | M: nicolas.ferre@atmel.com |
669 | L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only) | 669 | L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only) |
670 | W: http://www.atmel.com/products/AT91/ | 670 | W: http://www.atmel.com/products/AT91/ |
671 | W: http://www.at91.com/ | 671 | W: http://www.at91.com/ |
672 | S: Maintained | 672 | S: Maintained |
673 | 673 | ||
674 | ATMEL LCDFB DRIVER | ||
675 | P: Nicolas Ferre | ||
676 | M: nicolas.ferre@atmel.com | ||
677 | L: linux-fbdev-devel@lists.sourceforge.net (subscribers-only) | ||
678 | S: Maintained | ||
679 | |||
674 | ATMEL MACB ETHERNET DRIVER | 680 | ATMEL MACB ETHERNET DRIVER |
675 | P: Haavard Skinnemoen | 681 | P: Haavard Skinnemoen |
676 | M: hskinnemoen@atmel.com | 682 | M: hskinnemoen@atmel.com |
diff --git a/arch/cris/arch-v10/drivers/ds1302.c b/arch/cris/arch-v10/drivers/ds1302.c index 88eff7f54ea6..1d1936a18133 100644 --- a/arch/cris/arch-v10/drivers/ds1302.c +++ b/arch/cris/arch-v10/drivers/ds1302.c | |||
@@ -6,136 +6,9 @@ | |||
6 | *! | 6 | *! |
7 | *! Functions exported: ds1302_readreg, ds1302_writereg, ds1302_init | 7 | *! Functions exported: ds1302_readreg, ds1302_writereg, ds1302_init |
8 | *! | 8 | *! |
9 | *! $Log: ds1302.c,v $ | ||
10 | *! Revision 1.18 2005/01/24 09:11:26 mikaelam | ||
11 | *! Minor changes to get DS1302 RTC chip driver to work | ||
12 | *! | ||
13 | *! Revision 1.17 2005/01/05 06:11:22 starvik | ||
14 | *! No need to do local_irq_disable after local_irq_save. | ||
15 | *! | ||
16 | *! Revision 1.16 2004/12/13 12:21:52 starvik | ||
17 | *! Added I/O and DMA allocators from Linux 2.4 | ||
18 | *! | ||
19 | *! Revision 1.14 2004/08/24 06:48:43 starvik | ||
20 | *! Whitespace cleanup | ||
21 | *! | ||
22 | *! Revision 1.13 2004/05/28 09:26:59 starvik | ||
23 | *! Modified I2C initialization to work in 2.6. | ||
24 | *! | ||
25 | *! Revision 1.12 2004/05/14 07:58:03 starvik | ||
26 | *! Merge of changes from 2.4 | ||
27 | *! | ||
28 | *! Revision 1.10 2004/02/04 09:25:12 starvik | ||
29 | *! Merge of Linux 2.6.2 | ||
30 | *! | ||
31 | *! Revision 1.9 2003/07/04 08:27:37 starvik | ||
32 | *! Merge of Linux 2.5.74 | ||
33 | *! | ||
34 | *! Revision 1.8 2003/04/09 05:20:47 starvik | ||
35 | *! Merge of Linux 2.5.67 | ||
36 | *! | ||
37 | *! Revision 1.6 2003/01/09 14:42:51 starvik | ||
38 | *! Merge of Linux 2.5.55 | ||
39 | *! | ||
40 | *! Revision 1.4 2002/12/11 13:13:57 starvik | ||
41 | *! Added arch/ to v10 specific includes | ||
42 | *! Added fix from Linux 2.4 in serial.c (flush_to_flip_buffer) | ||
43 | *! | ||
44 | *! Revision 1.3 2002/11/20 11:56:10 starvik | ||
45 | *! Merge of Linux 2.5.48 | ||
46 | *! | ||
47 | *! Revision 1.2 2002/11/18 13:16:06 starvik | ||
48 | *! Linux 2.5 port of latest 2.4 drivers | ||
49 | *! | ||
50 | *! Revision 1.15 2002/10/11 16:14:33 johana | ||
51 | *! Added CONFIG_ETRAX_DS1302_TRICKLE_CHARGE and initial setting of the | ||
52 | *! trcklecharge register. | ||
53 | *! | ||
54 | *! Revision 1.14 2002/10/10 12:15:38 magnusmn | ||
55 | *! Added support for having the RST signal on bit g0 | ||
56 | *! | ||
57 | *! Revision 1.13 2002/05/29 15:16:08 johana | ||
58 | *! Removed unused variables. | ||
59 | *! | ||
60 | *! Revision 1.12 2002/04/10 15:35:25 johana | ||
61 | *! Moved probe function closer to init function and marked it __init. | ||
62 | *! | ||
63 | *! Revision 1.11 2001/06/14 12:35:52 jonashg | ||
64 | *! The ATA hack is back. It is unfortunately the only way to set g27 to output. | ||
65 | *! | ||
66 | *! Revision 1.9 2001/06/14 10:00:14 jonashg | ||
67 | *! No need for tempudelay to be inline anymore (had to adjust the usec to | ||
68 | *! loops conversion because of this to make it slow enough to be a udelay). | ||
69 | *! | ||
70 | *! Revision 1.8 2001/06/14 08:06:32 jonashg | ||
71 | *! Made tempudelay delay usecs (well, just a tad more). | ||
72 | *! | ||
73 | *! Revision 1.7 2001/06/13 14:18:11 jonashg | ||
74 | *! Only allow processes with SYS_TIME capability to set time and charge. | ||
75 | *! | ||
76 | *! Revision 1.6 2001/06/12 15:22:07 jonashg | ||
77 | *! * Made init function __init. | ||
78 | *! * Parameter to out_byte() is unsigned char. | ||
79 | *! * The magic number 42 has got a name. | ||
80 | *! * Removed comment about /proc (nothing is exported there). | ||
81 | *! | ||
82 | *! Revision 1.5 2001/06/12 14:35:13 jonashg | ||
83 | *! Gave the module a name and added it to printk's. | ||
84 | *! | ||
85 | *! Revision 1.4 2001/05/31 14:53:40 jonashg | ||
86 | *! Made tempudelay() inline so that the watchdog doesn't reset (see | ||
87 | *! function comment). | ||
88 | *! | ||
89 | *! Revision 1.3 2001/03/26 16:03:06 bjornw | ||
90 | *! Needs linux/config.h | ||
91 | *! | ||
92 | *! Revision 1.2 2001/03/20 19:42:00 bjornw | ||
93 | *! Use the ETRAX prefix on the DS1302 options | ||
94 | *! | ||
95 | *! Revision 1.1 2001/03/20 09:13:50 magnusmn | ||
96 | *! Linux 2.4 port | ||
97 | *! | ||
98 | *! Revision 1.10 2000/07/05 15:38:23 bjornw | ||
99 | *! Dont update kernel time when a RTC_SET_TIME is done | ||
100 | *! | ||
101 | *! Revision 1.9 2000/03/02 15:42:59 macce | ||
102 | *! * Hack to make RTC work on all 2100/2400 | ||
103 | *! | ||
104 | *! Revision 1.8 2000/02/23 16:59:18 torbjore | ||
105 | *! added setup of R_GEN_CONFIG when RTC is connected to the generic port. | ||
106 | *! | ||
107 | *! Revision 1.7 2000/01/17 15:51:43 johana | ||
108 | *! Added RTC_SET_CHARGE ioctl to enable trickle charger. | ||
109 | *! | ||
110 | *! Revision 1.6 1999/10/27 13:19:47 bjornw | ||
111 | *! Added update_xtime_from_cmos which reads back the updated RTC into the kernel. | ||
112 | *! /dev/rtc calls it now. | ||
113 | *! | ||
114 | *! Revision 1.5 1999/10/27 12:39:37 bjornw | ||
115 | *! Disabled superuser check. Anyone can now set the time. | ||
116 | *! | ||
117 | *! Revision 1.4 1999/09/02 13:27:46 pkj | ||
118 | *! Added shadow for R_PORT_PB_CONFIG. | ||
119 | *! Renamed port_g_shadow to port_g_data_shadow. | ||
120 | *! | ||
121 | *! Revision 1.3 1999/09/02 08:28:06 pkj | ||
122 | *! Made it possible to select either port PB or the generic port for the RST | ||
123 | *! signal line to the DS1302 RTC. | ||
124 | *! Also make sure the RST bit is configured as output on Port PB (if used). | ||
125 | *! | ||
126 | *! Revision 1.2 1999/09/01 14:47:20 bjornw | ||
127 | *! Added support for /dev/rtc operations with ioctl RD_TIME and SET_TIME to read | ||
128 | *! and set the date. Register as major 121. | ||
129 | *! | ||
130 | *! Revision 1.1 1999/09/01 09:45:29 bjornw | ||
131 | *! Implemented a DS1302 RTC driver. | ||
132 | *! | ||
133 | *! | ||
134 | *! --------------------------------------------------------------------------- | 9 | *! --------------------------------------------------------------------------- |
135 | *! | 10 | *! |
136 | *! (C) Copyright 1999, 2000, 2001, 2002, 2003, 2004 Axis Communications AB, LUND, SWEDEN | 11 | *! (C) Copyright 1999-2007 Axis Communications AB, LUND, SWEDEN |
137 | *! | ||
138 | *! $Id: ds1302.c,v 1.18 2005/01/24 09:11:26 mikaelam Exp $ | ||
139 | *! | 12 | *! |
140 | *!***************************************************************************/ | 13 | *!***************************************************************************/ |
141 | 14 | ||
@@ -156,6 +29,8 @@ | |||
156 | #include <asm/rtc.h> | 29 | #include <asm/rtc.h> |
157 | #include <asm/arch/io_interface_mux.h> | 30 | #include <asm/arch/io_interface_mux.h> |
158 | 31 | ||
32 | #include "i2c.h" | ||
33 | |||
159 | #define RTC_MAJOR_NR 121 /* local major, change later */ | 34 | #define RTC_MAJOR_NR 121 /* local major, change later */ |
160 | 35 | ||
161 | static const char ds1302_name[] = "ds1302"; | 36 | static const char ds1302_name[] = "ds1302"; |
diff --git a/arch/cris/arch-v10/kernel/signal.c b/arch/cris/arch-v10/kernel/signal.c index 41d4a5f93284..b6be705c2a3e 100644 --- a/arch/cris/arch-v10/kernel/signal.c +++ b/arch/cris/arch-v10/kernel/signal.c | |||
@@ -7,7 +7,7 @@ | |||
7 | * | 7 | * |
8 | * Ideas also taken from arch/arm. | 8 | * Ideas also taken from arch/arm. |
9 | * | 9 | * |
10 | * Copyright (C) 2000, 2001 Axis Communications AB | 10 | * Copyright (C) 2000-2007 Axis Communications AB |
11 | * | 11 | * |
12 | * Authors: Bjorn Wesen (bjornw@axis.com) | 12 | * Authors: Bjorn Wesen (bjornw@axis.com) |
13 | * | 13 | * |
@@ -40,84 +40,30 @@ | |||
40 | */ | 40 | */ |
41 | #define RESTART_CRIS_SYS(regs) regs->r10 = regs->orig_r10; regs->irp -= 2; | 41 | #define RESTART_CRIS_SYS(regs) regs->r10 = regs->orig_r10; regs->irp -= 2; |
42 | 42 | ||
43 | int do_signal(int canrestart, sigset_t *oldset, struct pt_regs *regs); | 43 | void do_signal(int canrestart, struct pt_regs *regs); |
44 | 44 | ||
45 | /* | 45 | /* |
46 | * Atomically swap in the new signal mask, and wait for a signal. Define | 46 | * Atomically swap in the new signal mask, and wait for a signal. Define |
47 | * dummy arguments to be able to reach the regs argument. (Note that this | 47 | * dummy arguments to be able to reach the regs argument. (Note that this |
48 | * arrangement relies on old_sigset_t occupying one register.) | 48 | * arrangement relies on old_sigset_t occupying one register.) |
49 | */ | 49 | */ |
50 | int | 50 | int sys_sigsuspend(old_sigset_t mask, long r11, long r12, long r13, long mof, |
51 | sys_sigsuspend(old_sigset_t mask, long r11, long r12, long r13, long mof, | 51 | long srp, struct pt_regs *regs) |
52 | long srp, struct pt_regs *regs) | ||
53 | { | 52 | { |
54 | sigset_t saveset; | ||
55 | |||
56 | mask &= _BLOCKABLE; | 53 | mask &= _BLOCKABLE; |
57 | spin_lock_irq(¤t->sighand->siglock); | 54 | spin_lock_irq(¤t->sighand->siglock); |
58 | saveset = current->blocked; | 55 | current->saved_sigmask = current->blocked; |
59 | siginitset(¤t->blocked, mask); | 56 | siginitset(¤t->blocked, mask); |
60 | recalc_sigpending(); | 57 | recalc_sigpending(); |
61 | spin_unlock_irq(¤t->sighand->siglock); | 58 | spin_unlock_irq(¤t->sighand->siglock); |
62 | 59 | current->state = TASK_INTERRUPTIBLE; | |
63 | regs->r10 = -EINTR; | 60 | schedule(); |
64 | while (1) { | 61 | set_thread_flag(TIF_RESTORE_SIGMASK); |
65 | current->state = TASK_INTERRUPTIBLE; | 62 | return -ERESTARTNOHAND; |
66 | schedule(); | ||
67 | if (do_signal(0, &saveset, regs)) | ||
68 | /* We will get here twice: once to call the signal | ||
69 | handler, then again to return from the | ||
70 | sigsuspend system call. When calling the | ||
71 | signal handler, R10 holds the signal number as | ||
72 | set through do_signal. The sigsuspend call | ||
73 | will return with the restored value set above; | ||
74 | always -EINTR. */ | ||
75 | return regs->r10; | ||
76 | } | ||
77 | } | 63 | } |
78 | 64 | ||
79 | /* Define dummy arguments to be able to reach the regs argument. (Note that | 65 | int sys_sigaction(int sig, const struct old_sigaction __user *act, |
80 | * this arrangement relies on size_t occupying one register.) | 66 | struct old_sigaction *oact) |
81 | */ | ||
82 | int | ||
83 | sys_rt_sigsuspend(sigset_t *unewset, size_t sigsetsize, long r12, long r13, | ||
84 | long mof, long srp, struct pt_regs *regs) | ||
85 | { | ||
86 | sigset_t saveset, newset; | ||
87 | |||
88 | /* XXX: Don't preclude handling different sized sigset_t's. */ | ||
89 | if (sigsetsize != sizeof(sigset_t)) | ||
90 | return -EINVAL; | ||
91 | |||
92 | if (copy_from_user(&newset, unewset, sizeof(newset))) | ||
93 | return -EFAULT; | ||
94 | sigdelsetmask(&newset, ~_BLOCKABLE); | ||
95 | |||
96 | spin_lock_irq(¤t->sighand->siglock); | ||
97 | saveset = current->blocked; | ||
98 | current->blocked = newset; | ||
99 | recalc_sigpending(); | ||
100 | spin_unlock_irq(¤t->sighand->siglock); | ||
101 | |||
102 | regs->r10 = -EINTR; | ||
103 | while (1) { | ||
104 | current->state = TASK_INTERRUPTIBLE; | ||
105 | schedule(); | ||
106 | if (do_signal(0, &saveset, regs)) | ||
107 | /* We will get here twice: once to call the signal | ||
108 | handler, then again to return from the | ||
109 | sigsuspend system call. When calling the | ||
110 | signal handler, R10 holds the signal number as | ||
111 | set through do_signal. The sigsuspend call | ||
112 | will return with the restored value set above; | ||
113 | always -EINTR. */ | ||
114 | return regs->r10; | ||
115 | } | ||
116 | } | ||
117 | |||
118 | int | ||
119 | sys_sigaction(int sig, const struct old_sigaction __user *act, | ||
120 | struct old_sigaction *oact) | ||
121 | { | 67 | { |
122 | struct k_sigaction new_ka, old_ka; | 68 | struct k_sigaction new_ka, old_ka; |
123 | int ret; | 69 | int ret; |
@@ -147,8 +93,7 @@ sys_sigaction(int sig, const struct old_sigaction __user *act, | |||
147 | return ret; | 93 | return ret; |
148 | } | 94 | } |
149 | 95 | ||
150 | int | 96 | int sys_sigaltstack(const stack_t *uss, stack_t __user *uoss) |
151 | sys_sigaltstack(const stack_t *uss, stack_t __user *uoss) | ||
152 | { | 97 | { |
153 | return do_sigaltstack(uss, uoss, rdusp()); | 98 | return do_sigaltstack(uss, uoss, rdusp()); |
154 | } | 99 | } |
@@ -205,7 +150,7 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc) | |||
205 | 150 | ||
206 | /* TODO: the other ports use regs->orig_XX to disable syscall checks | 151 | /* TODO: the other ports use regs->orig_XX to disable syscall checks |
207 | * after this completes, but we don't use that mechanism. maybe we can | 152 | * after this completes, but we don't use that mechanism. maybe we can |
208 | * use it now ? | 153 | * use it now ? |
209 | */ | 154 | */ |
210 | 155 | ||
211 | return err; | 156 | return err; |
@@ -216,7 +161,7 @@ badframe: | |||
216 | 161 | ||
217 | /* Define dummy arguments to be able to reach the regs argument. */ | 162 | /* Define dummy arguments to be able to reach the regs argument. */ |
218 | 163 | ||
219 | asmlinkage int sys_sigreturn(long r10, long r11, long r12, long r13, long mof, | 164 | asmlinkage int sys_sigreturn(long r10, long r11, long r12, long r13, long mof, |
220 | long srp, struct pt_regs *regs) | 165 | long srp, struct pt_regs *regs) |
221 | { | 166 | { |
222 | struct sigframe __user *frame = (struct sigframe *)rdusp(); | 167 | struct sigframe __user *frame = (struct sigframe *)rdusp(); |
@@ -243,7 +188,7 @@ asmlinkage int sys_sigreturn(long r10, long r11, long r12, long r13, long mof, | |||
243 | current->blocked = set; | 188 | current->blocked = set; |
244 | recalc_sigpending(); | 189 | recalc_sigpending(); |
245 | spin_unlock_irq(¤t->sighand->siglock); | 190 | spin_unlock_irq(¤t->sighand->siglock); |
246 | 191 | ||
247 | if (restore_sigcontext(regs, &frame->sc)) | 192 | if (restore_sigcontext(regs, &frame->sc)) |
248 | goto badframe; | 193 | goto badframe; |
249 | 194 | ||
@@ -254,11 +199,11 @@ asmlinkage int sys_sigreturn(long r10, long r11, long r12, long r13, long mof, | |||
254 | badframe: | 199 | badframe: |
255 | force_sig(SIGSEGV, current); | 200 | force_sig(SIGSEGV, current); |
256 | return 0; | 201 | return 0; |
257 | } | 202 | } |
258 | 203 | ||
259 | /* Define dummy arguments to be able to reach the regs argument. */ | 204 | /* Define dummy arguments to be able to reach the regs argument. */ |
260 | 205 | ||
261 | asmlinkage int sys_rt_sigreturn(long r10, long r11, long r12, long r13, | 206 | asmlinkage int sys_rt_sigreturn(long r10, long r11, long r12, long r13, |
262 | long mof, long srp, struct pt_regs *regs) | 207 | long mof, long srp, struct pt_regs *regs) |
263 | { | 208 | { |
264 | struct rt_sigframe __user *frame = (struct rt_sigframe *)rdusp(); | 209 | struct rt_sigframe __user *frame = (struct rt_sigframe *)rdusp(); |
@@ -282,7 +227,7 @@ asmlinkage int sys_rt_sigreturn(long r10, long r11, long r12, long r13, | |||
282 | current->blocked = set; | 227 | current->blocked = set; |
283 | recalc_sigpending(); | 228 | recalc_sigpending(); |
284 | spin_unlock_irq(¤t->sighand->siglock); | 229 | spin_unlock_irq(¤t->sighand->siglock); |
285 | 230 | ||
286 | if (restore_sigcontext(regs, &frame->uc.uc_mcontext)) | 231 | if (restore_sigcontext(regs, &frame->uc.uc_mcontext)) |
287 | goto badframe; | 232 | goto badframe; |
288 | 233 | ||
@@ -294,14 +239,14 @@ asmlinkage int sys_rt_sigreturn(long r10, long r11, long r12, long r13, | |||
294 | badframe: | 239 | badframe: |
295 | force_sig(SIGSEGV, current); | 240 | force_sig(SIGSEGV, current); |
296 | return 0; | 241 | return 0; |
297 | } | 242 | } |
298 | 243 | ||
299 | /* | 244 | /* |
300 | * Set up a signal frame. | 245 | * Set up a signal frame. |
301 | */ | 246 | */ |
302 | 247 | ||
303 | static int | 248 | static int setup_sigcontext(struct sigcontext __user *sc, |
304 | setup_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs, unsigned long mask) | 249 | struct pt_regs *regs, unsigned long mask) |
305 | { | 250 | { |
306 | int err = 0; | 251 | int err = 0; |
307 | unsigned long usp = rdusp(); | 252 | unsigned long usp = rdusp(); |
@@ -324,10 +269,11 @@ setup_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs, unsigned lo | |||
324 | return err; | 269 | return err; |
325 | } | 270 | } |
326 | 271 | ||
327 | /* figure out where we want to put the new signal frame - usually on the stack */ | 272 | /* Figure out where we want to put the new signal frame |
273 | * - usually on the stack. */ | ||
328 | 274 | ||
329 | static inline void __user * | 275 | static inline void __user * |
330 | get_sigframe(struct k_sigaction *ka, struct pt_regs * regs, size_t frame_size) | 276 | get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, size_t frame_size) |
331 | { | 277 | { |
332 | unsigned long sp = rdusp(); | 278 | unsigned long sp = rdusp(); |
333 | 279 | ||
@@ -345,15 +291,15 @@ get_sigframe(struct k_sigaction *ka, struct pt_regs * regs, size_t frame_size) | |||
345 | } | 291 | } |
346 | 292 | ||
347 | /* grab and setup a signal frame. | 293 | /* grab and setup a signal frame. |
348 | * | 294 | * |
349 | * basically we stack a lot of state info, and arrange for the | 295 | * basically we stack a lot of state info, and arrange for the |
350 | * user-mode program to return to the kernel using either a | 296 | * user-mode program to return to the kernel using either a |
351 | * trampoline which performs the syscall sigreturn, or a provided | 297 | * trampoline which performs the syscall sigreturn, or a provided |
352 | * user-mode trampoline. | 298 | * user-mode trampoline. |
353 | */ | 299 | */ |
354 | 300 | ||
355 | static void setup_frame(int sig, struct k_sigaction *ka, | 301 | static int setup_frame(int sig, struct k_sigaction *ka, |
356 | sigset_t *set, struct pt_regs * regs) | 302 | sigset_t *set, struct pt_regs *regs) |
357 | { | 303 | { |
358 | struct sigframe __user *frame; | 304 | struct sigframe __user *frame; |
359 | unsigned long return_ip; | 305 | unsigned long return_ip; |
@@ -401,14 +347,15 @@ static void setup_frame(int sig, struct k_sigaction *ka, | |||
401 | 347 | ||
402 | wrusp((unsigned long)frame); | 348 | wrusp((unsigned long)frame); |
403 | 349 | ||
404 | return; | 350 | return 0; |
405 | 351 | ||
406 | give_sigsegv: | 352 | give_sigsegv: |
407 | force_sigsegv(sig, current); | 353 | force_sigsegv(sig, current); |
354 | return -EFAULT; | ||
408 | } | 355 | } |
409 | 356 | ||
410 | static void setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, | 357 | static int setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, |
411 | sigset_t *set, struct pt_regs * regs) | 358 | sigset_t *set, struct pt_regs *regs) |
412 | { | 359 | { |
413 | struct rt_sigframe __user *frame; | 360 | struct rt_sigframe __user *frame; |
414 | unsigned long return_ip; | 361 | unsigned long return_ip; |
@@ -443,9 +390,10 @@ static void setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, | |||
443 | /* trampoline - the desired return ip is the retcode itself */ | 390 | /* trampoline - the desired return ip is the retcode itself */ |
444 | return_ip = (unsigned long)&frame->retcode; | 391 | return_ip = (unsigned long)&frame->retcode; |
445 | /* This is movu.w __NR_rt_sigreturn, r9; break 13; */ | 392 | /* This is movu.w __NR_rt_sigreturn, r9; break 13; */ |
446 | err |= __put_user(0x9c5f, (short __user*)(frame->retcode+0)); | 393 | err |= __put_user(0x9c5f, (short __user *)(frame->retcode+0)); |
447 | err |= __put_user(__NR_rt_sigreturn, (short __user*)(frame->retcode+2)); | 394 | err |= __put_user(__NR_rt_sigreturn, |
448 | err |= __put_user(0xe93d, (short __user*)(frame->retcode+4)); | 395 | (short __user *)(frame->retcode+2)); |
396 | err |= __put_user(0xe93d, (short __user *)(frame->retcode+4)); | ||
449 | } | 397 | } |
450 | 398 | ||
451 | if (err) | 399 | if (err) |
@@ -455,73 +403,81 @@ static void setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, | |||
455 | 403 | ||
456 | /* Set up registers for signal handler */ | 404 | /* Set up registers for signal handler */ |
457 | 405 | ||
458 | regs->irp = (unsigned long) ka->sa.sa_handler; /* what we enter NOW */ | 406 | /* What we enter NOW */ |
459 | regs->srp = return_ip; /* what we enter LATER */ | 407 | regs->irp = (unsigned long) ka->sa.sa_handler; |
460 | regs->r10 = sig; /* first argument is signo */ | 408 | /* What we enter LATER */ |
461 | regs->r11 = (unsigned long) &frame->info; /* second argument is (siginfo_t *) */ | 409 | regs->srp = return_ip; |
462 | regs->r12 = 0; /* third argument is unused */ | 410 | /* First argument is signo */ |
463 | 411 | regs->r10 = sig; | |
464 | /* actually move the usp to reflect the stacked frame */ | 412 | /* Second argument is (siginfo_t *) */ |
465 | 413 | regs->r11 = (unsigned long)&frame->info; | |
414 | /* Third argument is unused */ | ||
415 | regs->r12 = 0; | ||
416 | |||
417 | /* Actually move the usp to reflect the stacked frame */ | ||
466 | wrusp((unsigned long)frame); | 418 | wrusp((unsigned long)frame); |
467 | 419 | ||
468 | return; | 420 | return 0; |
469 | 421 | ||
470 | give_sigsegv: | 422 | give_sigsegv: |
471 | force_sigsegv(sig, current); | 423 | force_sigsegv(sig, current); |
424 | return -EFAULT; | ||
472 | } | 425 | } |
473 | 426 | ||
474 | /* | 427 | /* |
475 | * OK, we're invoking a handler | 428 | * OK, we're invoking a handler |
476 | */ | 429 | */ |
477 | 430 | ||
478 | static inline void | 431 | static inline int handle_signal(int canrestart, unsigned long sig, |
479 | handle_signal(int canrestart, unsigned long sig, | 432 | siginfo_t *info, struct k_sigaction *ka, |
480 | siginfo_t *info, struct k_sigaction *ka, | 433 | sigset_t *oldset, struct pt_regs *regs) |
481 | sigset_t *oldset, struct pt_regs * regs) | ||
482 | { | 434 | { |
435 | int ret; | ||
436 | |||
483 | /* Are we from a system call? */ | 437 | /* Are we from a system call? */ |
484 | if (canrestart) { | 438 | if (canrestart) { |
485 | /* If so, check system call restarting.. */ | 439 | /* If so, check system call restarting.. */ |
486 | switch (regs->r10) { | 440 | switch (regs->r10) { |
487 | case -ERESTART_RESTARTBLOCK: | 441 | case -ERESTART_RESTARTBLOCK: |
488 | case -ERESTARTNOHAND: | 442 | case -ERESTARTNOHAND: |
489 | /* ERESTARTNOHAND means that the syscall should only be | 443 | /* ERESTARTNOHAND means that the syscall should |
490 | restarted if there was no handler for the signal, and since | 444 | * only be restarted if there was no handler for |
491 | we only get here if there is a handler, we don't restart */ | 445 | * the signal, and since we only get here if there |
446 | * is a handler, we don't restart */ | ||
447 | regs->r10 = -EINTR; | ||
448 | break; | ||
449 | case -ERESTARTSYS: | ||
450 | /* ERESTARTSYS means to restart the syscall if | ||
451 | * there is no handler or the handler was | ||
452 | * registered with SA_RESTART */ | ||
453 | if (!(ka->sa.sa_flags & SA_RESTART)) { | ||
492 | regs->r10 = -EINTR; | 454 | regs->r10 = -EINTR; |
493 | break; | 455 | break; |
494 | 456 | } | |
495 | case -ERESTARTSYS: | 457 | /* fallthrough */ |
496 | /* ERESTARTSYS means to restart the syscall if there is no | 458 | case -ERESTARTNOINTR: |
497 | handler or the handler was registered with SA_RESTART */ | 459 | /* ERESTARTNOINTR means that the syscall should |
498 | if (!(ka->sa.sa_flags & SA_RESTART)) { | 460 | * be called again after the signal handler returns. */ |
499 | regs->r10 = -EINTR; | 461 | RESTART_CRIS_SYS(regs); |
500 | break; | ||
501 | } | ||
502 | /* fallthrough */ | ||
503 | case -ERESTARTNOINTR: | ||
504 | /* ERESTARTNOINTR means that the syscall should be called again | ||
505 | after the signal handler returns. */ | ||
506 | RESTART_CRIS_SYS(regs); | ||
507 | } | 462 | } |
508 | } | 463 | } |
509 | 464 | ||
510 | /* Set up the stack frame */ | 465 | /* Set up the stack frame */ |
511 | if (ka->sa.sa_flags & SA_SIGINFO) | 466 | if (ka->sa.sa_flags & SA_SIGINFO) |
512 | setup_rt_frame(sig, ka, info, oldset, regs); | 467 | ret = setup_rt_frame(sig, ka, info, oldset, regs); |
513 | else | 468 | else |
514 | setup_frame(sig, ka, oldset, regs); | 469 | ret = setup_frame(sig, ka, oldset, regs); |
515 | 470 | ||
516 | if (ka->sa.sa_flags & SA_ONESHOT) | 471 | if (ret == 0) { |
517 | ka->sa.sa_handler = SIG_DFL; | 472 | spin_lock_irq(¤t->sighand->siglock); |
518 | 473 | sigorsets(¤t->blocked, ¤t->blocked, | |
519 | spin_lock_irq(¤t->sighand->siglock); | 474 | &ka->sa.sa_mask); |
520 | sigorsets(¤t->blocked,¤t->blocked,&ka->sa.sa_mask); | 475 | if (!(ka->sa.sa_flags & SA_NODEFER)) |
521 | if (!(ka->sa.sa_flags & SA_NODEFER)) | 476 | sigaddset(¤t->blocked, sig); |
522 | sigaddset(¤t->blocked,sig); | 477 | recalc_sigpending(); |
523 | recalc_sigpending(); | 478 | spin_unlock_irq(¤t->sighand->siglock); |
524 | spin_unlock_irq(¤t->sighand->siglock); | 479 | } |
480 | return ret; | ||
525 | } | 481 | } |
526 | 482 | ||
527 | /* | 483 | /* |
@@ -536,11 +492,12 @@ handle_signal(int canrestart, unsigned long sig, | |||
536 | * mode below. | 492 | * mode below. |
537 | */ | 493 | */ |
538 | 494 | ||
539 | int do_signal(int canrestart, sigset_t *oldset, struct pt_regs *regs) | 495 | void do_signal(int canrestart, struct pt_regs *regs) |
540 | { | 496 | { |
541 | siginfo_t info; | 497 | siginfo_t info; |
542 | int signr; | 498 | int signr; |
543 | struct k_sigaction ka; | 499 | struct k_sigaction ka; |
500 | sigset_t *oldset; | ||
544 | 501 | ||
545 | /* | 502 | /* |
546 | * We want the common case to go fast, which | 503 | * We want the common case to go fast, which |
@@ -549,16 +506,26 @@ int do_signal(int canrestart, sigset_t *oldset, struct pt_regs *regs) | |||
549 | * if so. | 506 | * if so. |
550 | */ | 507 | */ |
551 | if (!user_mode(regs)) | 508 | if (!user_mode(regs)) |
552 | return 1; | 509 | return; |
553 | 510 | ||
554 | if (!oldset) | 511 | if (test_thread_flag(TIF_RESTORE_SIGMASK)) |
512 | oldset = ¤t->saved_sigmask; | ||
513 | else | ||
555 | oldset = ¤t->blocked; | 514 | oldset = ¤t->blocked; |
556 | 515 | ||
557 | signr = get_signal_to_deliver(&info, &ka, regs, NULL); | 516 | signr = get_signal_to_deliver(&info, &ka, regs, NULL); |
558 | if (signr > 0) { | 517 | if (signr > 0) { |
559 | /* Whee! Actually deliver the signal. */ | 518 | /* Whee! Actually deliver the signal. */ |
560 | handle_signal(canrestart, signr, &info, &ka, oldset, regs); | 519 | if (handle_signal(canrestart, signr, &info, &ka, |
561 | return 1; | 520 | oldset, regs)) { |
521 | /* a signal was successfully delivered; the saved | ||
522 | * sigmask will have been stored in the signal frame, | ||
523 | * and will be restored by sigreturn, so we can simply | ||
524 | * clear the TIF_RESTORE_SIGMASK flag */ | ||
525 | if (test_thread_flag(TIF_RESTORE_SIGMASK)) | ||
526 | clear_thread_flag(TIF_RESTORE_SIGMASK); | ||
527 | } | ||
528 | return; | ||
562 | } | 529 | } |
563 | 530 | ||
564 | /* Did we come from a system call? */ | 531 | /* Did we come from a system call? */ |
@@ -569,10 +536,16 @@ int do_signal(int canrestart, sigset_t *oldset, struct pt_regs *regs) | |||
569 | regs->r10 == -ERESTARTNOINTR) { | 536 | regs->r10 == -ERESTARTNOINTR) { |
570 | RESTART_CRIS_SYS(regs); | 537 | RESTART_CRIS_SYS(regs); |
571 | } | 538 | } |
572 | if (regs->r10 == -ERESTART_RESTARTBLOCK){ | 539 | if (regs->r10 == -ERESTART_RESTARTBLOCK) { |
573 | regs->r10 = __NR_restart_syscall; | 540 | regs->r10 = __NR_restart_syscall; |
574 | regs->irp -= 2; | 541 | regs->irp -= 2; |
575 | } | 542 | } |
576 | } | 543 | } |
577 | return 0; | 544 | |
545 | /* if there's no signal to deliver, we just put the saved sigmask | ||
546 | * back */ | ||
547 | if (test_thread_flag(TIF_RESTORE_SIGMASK)) { | ||
548 | clear_thread_flag(TIF_RESTORE_SIGMASK); | ||
549 | sigprocmask(SIG_SETMASK, ¤t->saved_sigmask, NULL); | ||
550 | } | ||
578 | } | 551 | } |
diff --git a/arch/cris/arch-v10/kernel/time.c b/arch/cris/arch-v10/kernel/time.c index 5976f6199c47..9310a7b476e9 100644 --- a/arch/cris/arch-v10/kernel/time.c +++ b/arch/cris/arch-v10/kernel/time.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/swap.h> | 13 | #include <linux/swap.h> |
14 | #include <linux/sched.h> | 14 | #include <linux/sched.h> |
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <linux/vmstat.h> | ||
16 | #include <asm/arch/svinto.h> | 17 | #include <asm/arch/svinto.h> |
17 | #include <asm/types.h> | 18 | #include <asm/types.h> |
18 | #include <asm/signal.h> | 19 | #include <asm/signal.h> |
diff --git a/arch/x86/kernel/process_32.c b/arch/x86/kernel/process_32.c index 9663c2a74830..46d391d49de8 100644 --- a/arch/x86/kernel/process_32.c +++ b/arch/x86/kernel/process_32.c | |||
@@ -204,6 +204,10 @@ void cpu_idle(void) | |||
204 | } | 204 | } |
205 | } | 205 | } |
206 | 206 | ||
207 | static void do_nothing(void *unused) | ||
208 | { | ||
209 | } | ||
210 | |||
207 | void cpu_idle_wait(void) | 211 | void cpu_idle_wait(void) |
208 | { | 212 | { |
209 | unsigned int cpu, this_cpu = get_cpu(); | 213 | unsigned int cpu, this_cpu = get_cpu(); |
@@ -228,6 +232,13 @@ void cpu_idle_wait(void) | |||
228 | cpu_clear(cpu, map); | 232 | cpu_clear(cpu, map); |
229 | } | 233 | } |
230 | cpus_and(map, map, cpu_online_map); | 234 | cpus_and(map, map, cpu_online_map); |
235 | /* | ||
236 | * We waited 1 sec, if a CPU still did not call idle | ||
237 | * it may be because it is in idle and not waking up | ||
238 | * because it has nothing to do. | ||
239 | * Give all the remaining CPUS a kick. | ||
240 | */ | ||
241 | smp_call_function_mask(map, do_nothing, 0, 0); | ||
231 | } while (!cpus_empty(map)); | 242 | } while (!cpus_empty(map)); |
232 | 243 | ||
233 | set_cpus_allowed(current, tmp); | 244 | set_cpus_allowed(current, tmp); |
diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c index 6309b275cb9c..ab79e1dfa023 100644 --- a/arch/x86/kernel/process_64.c +++ b/arch/x86/kernel/process_64.c | |||
@@ -135,6 +135,10 @@ static void poll_idle (void) | |||
135 | cpu_relax(); | 135 | cpu_relax(); |
136 | } | 136 | } |
137 | 137 | ||
138 | static void do_nothing(void *unused) | ||
139 | { | ||
140 | } | ||
141 | |||
138 | void cpu_idle_wait(void) | 142 | void cpu_idle_wait(void) |
139 | { | 143 | { |
140 | unsigned int cpu, this_cpu = get_cpu(); | 144 | unsigned int cpu, this_cpu = get_cpu(); |
@@ -160,6 +164,13 @@ void cpu_idle_wait(void) | |||
160 | cpu_clear(cpu, map); | 164 | cpu_clear(cpu, map); |
161 | } | 165 | } |
162 | cpus_and(map, map, cpu_online_map); | 166 | cpus_and(map, map, cpu_online_map); |
167 | /* | ||
168 | * We waited 1 sec, if a CPU still did not call idle | ||
169 | * it may be because it is in idle and not waking up | ||
170 | * because it has nothing to do. | ||
171 | * Give all the remaining CPUS a kick. | ||
172 | */ | ||
173 | smp_call_function_mask(map, do_nothing, 0, 0); | ||
163 | } while (!cpus_empty(map)); | 174 | } while (!cpus_empty(map)); |
164 | 175 | ||
165 | set_cpus_allowed(current, tmp); | 176 | set_cpus_allowed(current, tmp); |
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c index 7d704968765f..509b6490413b 100644 --- a/drivers/block/cciss.c +++ b/drivers/block/cciss.c | |||
@@ -2927,7 +2927,7 @@ default_int_mode: | |||
2927 | return; | 2927 | return; |
2928 | } | 2928 | } |
2929 | 2929 | ||
2930 | static int cciss_pci_init(ctlr_info_t *c, struct pci_dev *pdev) | 2930 | static int __devinit cciss_pci_init(ctlr_info_t *c, struct pci_dev *pdev) |
2931 | { | 2931 | { |
2932 | ushort subsystem_vendor_id, subsystem_device_id, command; | 2932 | ushort subsystem_vendor_id, subsystem_device_id, command; |
2933 | __u32 board_id, scratchpad = 0; | 2933 | __u32 board_id, scratchpad = 0; |
diff --git a/drivers/char/tpm/tpm.c b/drivers/char/tpm/tpm.c index 39564b76d4a3..c88424a0c89b 100644 --- a/drivers/char/tpm/tpm.c +++ b/drivers/char/tpm/tpm.c | |||
@@ -1046,12 +1046,6 @@ void tpm_remove_hardware(struct device *dev) | |||
1046 | } | 1046 | } |
1047 | EXPORT_SYMBOL_GPL(tpm_remove_hardware); | 1047 | EXPORT_SYMBOL_GPL(tpm_remove_hardware); |
1048 | 1048 | ||
1049 | static u8 savestate[] = { | ||
1050 | 0, 193, /* TPM_TAG_RQU_COMMAND */ | ||
1051 | 0, 0, 0, 10, /* blob length (in bytes) */ | ||
1052 | 0, 0, 0, 152 /* TPM_ORD_SaveState */ | ||
1053 | }; | ||
1054 | |||
1055 | /* | 1049 | /* |
1056 | * We are about to suspend. Save the TPM state | 1050 | * We are about to suspend. Save the TPM state |
1057 | * so that it can be restored. | 1051 | * so that it can be restored. |
@@ -1059,6 +1053,12 @@ static u8 savestate[] = { | |||
1059 | int tpm_pm_suspend(struct device *dev, pm_message_t pm_state) | 1053 | int tpm_pm_suspend(struct device *dev, pm_message_t pm_state) |
1060 | { | 1054 | { |
1061 | struct tpm_chip *chip = dev_get_drvdata(dev); | 1055 | struct tpm_chip *chip = dev_get_drvdata(dev); |
1056 | u8 savestate[] = { | ||
1057 | 0, 193, /* TPM_TAG_RQU_COMMAND */ | ||
1058 | 0, 0, 0, 10, /* blob length (in bytes) */ | ||
1059 | 0, 0, 0, 152 /* TPM_ORD_SaveState */ | ||
1060 | }; | ||
1061 | |||
1062 | if (chip == NULL) | 1062 | if (chip == NULL) |
1063 | return -ENODEV; | 1063 | return -ENODEV; |
1064 | 1064 | ||
diff --git a/drivers/input/gameport/gameport.c b/drivers/input/gameport/gameport.c index bfc6061f1554..1dc2ac9f3d1c 100644 --- a/drivers/input/gameport/gameport.c +++ b/drivers/input/gameport/gameport.c | |||
@@ -38,8 +38,6 @@ EXPORT_SYMBOL(gameport_unregister_driver); | |||
38 | EXPORT_SYMBOL(gameport_open); | 38 | EXPORT_SYMBOL(gameport_open); |
39 | EXPORT_SYMBOL(gameport_close); | 39 | EXPORT_SYMBOL(gameport_close); |
40 | EXPORT_SYMBOL(gameport_rescan); | 40 | EXPORT_SYMBOL(gameport_rescan); |
41 | EXPORT_SYMBOL(gameport_cooked_read); | ||
42 | EXPORT_SYMBOL(gameport_set_name); | ||
43 | EXPORT_SYMBOL(gameport_set_phys); | 41 | EXPORT_SYMBOL(gameport_set_phys); |
44 | EXPORT_SYMBOL(gameport_start_polling); | 42 | EXPORT_SYMBOL(gameport_start_polling); |
45 | EXPORT_SYMBOL(gameport_stop_polling); | 43 | EXPORT_SYMBOL(gameport_stop_polling); |
diff --git a/drivers/input/input.c b/drivers/input/input.c index 307c7b5c2b33..a0be978501ff 100644 --- a/drivers/input/input.c +++ b/drivers/input/input.c | |||
@@ -235,6 +235,10 @@ static void input_handle_event(struct input_dev *dev, | |||
235 | if (value >= 0) | 235 | if (value >= 0) |
236 | disposition = INPUT_PASS_TO_ALL; | 236 | disposition = INPUT_PASS_TO_ALL; |
237 | break; | 237 | break; |
238 | |||
239 | case EV_PWR: | ||
240 | disposition = INPUT_PASS_TO_ALL; | ||
241 | break; | ||
238 | } | 242 | } |
239 | 243 | ||
240 | if (type != EV_SYN) | 244 | if (type != EV_SYN) |
@@ -1266,6 +1270,10 @@ void input_set_capability(struct input_dev *dev, unsigned int type, unsigned int | |||
1266 | __set_bit(code, dev->ffbit); | 1270 | __set_bit(code, dev->ffbit); |
1267 | break; | 1271 | break; |
1268 | 1272 | ||
1273 | case EV_PWR: | ||
1274 | /* do nothing */ | ||
1275 | break; | ||
1276 | |||
1269 | default: | 1277 | default: |
1270 | printk(KERN_ERR | 1278 | printk(KERN_ERR |
1271 | "input_set_capability: unknown type %u (code %u)\n", | 1279 | "input_set_capability: unknown type %u (code %u)\n", |
diff --git a/drivers/input/keyboard/Kconfig b/drivers/input/keyboard/Kconfig index dfa6592c10f6..086d58c0ccbe 100644 --- a/drivers/input/keyboard/Kconfig +++ b/drivers/input/keyboard/Kconfig | |||
@@ -209,22 +209,22 @@ config KEYBOARD_HIL | |||
209 | to your machine, so normally you should say Y here. | 209 | to your machine, so normally you should say Y here. |
210 | 210 | ||
211 | config KEYBOARD_HP6XX | 211 | config KEYBOARD_HP6XX |
212 | tristate "HP Jornada 6XX Keyboard support" | 212 | tristate "HP Jornada 6xx keyboard" |
213 | depends on SH_HP6XX | 213 | depends on SH_HP6XX |
214 | select INPUT_POLLDEV | 214 | select INPUT_POLLDEV |
215 | help | 215 | help |
216 | This adds support for the onboard keyboard found on | 216 | Say Y here if you have a HP Jornada 620/660/680/690 and want to |
217 | HP Jornada 620/660/680/690. | 217 | support the built-in keyboard. |
218 | 218 | ||
219 | To compile this driver as a module, choose M here: the | 219 | To compile this driver as a module, choose M here: the |
220 | module will be called jornada680_kbd. | 220 | module will be called jornada680_kbd. |
221 | 221 | ||
222 | config KEYBOARD_HP7XX | 222 | config KEYBOARD_HP7XX |
223 | tristate "HP Jornada 7XX Keyboard Driver" | 223 | tristate "HP Jornada 7xx keyboard" |
224 | depends on SA1100_JORNADA720_SSP && SA1100_SSP | 224 | depends on SA1100_JORNADA720_SSP && SA1100_SSP |
225 | help | 225 | help |
226 | Say Y here to add support for the HP Jornada 7xx (710/720/728) | 226 | Say Y here if you have a HP Jornada 710/720/728 and want to |
227 | onboard keyboard. | 227 | support the built-in keyboard. |
228 | 228 | ||
229 | To compile this driver as a module, choose M here: the | 229 | To compile this driver as a module, choose M here: the |
230 | module will be called jornada720_kbd. | 230 | module will be called jornada720_kbd. |
diff --git a/drivers/input/keyboard/jornada680_kbd.c b/drivers/input/keyboard/jornada680_kbd.c index bec1cf483723..a23633a2e1b4 100644 --- a/drivers/input/keyboard/jornada680_kbd.c +++ b/drivers/input/keyboard/jornada680_kbd.c | |||
@@ -16,14 +16,14 @@ | |||
16 | * published by the Free Software Foundation. | 16 | * published by the Free Software Foundation. |
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include <linux/input.h> | ||
20 | #include <linux/kernel.h> | ||
21 | #include <linux/module.h> | ||
22 | #include <linux/init.h> | 19 | #include <linux/init.h> |
20 | #include <linux/input.h> | ||
23 | #include <linux/input-polldev.h> | 21 | #include <linux/input-polldev.h> |
22 | #include <linux/interrupt.h> | ||
24 | #include <linux/jiffies.h> | 23 | #include <linux/jiffies.h> |
24 | #include <linux/kernel.h> | ||
25 | #include <linux/module.h> | ||
25 | #include <linux/platform_device.h> | 26 | #include <linux/platform_device.h> |
26 | #include <linux/interrupt.h> | ||
27 | 27 | ||
28 | #include <asm/delay.h> | 28 | #include <asm/delay.h> |
29 | #include <asm/io.h> | 29 | #include <asm/io.h> |
@@ -43,22 +43,22 @@ | |||
43 | #define PLDR 0xa4000134 | 43 | #define PLDR 0xa4000134 |
44 | 44 | ||
45 | static const unsigned short jornada_scancodes[] = { | 45 | static const unsigned short jornada_scancodes[] = { |
46 | /* PTD1 */ KEY_CAPSLOCK, KEY_MACRO, KEY_LEFTCTRL, 0, KEY_ESC, 0, 0, 0, /* 1 -> 8 */ | 46 | /* PTD1 */ KEY_CAPSLOCK, KEY_MACRO, KEY_LEFTCTRL, 0, KEY_ESC, KEY_KP5, 0, 0, /* 1 -> 8 */ |
47 | KEY_F1, KEY_F2, KEY_F3, KEY_F8, KEY_F7, KEY_F2, KEY_F4, KEY_F5, /* 9 -> 16 */ | 47 | KEY_F1, KEY_F2, KEY_F3, KEY_F8, KEY_F7, KEY_F6, KEY_F4, KEY_F5, /* 9 -> 16 */ |
48 | /* PTD5 */ KEY_SLASH, KEY_APOSTROPHE, KEY_ENTER, 0, KEY_Z, 0, 0, 0, /* 17 -> 24 */ | 48 | /* PTD5 */ KEY_SLASH, KEY_APOSTROPHE, KEY_ENTER, 0, KEY_Z, 0, 0, 0, /* 17 -> 24 */ |
49 | KEY_X, KEY_C, KEY_V, KEY_DOT, KEY_COMMA, KEY_M, KEY_B, KEY_N, /* 25 -> 32 */ | 49 | KEY_X, KEY_C, KEY_V, KEY_DOT, KEY_COMMA, KEY_M, KEY_B, KEY_N, /* 25 -> 32 */ |
50 | /* PTD7 */ KEY_KP2, KEY_KP6, 0, 0, 0, 0, 0, 0, /* 33 -> 40 */ | 50 | /* PTD7 */ KEY_KP2, KEY_KP6, KEY_KP3, 0, 0, 0, 0, 0, /* 33 -> 40 */ |
51 | 0, 0, 0, KEY_KP4, 0, 0, KEY_LEFTALT, KEY_HANJA, /* 41 -> 48 */ | 51 | KEY_F10, KEY_RO, KEY_F9, KEY_KP4, KEY_NUMLOCK, KEY_SCROLLLOCK, KEY_LEFTALT, KEY_HANJA, /* 41 -> 48 */ |
52 | /* PTE0 */ 0, 0, 0, 0, KEY_FINANCE, 0, 0, 0, /* 49 -> 56 */ | 52 | /* PTE0 */ KEY_KATAKANA, KEY_KP0, KEY_GRAVE, 0, KEY_FINANCE, 0, 0, 0, /* 49 -> 56 */ |
53 | KEY_LEFTCTRL, 0, KEY_SPACE, KEY_KPDOT, KEY_VOLUMEUP, 249, 0, 0, /* 57 -> 64 */ | 53 | KEY_KPMINUS, KEY_HIRAGANA, KEY_SPACE, KEY_KPDOT, KEY_VOLUMEUP, 249, 0, 0, /* 57 -> 64 */ |
54 | /* PTE1 */ KEY_SEMICOLON, KEY_RIGHTBRACE, KEY_BACKSLASH, 0, KEY_A, 0, 0, 0,/* 65 -> 72 */ | 54 | /* PTE1 */ KEY_SEMICOLON, KEY_RIGHTBRACE, KEY_BACKSLASH, 0, KEY_A, 0, 0, 0, /* 65 -> 72 */ |
55 | KEY_S, KEY_D, KEY_F, KEY_L, KEY_K, KEY_J, KEY_G, KEY_H, /* 73 -> 80 */ | 55 | KEY_S, KEY_D, KEY_F, KEY_L, KEY_K, KEY_J, KEY_G, KEY_H, /* 73 -> 80 */ |
56 | /* PTE3 */ KEY_KP8, KEY_LEFTMETA, KEY_RIGHTSHIFT, 0, KEY_TAB, 0, 0,0, /* 81 -> 88 */ | 56 | /* PTE3 */ KEY_KP8, KEY_LEFTMETA, KEY_RIGHTSHIFT, 0, KEY_TAB, 0, 0, 0, /* 81 -> 88 */ |
57 | 0, KEY_LEFTSHIFT, 0, 0, 0, 0, 0, 0, /* 89 -> 96 */ | 57 | 0, KEY_LEFTSHIFT, KEY_KP7, KEY_KP9, KEY_KP1, KEY_F11, KEY_KPPLUS, KEY_KPASTERISK, /* 89 -> 96 */ |
58 | /* PTE6 */ KEY_P, KEY_LEFTBRACE, KEY_BACKSPACE, 0, KEY_Q, 0, 0, 0, /* 97 -> 104 */ | 58 | /* PTE6 */ KEY_P, KEY_LEFTBRACE, KEY_BACKSPACE, 0, KEY_Q, 0, 0, 0, /* 97 -> 104 */ |
59 | KEY_W, KEY_E, KEY_R, KEY_O, KEY_I, KEY_U, KEY_T, KEY_R, /* 105 -> 112 */ | 59 | KEY_W, KEY_E, KEY_R, KEY_O, KEY_I, KEY_U, KEY_T, KEY_Y, /* 105 -> 112 */ |
60 | /* PTE7 */ KEY_0, KEY_MINUS, KEY_EQUAL, 0, KEY_1, 0, 0, 0, /* 113 -> 120 */ | 60 | /* PTE7 */ KEY_0, KEY_MINUS, KEY_EQUAL, 0, KEY_1, 0, 0, 0, /* 113 -> 120 */ |
61 | KEY_2, KEY_3, KEY_4, KEY_9, KEY_8, KEY_7, KEY_5, KEY_6, /* 121 -> 128 */ | 61 | KEY_2, KEY_3, KEY_4, KEY_9, KEY_8, KEY_7, KEY_5, KEY_6, /* 121 -> 128 */ |
62 | /* **** */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | 62 | /* **** */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
63 | 0, 0, 0, 0, 0 | 63 | 0, 0, 0, 0, 0 |
64 | }; | 64 | }; |
diff --git a/drivers/input/keyboard/spitzkbd.c b/drivers/input/keyboard/spitzkbd.c index 410d78a774d0..1d59a2dc3c17 100644 --- a/drivers/input/keyboard/spitzkbd.c +++ b/drivers/input/keyboard/spitzkbd.c | |||
@@ -391,6 +391,7 @@ static int __init spitzkbd_probe(struct platform_device *dev) | |||
391 | for (i = 0; i < ARRAY_SIZE(spitzkbd_keycode); i++) | 391 | for (i = 0; i < ARRAY_SIZE(spitzkbd_keycode); i++) |
392 | set_bit(spitzkbd->keycode[i], input_dev->keybit); | 392 | set_bit(spitzkbd->keycode[i], input_dev->keybit); |
393 | clear_bit(0, input_dev->keybit); | 393 | clear_bit(0, input_dev->keybit); |
394 | set_bit(KEY_SUSPEND, input_dev->keybit); | ||
394 | set_bit(SW_LID, input_dev->swbit); | 395 | set_bit(SW_LID, input_dev->swbit); |
395 | set_bit(SW_TABLET_MODE, input_dev->swbit); | 396 | set_bit(SW_TABLET_MODE, input_dev->swbit); |
396 | set_bit(SW_HEADPHONE_INSERT, input_dev->swbit); | 397 | set_bit(SW_HEADPHONE_INSERT, input_dev->swbit); |
diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig index fa8442b6241c..90e8e92dfe47 100644 --- a/drivers/input/touchscreen/Kconfig +++ b/drivers/input/touchscreen/Kconfig | |||
@@ -115,19 +115,17 @@ config TOUCHSCREEN_MK712 | |||
115 | module will be called mk712. | 115 | module will be called mk712. |
116 | 116 | ||
117 | config TOUCHSCREEN_HP600 | 117 | config TOUCHSCREEN_HP600 |
118 | tristate "HP Jornada 680/690 touchscreen" | 118 | tristate "HP Jornada 6xx touchscreen" |
119 | depends on SH_HP6XX && SH_ADC | 119 | depends on SH_HP6XX && SH_ADC |
120 | help | 120 | help |
121 | Say Y here if you have a HP Jornada 680 or 690 and want to | 121 | Say Y here if you have a HP Jornada 620/660/680/690 and want to |
122 | support the built-in touchscreen. | 122 | support the built-in touchscreen. |
123 | 123 | ||
124 | If unsure, say N. | ||
125 | |||
126 | To compile this driver as a module, choose M here: the | 124 | To compile this driver as a module, choose M here: the |
127 | module will be called hp680_ts_input. | 125 | module will be called hp680_ts_input. |
128 | 126 | ||
129 | config TOUCHSCREEN_HP7XX | 127 | config TOUCHSCREEN_HP7XX |
130 | tristate "HP Jornada 710/720/728 touchscreen" | 128 | tristate "HP Jornada 7xx touchscreen" |
131 | depends on SA1100_JORNADA720_SSP | 129 | depends on SA1100_JORNADA720_SSP |
132 | help | 130 | help |
133 | Say Y here if you have a HP Jornada 710/720/728 and want | 131 | Say Y here if you have a HP Jornada 710/720/728 and want |
diff --git a/drivers/macintosh/adbhid.c b/drivers/macintosh/adbhid.c index 883da72b5368..ef4c117ea35f 100644 --- a/drivers/macintosh/adbhid.c +++ b/drivers/macintosh/adbhid.c | |||
@@ -322,8 +322,9 @@ adbhid_input_keycode(int id, int scancode, int repeat) | |||
322 | input_sync(ahid->input); | 322 | input_sync(ahid->input); |
323 | input_report_key(ahid->input, KEY_CAPSLOCK, 0); | 323 | input_report_key(ahid->input, KEY_CAPSLOCK, 0); |
324 | input_sync(ahid->input); | 324 | input_sync(ahid->input); |
325 | return; | ||
325 | } | 326 | } |
326 | return; | 327 | break; |
327 | #ifdef CONFIG_PPC_PMAC | 328 | #ifdef CONFIG_PPC_PMAC |
328 | case ADB_KEY_POWER_OLD: /* Power key on PBook 3400 needs remapping */ | 329 | case ADB_KEY_POWER_OLD: /* Power key on PBook 3400 needs remapping */ |
329 | switch(pmac_call_feature(PMAC_FTR_GET_MB_INFO, | 330 | switch(pmac_call_feature(PMAC_FTR_GET_MB_INFO, |
diff --git a/drivers/scsi/advansys.c b/drivers/scsi/advansys.c index 9dd3952516c5..38a1ee2eacd8 100644 --- a/drivers/scsi/advansys.c +++ b/drivers/scsi/advansys.c | |||
@@ -13906,7 +13906,7 @@ static int advansys_release(struct Scsi_Host *shost) | |||
13906 | 13906 | ||
13907 | #define ASC_IOADR_TABLE_MAX_IX 11 | 13907 | #define ASC_IOADR_TABLE_MAX_IX 11 |
13908 | 13908 | ||
13909 | static PortAddr _asc_def_iop_base[ASC_IOADR_TABLE_MAX_IX] __devinitdata = { | 13909 | static PortAddr _asc_def_iop_base[ASC_IOADR_TABLE_MAX_IX] = { |
13910 | 0x100, 0x0110, 0x120, 0x0130, 0x140, 0x0150, 0x0190, | 13910 | 0x100, 0x0110, 0x120, 0x0130, 0x140, 0x0150, 0x0190, |
13911 | 0x0210, 0x0230, 0x0250, 0x0330 | 13911 | 0x0210, 0x0230, 0x0250, 0x0330 |
13912 | }; | 13912 | }; |
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index a5bcf1f390b3..8ecc0470b8f3 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c | |||
@@ -1831,7 +1831,7 @@ probe_out: | |||
1831 | return ret; | 1831 | return ret; |
1832 | } | 1832 | } |
1833 | 1833 | ||
1834 | static void __devexit | 1834 | static void |
1835 | qla2x00_remove_one(struct pci_dev *pdev) | 1835 | qla2x00_remove_one(struct pci_dev *pdev) |
1836 | { | 1836 | { |
1837 | scsi_qla_host_t *ha; | 1837 | scsi_qla_host_t *ha; |
@@ -2965,7 +2965,7 @@ static struct pci_driver qla2xxx_pci_driver = { | |||
2965 | }, | 2965 | }, |
2966 | .id_table = qla2xxx_pci_tbl, | 2966 | .id_table = qla2xxx_pci_tbl, |
2967 | .probe = qla2x00_probe_one, | 2967 | .probe = qla2x00_probe_one, |
2968 | .remove = __devexit_p(qla2x00_remove_one), | 2968 | .remove = qla2x00_remove_one, |
2969 | .err_handler = &qla2xxx_err_handler, | 2969 | .err_handler = &qla2xxx_err_handler, |
2970 | }; | 2970 | }; |
2971 | 2971 | ||
diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c index 11a3a222dfc3..7c30cc8df71e 100644 --- a/drivers/video/atmel_lcdfb.c +++ b/drivers/video/atmel_lcdfb.c | |||
@@ -801,5 +801,5 @@ module_init(atmel_lcdfb_init); | |||
801 | module_exit(atmel_lcdfb_exit); | 801 | module_exit(atmel_lcdfb_exit); |
802 | 802 | ||
803 | MODULE_DESCRIPTION("AT91/AT32 LCD Controller framebuffer driver"); | 803 | MODULE_DESCRIPTION("AT91/AT32 LCD Controller framebuffer driver"); |
804 | MODULE_AUTHOR("Nicolas Ferre <nicolas.ferre@rfo.atmel.com>"); | 804 | MODULE_AUTHOR("Nicolas Ferre <nicolas.ferre@atmel.com>"); |
805 | MODULE_LICENSE("GPL"); | 805 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/video/s3c2410fb.c b/drivers/video/s3c2410fb.c index 5857ccf5f6b1..ad35033f1a48 100644 --- a/drivers/video/s3c2410fb.c +++ b/drivers/video/s3c2410fb.c | |||
@@ -1026,7 +1026,7 @@ static int s3c2410fb_resume(struct platform_device *dev) | |||
1026 | clk_enable(info->clk); | 1026 | clk_enable(info->clk); |
1027 | msleep(1); | 1027 | msleep(1); |
1028 | 1028 | ||
1029 | s3c2410fb_init_registers(info); | 1029 | s3c2410fb_init_registers(fbinfo); |
1030 | 1030 | ||
1031 | return 0; | 1031 | return 0; |
1032 | } | 1032 | } |
diff --git a/drivers/video/uvesafb.c b/drivers/video/uvesafb.c index d1d6c0facd54..a14ef894d571 100644 --- a/drivers/video/uvesafb.c +++ b/drivers/video/uvesafb.c | |||
@@ -43,7 +43,7 @@ static struct fb_fix_screeninfo uvesafb_fix __devinitdata = { | |||
43 | }; | 43 | }; |
44 | 44 | ||
45 | static int mtrr __devinitdata = 3; /* enable mtrr by default */ | 45 | static int mtrr __devinitdata = 3; /* enable mtrr by default */ |
46 | static int blank __devinitdata = 1; /* enable blanking by default */ | 46 | static int blank = 1; /* enable blanking by default */ |
47 | static int ypan __devinitdata = 1; /* 0: scroll, 1: ypan, 2: ywrap */ | 47 | static int ypan __devinitdata = 1; /* 0: scroll, 1: ypan, 2: ywrap */ |
48 | static int pmi_setpal __devinitdata = 1; /* use PMI for palette changes */ | 48 | static int pmi_setpal __devinitdata = 1; /* use PMI for palette changes */ |
49 | static int nocrtc __devinitdata; /* ignore CRTC settings */ | 49 | static int nocrtc __devinitdata; /* ignore CRTC settings */ |
@@ -1549,7 +1549,7 @@ static void __devinit uvesafb_init_info(struct fb_info *info, | |||
1549 | info->fbops->fb_pan_display = NULL; | 1549 | info->fbops->fb_pan_display = NULL; |
1550 | } | 1550 | } |
1551 | 1551 | ||
1552 | static void uvesafb_init_mtrr(struct fb_info *info) | 1552 | static void __devinit uvesafb_init_mtrr(struct fb_info *info) |
1553 | { | 1553 | { |
1554 | #ifdef CONFIG_MTRR | 1554 | #ifdef CONFIG_MTRR |
1555 | if (mtrr && !(info->fix.smem_start & (PAGE_SIZE - 1))) { | 1555 | if (mtrr && !(info->fix.smem_start & (PAGE_SIZE - 1))) { |
diff --git a/drivers/w1/w1.c b/drivers/w1/w1.c index 070217322c9f..33e50310e9e0 100644 --- a/drivers/w1/w1.c +++ b/drivers/w1/w1.c | |||
@@ -869,11 +869,9 @@ void w1_search_process(struct w1_master *dev, u8 search_type) | |||
869 | w1_search_devices(dev, search_type, w1_slave_found); | 869 | w1_search_devices(dev, search_type, w1_slave_found); |
870 | 870 | ||
871 | list_for_each_entry_safe(sl, sln, &dev->slist, w1_slave_entry) { | 871 | list_for_each_entry_safe(sl, sln, &dev->slist, w1_slave_entry) { |
872 | if (!test_bit(W1_SLAVE_ACTIVE, (unsigned long *)&sl->flags) && !--sl->ttl) { | 872 | if (!test_bit(W1_SLAVE_ACTIVE, (unsigned long *)&sl->flags) && !--sl->ttl) |
873 | w1_slave_detach(sl); | 873 | w1_slave_detach(sl); |
874 | 874 | else if (test_bit(W1_SLAVE_ACTIVE, (unsigned long *)&sl->flags)) | |
875 | dev->slave_count--; | ||
876 | } else if (test_bit(W1_SLAVE_ACTIVE, (unsigned long *)&sl->flags)) | ||
877 | sl->ttl = dev->slave_ttl; | 875 | sl->ttl = dev->slave_ttl; |
878 | } | 876 | } |
879 | 877 | ||
diff --git a/fs/proc/array.c b/fs/proc/array.c index 810eb8fd6500..eb97f2897e2b 100644 --- a/fs/proc/array.c +++ b/fs/proc/array.c | |||
@@ -426,7 +426,6 @@ static int do_task_stat(struct task_struct *task, char *buffer, int whole) | |||
426 | cgtime = gtime = cputime_zero; | 426 | cgtime = gtime = cputime_zero; |
427 | 427 | ||
428 | rcu_read_lock(); | 428 | rcu_read_lock(); |
429 | ppid = task_tgid_nr_ns(task->real_parent, ns); | ||
430 | if (lock_task_sighand(task, &flags)) { | 429 | if (lock_task_sighand(task, &flags)) { |
431 | struct signal_struct *sig = task->signal; | 430 | struct signal_struct *sig = task->signal; |
432 | 431 | ||
@@ -465,6 +464,7 @@ static int do_task_stat(struct task_struct *task, char *buffer, int whole) | |||
465 | } | 464 | } |
466 | 465 | ||
467 | sid = task_session_nr_ns(task, ns); | 466 | sid = task_session_nr_ns(task, ns); |
467 | ppid = task_tgid_nr_ns(task->real_parent, ns); | ||
468 | pgid = task_pgrp_nr_ns(task, ns); | 468 | pgid = task_pgrp_nr_ns(task, ns); |
469 | 469 | ||
470 | unlock_task_sighand(task, &flags); | 470 | unlock_task_sighand(task, &flags); |
diff --git a/include/asm-cris/unistd.h b/include/asm-cris/unistd.h index 6f2d924f4fd6..bd57a7949170 100644 --- a/include/asm-cris/unistd.h +++ b/include/asm-cris/unistd.h | |||
@@ -358,6 +358,7 @@ | |||
358 | #define __ARCH_WANT_SYS_SIGPENDING | 358 | #define __ARCH_WANT_SYS_SIGPENDING |
359 | #define __ARCH_WANT_SYS_SIGPROCMASK | 359 | #define __ARCH_WANT_SYS_SIGPROCMASK |
360 | #define __ARCH_WANT_SYS_RT_SIGACTION | 360 | #define __ARCH_WANT_SYS_RT_SIGACTION |
361 | #define __ARCH_WANT_SYS_RT_SIGSUSPEND | ||
361 | 362 | ||
362 | /* | 363 | /* |
363 | * "Conditional" syscalls | 364 | * "Conditional" syscalls |
diff --git a/kernel/module.c b/kernel/module.c index 91fe6958b6e1..c2e3e2e98801 100644 --- a/kernel/module.c +++ b/kernel/module.c | |||
@@ -2214,29 +2214,34 @@ static const char *get_ksymbol(struct module *mod, | |||
2214 | /* For kallsyms to ask for address resolution. NULL means not found. | 2214 | /* For kallsyms to ask for address resolution. NULL means not found. |
2215 | We don't lock, as this is used for oops resolution and races are a | 2215 | We don't lock, as this is used for oops resolution and races are a |
2216 | lesser concern. */ | 2216 | lesser concern. */ |
2217 | /* FIXME: Risky: returns a pointer into a module w/o lock */ | ||
2217 | const char *module_address_lookup(unsigned long addr, | 2218 | const char *module_address_lookup(unsigned long addr, |
2218 | unsigned long *size, | 2219 | unsigned long *size, |
2219 | unsigned long *offset, | 2220 | unsigned long *offset, |
2220 | char **modname) | 2221 | char **modname) |
2221 | { | 2222 | { |
2222 | struct module *mod; | 2223 | struct module *mod; |
2224 | const char *ret = NULL; | ||
2223 | 2225 | ||
2226 | preempt_disable(); | ||
2224 | list_for_each_entry(mod, &modules, list) { | 2227 | list_for_each_entry(mod, &modules, list) { |
2225 | if (within(addr, mod->module_init, mod->init_size) | 2228 | if (within(addr, mod->module_init, mod->init_size) |
2226 | || within(addr, mod->module_core, mod->core_size)) { | 2229 | || within(addr, mod->module_core, mod->core_size)) { |
2227 | if (modname) | 2230 | if (modname) |
2228 | *modname = mod->name; | 2231 | *modname = mod->name; |
2229 | return get_ksymbol(mod, addr, size, offset); | 2232 | ret = get_ksymbol(mod, addr, size, offset); |
2233 | break; | ||
2230 | } | 2234 | } |
2231 | } | 2235 | } |
2232 | return NULL; | 2236 | preempt_enable(); |
2237 | return ret; | ||
2233 | } | 2238 | } |
2234 | 2239 | ||
2235 | int lookup_module_symbol_name(unsigned long addr, char *symname) | 2240 | int lookup_module_symbol_name(unsigned long addr, char *symname) |
2236 | { | 2241 | { |
2237 | struct module *mod; | 2242 | struct module *mod; |
2238 | 2243 | ||
2239 | mutex_lock(&module_mutex); | 2244 | preempt_disable(); |
2240 | list_for_each_entry(mod, &modules, list) { | 2245 | list_for_each_entry(mod, &modules, list) { |
2241 | if (within(addr, mod->module_init, mod->init_size) || | 2246 | if (within(addr, mod->module_init, mod->init_size) || |
2242 | within(addr, mod->module_core, mod->core_size)) { | 2247 | within(addr, mod->module_core, mod->core_size)) { |
@@ -2246,12 +2251,12 @@ int lookup_module_symbol_name(unsigned long addr, char *symname) | |||
2246 | if (!sym) | 2251 | if (!sym) |
2247 | goto out; | 2252 | goto out; |
2248 | strlcpy(symname, sym, KSYM_NAME_LEN); | 2253 | strlcpy(symname, sym, KSYM_NAME_LEN); |
2249 | mutex_unlock(&module_mutex); | 2254 | preempt_enable(); |
2250 | return 0; | 2255 | return 0; |
2251 | } | 2256 | } |
2252 | } | 2257 | } |
2253 | out: | 2258 | out: |
2254 | mutex_unlock(&module_mutex); | 2259 | preempt_enable(); |
2255 | return -ERANGE; | 2260 | return -ERANGE; |
2256 | } | 2261 | } |
2257 | 2262 | ||
@@ -2260,7 +2265,7 @@ int lookup_module_symbol_attrs(unsigned long addr, unsigned long *size, | |||
2260 | { | 2265 | { |
2261 | struct module *mod; | 2266 | struct module *mod; |
2262 | 2267 | ||
2263 | mutex_lock(&module_mutex); | 2268 | preempt_disable(); |
2264 | list_for_each_entry(mod, &modules, list) { | 2269 | list_for_each_entry(mod, &modules, list) { |
2265 | if (within(addr, mod->module_init, mod->init_size) || | 2270 | if (within(addr, mod->module_init, mod->init_size) || |
2266 | within(addr, mod->module_core, mod->core_size)) { | 2271 | within(addr, mod->module_core, mod->core_size)) { |
@@ -2273,12 +2278,12 @@ int lookup_module_symbol_attrs(unsigned long addr, unsigned long *size, | |||
2273 | strlcpy(modname, mod->name, MODULE_NAME_LEN); | 2278 | strlcpy(modname, mod->name, MODULE_NAME_LEN); |
2274 | if (name) | 2279 | if (name) |
2275 | strlcpy(name, sym, KSYM_NAME_LEN); | 2280 | strlcpy(name, sym, KSYM_NAME_LEN); |
2276 | mutex_unlock(&module_mutex); | 2281 | preempt_enable(); |
2277 | return 0; | 2282 | return 0; |
2278 | } | 2283 | } |
2279 | } | 2284 | } |
2280 | out: | 2285 | out: |
2281 | mutex_unlock(&module_mutex); | 2286 | preempt_enable(); |
2282 | return -ERANGE; | 2287 | return -ERANGE; |
2283 | } | 2288 | } |
2284 | 2289 | ||
@@ -2287,7 +2292,7 @@ int module_get_kallsym(unsigned int symnum, unsigned long *value, char *type, | |||
2287 | { | 2292 | { |
2288 | struct module *mod; | 2293 | struct module *mod; |
2289 | 2294 | ||
2290 | mutex_lock(&module_mutex); | 2295 | preempt_disable(); |
2291 | list_for_each_entry(mod, &modules, list) { | 2296 | list_for_each_entry(mod, &modules, list) { |
2292 | if (symnum < mod->num_symtab) { | 2297 | if (symnum < mod->num_symtab) { |
2293 | *value = mod->symtab[symnum].st_value; | 2298 | *value = mod->symtab[symnum].st_value; |
@@ -2296,12 +2301,12 @@ int module_get_kallsym(unsigned int symnum, unsigned long *value, char *type, | |||
2296 | KSYM_NAME_LEN); | 2301 | KSYM_NAME_LEN); |
2297 | strlcpy(module_name, mod->name, MODULE_NAME_LEN); | 2302 | strlcpy(module_name, mod->name, MODULE_NAME_LEN); |
2298 | *exported = is_exported(name, mod); | 2303 | *exported = is_exported(name, mod); |
2299 | mutex_unlock(&module_mutex); | 2304 | preempt_enable(); |
2300 | return 0; | 2305 | return 0; |
2301 | } | 2306 | } |
2302 | symnum -= mod->num_symtab; | 2307 | symnum -= mod->num_symtab; |
2303 | } | 2308 | } |
2304 | mutex_unlock(&module_mutex); | 2309 | preempt_enable(); |
2305 | return -ERANGE; | 2310 | return -ERANGE; |
2306 | } | 2311 | } |
2307 | 2312 | ||
@@ -2324,6 +2329,7 @@ unsigned long module_kallsyms_lookup_name(const char *name) | |||
2324 | unsigned long ret = 0; | 2329 | unsigned long ret = 0; |
2325 | 2330 | ||
2326 | /* Don't lock: we're in enough trouble already. */ | 2331 | /* Don't lock: we're in enough trouble already. */ |
2332 | preempt_disable(); | ||
2327 | if ((colon = strchr(name, ':')) != NULL) { | 2333 | if ((colon = strchr(name, ':')) != NULL) { |
2328 | *colon = '\0'; | 2334 | *colon = '\0'; |
2329 | if ((mod = find_module(name)) != NULL) | 2335 | if ((mod = find_module(name)) != NULL) |
@@ -2334,6 +2340,7 @@ unsigned long module_kallsyms_lookup_name(const char *name) | |||
2334 | if ((ret = mod_find_symname(mod, name)) != 0) | 2340 | if ((ret = mod_find_symname(mod, name)) != 0) |
2335 | break; | 2341 | break; |
2336 | } | 2342 | } |
2343 | preempt_enable(); | ||
2337 | return ret; | 2344 | return ret; |
2338 | } | 2345 | } |
2339 | #endif /* CONFIG_KALLSYMS */ | 2346 | #endif /* CONFIG_KALLSYMS */ |
diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 7224a4f07106..e0fda156f021 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c | |||
@@ -418,9 +418,14 @@ static struct page *alloc_huge_page_private(struct vm_area_struct *vma, | |||
418 | if (free_huge_pages > resv_huge_pages) | 418 | if (free_huge_pages > resv_huge_pages) |
419 | page = dequeue_huge_page(vma, addr); | 419 | page = dequeue_huge_page(vma, addr); |
420 | spin_unlock(&hugetlb_lock); | 420 | spin_unlock(&hugetlb_lock); |
421 | if (!page) | 421 | if (!page) { |
422 | page = alloc_buddy_huge_page(vma, addr); | 422 | page = alloc_buddy_huge_page(vma, addr); |
423 | return page ? page : ERR_PTR(-VM_FAULT_OOM); | 423 | if (!page) { |
424 | hugetlb_put_quota(vma->vm_file->f_mapping, 1); | ||
425 | return ERR_PTR(-VM_FAULT_OOM); | ||
426 | } | ||
427 | } | ||
428 | return page; | ||
424 | } | 429 | } |
425 | 430 | ||
426 | static struct page *alloc_huge_page(struct vm_area_struct *vma, | 431 | static struct page *alloc_huge_page(struct vm_area_struct *vma, |
@@ -1206,8 +1211,10 @@ int hugetlb_reserve_pages(struct inode *inode, long from, long to) | |||
1206 | if (hugetlb_get_quota(inode->i_mapping, chg)) | 1211 | if (hugetlb_get_quota(inode->i_mapping, chg)) |
1207 | return -ENOSPC; | 1212 | return -ENOSPC; |
1208 | ret = hugetlb_acct_memory(chg); | 1213 | ret = hugetlb_acct_memory(chg); |
1209 | if (ret < 0) | 1214 | if (ret < 0) { |
1215 | hugetlb_put_quota(inode->i_mapping, chg); | ||
1210 | return ret; | 1216 | return ret; |
1217 | } | ||
1211 | region_add(&inode->i_mapping->private_list, from, to); | 1218 | region_add(&inode->i_mapping->private_list, from, to); |
1212 | return 0; | 1219 | return 0; |
1213 | } | 1220 | } |
diff --git a/mm/quicklist.c b/mm/quicklist.c index ae8189c2799e..3f703f7cb398 100644 --- a/mm/quicklist.c +++ b/mm/quicklist.c | |||
@@ -26,9 +26,17 @@ DEFINE_PER_CPU(struct quicklist, quicklist)[CONFIG_NR_QUICK]; | |||
26 | static unsigned long max_pages(unsigned long min_pages) | 26 | static unsigned long max_pages(unsigned long min_pages) |
27 | { | 27 | { |
28 | unsigned long node_free_pages, max; | 28 | unsigned long node_free_pages, max; |
29 | struct zone *zones = NODE_DATA(numa_node_id())->node_zones; | ||
30 | |||
31 | node_free_pages = | ||
32 | #ifdef CONFIG_ZONE_DMA | ||
33 | zone_page_state(&zones[ZONE_DMA], NR_FREE_PAGES) + | ||
34 | #endif | ||
35 | #ifdef CONFIG_ZONE_DMA32 | ||
36 | zone_page_state(&zones[ZONE_DMA32], NR_FREE_PAGES) + | ||
37 | #endif | ||
38 | zone_page_state(&zones[ZONE_NORMAL], NR_FREE_PAGES); | ||
29 | 39 | ||
30 | node_free_pages = node_page_state(numa_node_id(), | ||
31 | NR_FREE_PAGES); | ||
32 | max = node_free_pages / FRACTION_OF_NODE_MEM; | 40 | max = node_free_pages / FRACTION_OF_NODE_MEM; |
33 | return max(max, min_pages); | 41 | return max(max, min_pages); |
34 | } | 42 | } |
diff --git a/sound/oss/msnd.h b/sound/oss/msnd.h index 05cf7865be5e..d0ca582c4583 100644 --- a/sound/oss/msnd.h +++ b/sound/oss/msnd.h | |||
@@ -233,8 +233,8 @@ typedef struct multisound_dev { | |||
233 | spinlock_t lock; | 233 | spinlock_t lock; |
234 | int nresets; | 234 | int nresets; |
235 | unsigned long recsrc; | 235 | unsigned long recsrc; |
236 | int left_levels[16]; | 236 | int left_levels[32]; |
237 | int right_levels[16]; | 237 | int right_levels[32]; |
238 | int mixer_mod_count; | 238 | int mixer_mod_count; |
239 | int calibrate_signal; | 239 | int calibrate_signal; |
240 | int play_sample_size, play_sample_rate, play_channels; | 240 | int play_sample_size, play_sample_rate, play_channels; |