diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-23 12:01:41 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-23 12:01:41 -0400 |
commit | 3a8580f82024e30b31c662aa49346adf7a3bcdb5 (patch) | |
tree | 7769a01f152b4081f4e4225e499082fd5c67b184 /arch/um/kernel | |
parent | 1d767cae4dbd4116fc3b2cc3251a20760f98339f (diff) | |
parent | 2ccf62b36097aa88e0ea152d6ef0c0ca2d3884e6 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml
Pull UML updates from Richard Weinberger:
"Most changes are bug fixes and cleanups"
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml:
um: missing checks of __put_user()/__get_user() return values
um: stub_rt_sigsuspend isn't needed these days anymore
um/x86: merge (and trim) 32- and 64-bit variants of ptrace.h
irq: Remove irq_chip->release()
um: Remove CONFIG_IRQ_RELEASE_METHOD
um: Remove usage of irq_chip->release()
um: Implement um_free_irq()
um: Fix __swp_type()
um: Implement a custom pte_same() function
um: Add BUG() to do_ops()'s error path
um: Remove unused variables
um: bury unused _TIF_RESTORE_SIGMASK
um: wrong sigmask saved in case of multiple sigframes
um: add TIF_NOTIFY_RESUME
um: ->restart_block.fn needs to be reset on sigreturn
Diffstat (limited to 'arch/um/kernel')
-rw-r--r-- | arch/um/kernel/irq.c | 9 | ||||
-rw-r--r-- | arch/um/kernel/process.c | 10 | ||||
-rw-r--r-- | arch/um/kernel/signal.c | 14 | ||||
-rw-r--r-- | arch/um/kernel/skas/syscall.c | 2 | ||||
-rw-r--r-- | arch/um/kernel/tlb.c | 1 |
5 files changed, 22 insertions, 14 deletions
diff --git a/arch/um/kernel/irq.c b/arch/um/kernel/irq.c index 71b8c947e5e..00506c3d5d6 100644 --- a/arch/um/kernel/irq.c +++ b/arch/um/kernel/irq.c | |||
@@ -297,6 +297,13 @@ unsigned int do_IRQ(int irq, struct uml_pt_regs *regs) | |||
297 | return 1; | 297 | return 1; |
298 | } | 298 | } |
299 | 299 | ||
300 | void um_free_irq(unsigned int irq, void *dev) | ||
301 | { | ||
302 | free_irq_by_irq_and_dev(irq, dev); | ||
303 | free_irq(irq, dev); | ||
304 | } | ||
305 | EXPORT_SYMBOL(um_free_irq); | ||
306 | |||
300 | int um_request_irq(unsigned int irq, int fd, int type, | 307 | int um_request_irq(unsigned int irq, int fd, int type, |
301 | irq_handler_t handler, | 308 | irq_handler_t handler, |
302 | unsigned long irqflags, const char * devname, | 309 | unsigned long irqflags, const char * devname, |
@@ -327,7 +334,6 @@ static void dummy(struct irq_data *d) | |||
327 | /* This is used for everything else than the timer. */ | 334 | /* This is used for everything else than the timer. */ |
328 | static struct irq_chip normal_irq_type = { | 335 | static struct irq_chip normal_irq_type = { |
329 | .name = "SIGIO", | 336 | .name = "SIGIO", |
330 | .release = free_irq_by_irq_and_dev, | ||
331 | .irq_disable = dummy, | 337 | .irq_disable = dummy, |
332 | .irq_enable = dummy, | 338 | .irq_enable = dummy, |
333 | .irq_ack = dummy, | 339 | .irq_ack = dummy, |
@@ -335,7 +341,6 @@ static struct irq_chip normal_irq_type = { | |||
335 | 341 | ||
336 | static struct irq_chip SIGVTALRM_irq_type = { | 342 | static struct irq_chip SIGVTALRM_irq_type = { |
337 | .name = "SIGVTALRM", | 343 | .name = "SIGVTALRM", |
338 | .release = free_irq_by_irq_and_dev, | ||
339 | .irq_disable = dummy, | 344 | .irq_disable = dummy, |
340 | .irq_enable = dummy, | 345 | .irq_enable = dummy, |
341 | .irq_ack = dummy, | 346 | .irq_ack = dummy, |
diff --git a/arch/um/kernel/process.c b/arch/um/kernel/process.c index 2b73dedb44c..3a2235e0abc 100644 --- a/arch/um/kernel/process.c +++ b/arch/um/kernel/process.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/seq_file.h> | 18 | #include <linux/seq_file.h> |
19 | #include <linux/tick.h> | 19 | #include <linux/tick.h> |
20 | #include <linux/threads.h> | 20 | #include <linux/threads.h> |
21 | #include <linux/tracehook.h> | ||
21 | #include <asm/current.h> | 22 | #include <asm/current.h> |
22 | #include <asm/pgtable.h> | 23 | #include <asm/pgtable.h> |
23 | #include <asm/mmu_context.h> | 24 | #include <asm/mmu_context.h> |
@@ -114,8 +115,13 @@ void interrupt_end(void) | |||
114 | { | 115 | { |
115 | if (need_resched()) | 116 | if (need_resched()) |
116 | schedule(); | 117 | schedule(); |
117 | if (test_tsk_thread_flag(current, TIF_SIGPENDING)) | 118 | if (test_thread_flag(TIF_SIGPENDING)) |
118 | do_signal(); | 119 | do_signal(); |
120 | if (test_and_clear_thread_flag(TIF_NOTIFY_RESUME)) { | ||
121 | tracehook_notify_resume(¤t->thread.regs); | ||
122 | if (current->replacement_session_keyring) | ||
123 | key_replace_session_keyring(); | ||
124 | } | ||
119 | } | 125 | } |
120 | 126 | ||
121 | void exit_thread(void) | 127 | void exit_thread(void) |
@@ -190,7 +196,7 @@ int copy_thread(unsigned long clone_flags, unsigned long sp, | |||
190 | if (current->thread.forking) { | 196 | if (current->thread.forking) { |
191 | memcpy(&p->thread.regs.regs, ®s->regs, | 197 | memcpy(&p->thread.regs.regs, ®s->regs, |
192 | sizeof(p->thread.regs.regs)); | 198 | sizeof(p->thread.regs.regs)); |
193 | REGS_SET_SYSCALL_RETURN(p->thread.regs.regs.gp, 0); | 199 | UPT_SET_SYSCALL_RETURN(&p->thread.regs.regs, 0); |
194 | if (sp != 0) | 200 | if (sp != 0) |
195 | REGS_SP(p->thread.regs.regs.gp) = sp; | 201 | REGS_SP(p->thread.regs.regs.gp) = sp; |
196 | 202 | ||
diff --git a/arch/um/kernel/signal.c b/arch/um/kernel/signal.c index fb12f4c5e64..187118fbe1b 100644 --- a/arch/um/kernel/signal.c +++ b/arch/um/kernel/signal.c | |||
@@ -29,9 +29,6 @@ static int handle_signal(struct pt_regs *regs, unsigned long signr, | |||
29 | unsigned long sp; | 29 | unsigned long sp; |
30 | int err; | 30 | int err; |
31 | 31 | ||
32 | /* Always make any pending restarted system calls return -EINTR */ | ||
33 | current_thread_info()->restart_block.fn = do_no_restart_syscall; | ||
34 | |||
35 | /* Did we come from a system call? */ | 32 | /* Did we come from a system call? */ |
36 | if (PT_REGS_SYSCALL_NR(regs) >= 0) { | 33 | if (PT_REGS_SYSCALL_NR(regs) >= 0) { |
37 | /* If so, check system call restarting.. */ | 34 | /* If so, check system call restarting.. */ |
@@ -77,15 +74,14 @@ static int kern_do_signal(struct pt_regs *regs) | |||
77 | { | 74 | { |
78 | struct k_sigaction ka_copy; | 75 | struct k_sigaction ka_copy; |
79 | siginfo_t info; | 76 | siginfo_t info; |
80 | sigset_t *oldset; | ||
81 | int sig, handled_sig = 0; | 77 | int sig, handled_sig = 0; |
82 | 78 | ||
83 | if (test_thread_flag(TIF_RESTORE_SIGMASK)) | ||
84 | oldset = ¤t->saved_sigmask; | ||
85 | else | ||
86 | oldset = ¤t->blocked; | ||
87 | |||
88 | while ((sig = get_signal_to_deliver(&info, &ka_copy, regs, NULL)) > 0) { | 79 | while ((sig = get_signal_to_deliver(&info, &ka_copy, regs, NULL)) > 0) { |
80 | sigset_t *oldset; | ||
81 | if (test_thread_flag(TIF_RESTORE_SIGMASK)) | ||
82 | oldset = ¤t->saved_sigmask; | ||
83 | else | ||
84 | oldset = ¤t->blocked; | ||
89 | handled_sig = 1; | 85 | handled_sig = 1; |
90 | /* Whee! Actually deliver the signal. */ | 86 | /* Whee! Actually deliver the signal. */ |
91 | if (!handle_signal(regs, sig, &ka_copy, &info, oldset)) { | 87 | if (!handle_signal(regs, sig, &ka_copy, &info, oldset)) { |
diff --git a/arch/um/kernel/skas/syscall.c b/arch/um/kernel/skas/syscall.c index f5173e1ec3a..05fbeb480e0 100644 --- a/arch/um/kernel/skas/syscall.c +++ b/arch/um/kernel/skas/syscall.c | |||
@@ -34,7 +34,7 @@ void handle_syscall(struct uml_pt_regs *r) | |||
34 | result = -ENOSYS; | 34 | result = -ENOSYS; |
35 | else result = EXECUTE_SYSCALL(syscall, regs); | 35 | else result = EXECUTE_SYSCALL(syscall, regs); |
36 | 36 | ||
37 | REGS_SET_SYSCALL_RETURN(r->gp, result); | 37 | UPT_SET_SYSCALL_RETURN(r, result); |
38 | 38 | ||
39 | syscall_trace(r, 1); | 39 | syscall_trace(r, 1); |
40 | } | 40 | } |
diff --git a/arch/um/kernel/tlb.c b/arch/um/kernel/tlb.c index 7f3d4d86431..f819af951c1 100644 --- a/arch/um/kernel/tlb.c +++ b/arch/um/kernel/tlb.c | |||
@@ -75,6 +75,7 @@ static int do_ops(struct host_vm_change *hvc, int end, | |||
75 | default: | 75 | default: |
76 | printk(KERN_ERR "Unknown op type %d in do_ops\n", | 76 | printk(KERN_ERR "Unknown op type %d in do_ops\n", |
77 | op->type); | 77 | op->type); |
78 | BUG(); | ||
78 | break; | 79 | break; |
79 | } | 80 | } |
80 | } | 81 | } |