diff options
author | Paul Mackerras <paulus@samba.org> | 2006-02-10 00:51:29 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-02-10 00:51:29 -0500 |
commit | d6d93856cb90eeb07062ad938bd26f554bf1b9b9 (patch) | |
tree | eeec5011a42f38d3dfe7b61788b7ac1cc890edeb /arch/powerpc/kernel | |
parent | 8f75015f33c3005e0bbf83ffc0d5e0b4262cc03d (diff) | |
parent | ad71f123a9e9b809f6c829db1222ce0423a1153c (diff) |
Merge ../powerpc-merge
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r-- | arch/powerpc/kernel/Makefile | 6 | ||||
-rw-r--r-- | arch/powerpc/kernel/signal_32.c | 18 | ||||
-rw-r--r-- | arch/powerpc/kernel/signal_64.c | 4 | ||||
-rw-r--r-- | arch/powerpc/kernel/systbl.S | 3 |
4 files changed, 13 insertions, 18 deletions
diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile index c287980b7e65..80e9fe2632b8 100644 --- a/arch/powerpc/kernel/Makefile +++ b/arch/powerpc/kernel/Makefile | |||
@@ -12,10 +12,10 @@ endif | |||
12 | 12 | ||
13 | obj-y := semaphore.o cputable.o ptrace.o syscalls.o \ | 13 | obj-y := semaphore.o cputable.o ptrace.o syscalls.o \ |
14 | irq.o align.o signal_32.o pmc.o vdso.o \ | 14 | irq.o align.o signal_32.o pmc.o vdso.o \ |
15 | init_task.o process.o | 15 | init_task.o process.o systbl.o |
16 | obj-y += vdso32/ | 16 | obj-y += vdso32/ |
17 | obj-$(CONFIG_PPC64) += setup_64.o binfmt_elf32.o sys_ppc32.o \ | 17 | obj-$(CONFIG_PPC64) += setup_64.o binfmt_elf32.o sys_ppc32.o \ |
18 | signal_64.o ptrace32.o systbl.o \ | 18 | signal_64.o ptrace32.o \ |
19 | paca.o cpu_setup_power4.o \ | 19 | paca.o cpu_setup_power4.o \ |
20 | firmware.o sysfs.o idle_64.o | 20 | firmware.o sysfs.o idle_64.o |
21 | obj-$(CONFIG_PPC64) += vdso64/ | 21 | obj-$(CONFIG_PPC64) += vdso64/ |
@@ -46,7 +46,7 @@ extra-$(CONFIG_8xx) := head_8xx.o | |||
46 | extra-y += vmlinux.lds | 46 | extra-y += vmlinux.lds |
47 | 47 | ||
48 | obj-y += time.o prom.o traps.o setup-common.o udbg.o | 48 | obj-y += time.o prom.o traps.o setup-common.o udbg.o |
49 | obj-$(CONFIG_PPC32) += entry_32.o setup_32.o misc_32.o systbl.o | 49 | obj-$(CONFIG_PPC32) += entry_32.o setup_32.o misc_32.o |
50 | obj-$(CONFIG_PPC64) += misc_64.o dma_64.o iommu.o | 50 | obj-$(CONFIG_PPC64) += misc_64.o dma_64.o iommu.o |
51 | obj-$(CONFIG_PPC_MULTIPLATFORM) += prom_init.o | 51 | obj-$(CONFIG_PPC_MULTIPLATFORM) += prom_init.o |
52 | obj-$(CONFIG_MODULES) += ppc_ksyms.o | 52 | obj-$(CONFIG_MODULES) += ppc_ksyms.o |
diff --git a/arch/powerpc/kernel/signal_32.c b/arch/powerpc/kernel/signal_32.c index c6d0595da6b5..bd837b5dbf06 100644 --- a/arch/powerpc/kernel/signal_32.c +++ b/arch/powerpc/kernel/signal_32.c | |||
@@ -142,11 +142,7 @@ static inline int get_old_sigaction(struct k_sigaction *new_ka, | |||
142 | return 0; | 142 | return 0; |
143 | } | 143 | } |
144 | 144 | ||
145 | static inline compat_uptr_t to_user_ptr(void *kp) | 145 | #define to_user_ptr(p) ptr_to_compat(p) |
146 | { | ||
147 | return (compat_uptr_t)(u64)kp; | ||
148 | } | ||
149 | |||
150 | #define from_user_ptr(p) compat_ptr(p) | 146 | #define from_user_ptr(p) compat_ptr(p) |
151 | 147 | ||
152 | static inline int save_general_regs(struct pt_regs *regs, | 148 | static inline int save_general_regs(struct pt_regs *regs, |
@@ -213,8 +209,8 @@ static inline int get_old_sigaction(struct k_sigaction *new_ka, | |||
213 | return 0; | 209 | return 0; |
214 | } | 210 | } |
215 | 211 | ||
216 | #define to_user_ptr(p) (p) | 212 | #define to_user_ptr(p) ((unsigned long)(p)) |
217 | #define from_user_ptr(p) (p) | 213 | #define from_user_ptr(p) ((void __user *)(p)) |
218 | 214 | ||
219 | static inline int save_general_regs(struct pt_regs *regs, | 215 | static inline int save_general_regs(struct pt_regs *regs, |
220 | struct mcontext __user *frame) | 216 | struct mcontext __user *frame) |
@@ -526,7 +522,7 @@ long compat_sys_rt_sigaction(int sig, const struct sigaction32 __user *act, | |||
526 | 522 | ||
527 | ret = do_sigaction(sig, act ? &new_ka : NULL, oact ? &old_ka : NULL); | 523 | ret = do_sigaction(sig, act ? &new_ka : NULL, oact ? &old_ka : NULL); |
528 | if (!ret && oact) { | 524 | if (!ret && oact) { |
529 | ret = put_user((long)old_ka.sa.sa_handler, &oact->sa_handler); | 525 | ret = put_user(to_user_ptr(old_ka.sa.sa_handler), &oact->sa_handler); |
530 | ret |= put_sigset_t(&oact->sa_mask, &old_ka.sa.sa_mask); | 526 | ret |= put_sigset_t(&oact->sa_mask, &old_ka.sa.sa_mask); |
531 | ret |= __put_user(old_ka.sa.sa_flags, &oact->sa_flags); | 527 | ret |= __put_user(old_ka.sa.sa_flags, &oact->sa_flags); |
532 | } | 528 | } |
@@ -675,8 +671,8 @@ long compat_sys_rt_sigqueueinfo(u32 pid, u32 sig, compat_siginfo_t __user *uinfo | |||
675 | int compat_sys_sigaltstack(u32 __new, u32 __old, int r5, | 671 | int compat_sys_sigaltstack(u32 __new, u32 __old, int r5, |
676 | int r6, int r7, int r8, struct pt_regs *regs) | 672 | int r6, int r7, int r8, struct pt_regs *regs) |
677 | { | 673 | { |
678 | stack_32_t __user * newstack = (stack_32_t __user *)(long) __new; | 674 | stack_32_t __user * newstack = compat_ptr(__new); |
679 | stack_32_t __user * oldstack = (stack_32_t __user *)(long) __old; | 675 | stack_32_t __user * oldstack = compat_ptr(__old); |
680 | stack_t uss, uoss; | 676 | stack_t uss, uoss; |
681 | int ret; | 677 | int ret; |
682 | mm_segment_t old_fs; | 678 | mm_segment_t old_fs; |
@@ -708,7 +704,7 @@ int compat_sys_sigaltstack(u32 __new, u32 __old, int r5, | |||
708 | set_fs(old_fs); | 704 | set_fs(old_fs); |
709 | /* Copy the stack information to the user output buffer */ | 705 | /* Copy the stack information to the user output buffer */ |
710 | if (!ret && oldstack && | 706 | if (!ret && oldstack && |
711 | (put_user((long)uoss.ss_sp, &oldstack->ss_sp) || | 707 | (put_user(ptr_to_compat(uoss.ss_sp), &oldstack->ss_sp) || |
712 | __put_user(uoss.ss_flags, &oldstack->ss_flags) || | 708 | __put_user(uoss.ss_flags, &oldstack->ss_flags) || |
713 | __put_user(uoss.ss_size, &oldstack->ss_size))) | 709 | __put_user(uoss.ss_size, &oldstack->ss_size))) |
714 | return -EFAULT; | 710 | return -EFAULT; |
diff --git a/arch/powerpc/kernel/signal_64.c b/arch/powerpc/kernel/signal_64.c index b3193116e686..497a5d3df359 100644 --- a/arch/powerpc/kernel/signal_64.c +++ b/arch/powerpc/kernel/signal_64.c | |||
@@ -60,8 +60,8 @@ struct rt_sigframe { | |||
60 | struct ucontext uc; | 60 | struct ucontext uc; |
61 | unsigned long _unused[2]; | 61 | unsigned long _unused[2]; |
62 | unsigned int tramp[TRAMP_SIZE]; | 62 | unsigned int tramp[TRAMP_SIZE]; |
63 | struct siginfo *pinfo; | 63 | struct siginfo __user *pinfo; |
64 | void *puc; | 64 | void __user *puc; |
65 | struct siginfo info; | 65 | struct siginfo info; |
66 | /* 64 bit ABI allows for 288 bytes below sp before decrementing it. */ | 66 | /* 64 bit ABI allows for 288 bytes below sp before decrementing it. */ |
67 | char abigap[288]; | 67 | char abigap[288]; |
diff --git a/arch/powerpc/kernel/systbl.S b/arch/powerpc/kernel/systbl.S index 007b15ee36d2..8a9f994ed917 100644 --- a/arch/powerpc/kernel/systbl.S +++ b/arch/powerpc/kernel/systbl.S | |||
@@ -36,8 +36,6 @@ | |||
36 | #ifdef CONFIG_PPC64 | 36 | #ifdef CONFIG_PPC64 |
37 | #define sys_sigpending sys_ni_syscall | 37 | #define sys_sigpending sys_ni_syscall |
38 | #define sys_old_getrlimit sys_ni_syscall | 38 | #define sys_old_getrlimit sys_ni_syscall |
39 | #else | ||
40 | #define ppc_rtas sys_ni_syscall | ||
41 | #endif | 39 | #endif |
42 | 40 | ||
43 | _GLOBAL(sys_call_table) | 41 | _GLOBAL(sys_call_table) |
@@ -323,3 +321,4 @@ SYSCALL(spu_run) | |||
323 | SYSCALL(spu_create) | 321 | SYSCALL(spu_create) |
324 | COMPAT_SYS(pselect6) | 322 | COMPAT_SYS(pselect6) |
325 | COMPAT_SYS(ppoll) | 323 | COMPAT_SYS(ppoll) |
324 | SYSCALL(unshare) | ||