diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-03 12:52:04 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-03 12:52:04 -0400 |
commit | 3ba113d14cedcd88105a3b9c90f8ecce829e1095 (patch) | |
tree | 357f50c6a45bf57a16d46b3157dfcd4e28233079 /arch/parisc/kernel/process.c | |
parent | bad6a5c08c119572c888d5df2bd7691a4da6b9e8 (diff) | |
parent | b609308e1415efebdf79ebd553f4dd47b0ff2722 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6: (23 commits)
parisc: move dereference_function_descriptor to process.c
parisc: Move kernel Elf_Fdesc define to <asm/elf.h>
parisc: fix build when ARCH_HAS_KMAP
parisc: fix "make tar-pkg"
parisc: drivers: fix warnings
parisc: select BUG always
parisc: asm/pdc.h should include asm/page.h
parisc: led: remove proc_dir_entry::owner
parisc: fix macro expansion in atomic.h
parisc: iosapic: fix build breakage
parisc: oops_enter()/oops_exit() in die()
parisc: document light weight syscall ABI
parisc: blink all or loadavg LEDs on oops
parisc: add ftrace (function and graph tracer) functionality
parisc: simplify sys_clone()
parisc: add LATENCYTOP_SUPPORT and CONFIG_STACKTRACE_SUPPORT
parisc: allow to build with 16k default kernel page size
parisc: expose 32/64-bit capabilities in cpuinfo
parisc: use constants instead of numbers in assembly
parisc: fix usage of 32bit PTE page table entries on 32bit kernels
...
Diffstat (limited to 'arch/parisc/kernel/process.c')
-rw-r--r-- | arch/parisc/kernel/process.c | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/arch/parisc/kernel/process.c b/arch/parisc/kernel/process.c index 8aa591ed9127..6f69101f90bb 100644 --- a/arch/parisc/kernel/process.c +++ b/arch/parisc/kernel/process.c | |||
@@ -46,14 +46,15 @@ | |||
46 | #include <linux/stddef.h> | 46 | #include <linux/stddef.h> |
47 | #include <linux/unistd.h> | 47 | #include <linux/unistd.h> |
48 | #include <linux/kallsyms.h> | 48 | #include <linux/kallsyms.h> |
49 | #include <linux/uaccess.h> | ||
49 | 50 | ||
50 | #include <asm/io.h> | 51 | #include <asm/io.h> |
51 | #include <asm/asm-offsets.h> | 52 | #include <asm/asm-offsets.h> |
52 | #include <asm/pdc.h> | 53 | #include <asm/pdc.h> |
53 | #include <asm/pdc_chassis.h> | 54 | #include <asm/pdc_chassis.h> |
54 | #include <asm/pgalloc.h> | 55 | #include <asm/pgalloc.h> |
55 | #include <asm/uaccess.h> | ||
56 | #include <asm/unwind.h> | 56 | #include <asm/unwind.h> |
57 | #include <asm/sections.h> | ||
57 | 58 | ||
58 | /* | 59 | /* |
59 | * The idle thread. There's no useful work to be | 60 | * The idle thread. There's no useful work to be |
@@ -231,8 +232,8 @@ sys_clone(unsigned long clone_flags, unsigned long usp, | |||
231 | 232 | ||
232 | However, these last 3 args are only examined | 233 | However, these last 3 args are only examined |
233 | if the proper flags are set. */ | 234 | if the proper flags are set. */ |
234 | int __user *child_tidptr; | 235 | int __user *parent_tidptr = (int __user *)regs->gr[24]; |
235 | int __user *parent_tidptr; | 236 | int __user *child_tidptr = (int __user *)regs->gr[22]; |
236 | 237 | ||
237 | /* usp must be word aligned. This also prevents users from | 238 | /* usp must be word aligned. This also prevents users from |
238 | * passing in the value 1 (which is the signal for a special | 239 | * passing in the value 1 (which is the signal for a special |
@@ -243,16 +244,6 @@ sys_clone(unsigned long clone_flags, unsigned long usp, | |||
243 | if (usp == 0) | 244 | if (usp == 0) |
244 | usp = regs->gr[30]; | 245 | usp = regs->gr[30]; |
245 | 246 | ||
246 | if (clone_flags & CLONE_PARENT_SETTID) | ||
247 | parent_tidptr = (int __user *)regs->gr[24]; | ||
248 | else | ||
249 | parent_tidptr = NULL; | ||
250 | |||
251 | if (clone_flags & (CLONE_CHILD_SETTID | CLONE_CHILD_CLEARTID)) | ||
252 | child_tidptr = (int __user *)regs->gr[22]; | ||
253 | else | ||
254 | child_tidptr = NULL; | ||
255 | |||
256 | return do_fork(clone_flags, usp, regs, 0, parent_tidptr, child_tidptr); | 247 | return do_fork(clone_flags, usp, regs, 0, parent_tidptr, child_tidptr); |
257 | } | 248 | } |
258 | 249 | ||
@@ -400,3 +391,15 @@ get_wchan(struct task_struct *p) | |||
400 | } while (count++ < 16); | 391 | } while (count++ < 16); |
401 | return 0; | 392 | return 0; |
402 | } | 393 | } |
394 | |||
395 | #ifdef CONFIG_64BIT | ||
396 | void *dereference_function_descriptor(void *ptr) | ||
397 | { | ||
398 | Elf64_Fdesc *desc = ptr; | ||
399 | void *p; | ||
400 | |||
401 | if (!probe_kernel_address(&desc->addr, p)) | ||
402 | ptr = p; | ||
403 | return ptr; | ||
404 | } | ||
405 | #endif | ||