aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/powerpc/kernel/entry_64.S10
-rw-r--r--arch/powerpc/kernel/signal_32.c28
-rw-r--r--arch/powerpc/kernel/sys_ppc32.c216
-rw-r--r--arch/powerpc/kernel/systbl.S116
-rw-r--r--arch/ppc64/kernel/entry.S10
-rw-r--r--arch/ppc64/kernel/misc.S122
-rw-r--r--arch/ppc64/kernel/ptrace32.c2
7 files changed, 195 insertions, 309 deletions
diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S
index 22796e28881a..984a10630714 100644
--- a/arch/powerpc/kernel/entry_64.S
+++ b/arch/powerpc/kernel/entry_64.S
@@ -262,7 +262,7 @@ _GLOBAL(save_nvgprs)
262 */ 262 */
263_GLOBAL(ppc32_sigsuspend) 263_GLOBAL(ppc32_sigsuspend)
264 bl .save_nvgprs 264 bl .save_nvgprs
265 bl .sys32_sigsuspend 265 bl .compat_sys_sigsuspend
266 b 70f 266 b 70f
267 267
268_GLOBAL(ppc64_rt_sigsuspend) 268_GLOBAL(ppc64_rt_sigsuspend)
@@ -272,7 +272,7 @@ _GLOBAL(ppc64_rt_sigsuspend)
272 272
273_GLOBAL(ppc32_rt_sigsuspend) 273_GLOBAL(ppc32_rt_sigsuspend)
274 bl .save_nvgprs 274 bl .save_nvgprs
275 bl .sys32_rt_sigsuspend 275 bl .compat_sys_rt_sigsuspend
27670: cmpdi 0,r3,0 27670: cmpdi 0,r3,0
277 /* If it returned an error, we need to return via syscall_exit to set 277 /* If it returned an error, we need to return via syscall_exit to set
278 the SO bit in cr0 and potentially stop for ptrace. */ 278 the SO bit in cr0 and potentially stop for ptrace. */
@@ -307,7 +307,7 @@ _GLOBAL(ppc_clone)
307 307
308_GLOBAL(ppc32_swapcontext) 308_GLOBAL(ppc32_swapcontext)
309 bl .save_nvgprs 309 bl .save_nvgprs
310 bl .sys32_swapcontext 310 bl .compat_sys_swapcontext
311 b 80f 311 b 80f
312 312
313_GLOBAL(ppc64_swapcontext) 313_GLOBAL(ppc64_swapcontext)
@@ -316,11 +316,11 @@ _GLOBAL(ppc64_swapcontext)
316 b 80f 316 b 80f
317 317
318_GLOBAL(ppc32_sigreturn) 318_GLOBAL(ppc32_sigreturn)
319 bl .sys32_sigreturn 319 bl .compat_sys_sigreturn
320 b 80f 320 b 80f
321 321
322_GLOBAL(ppc32_rt_sigreturn) 322_GLOBAL(ppc32_rt_sigreturn)
323 bl .sys32_rt_sigreturn 323 bl .compat_sys_rt_sigreturn
324 b 80f 324 b 80f
325 325
326_GLOBAL(ppc64_rt_sigreturn) 326_GLOBAL(ppc64_rt_sigreturn)
diff --git a/arch/powerpc/kernel/signal_32.c b/arch/powerpc/kernel/signal_32.c
index e53127ec373d..e7e7aac11f89 100644
--- a/arch/powerpc/kernel/signal_32.c
+++ b/arch/powerpc/kernel/signal_32.c
@@ -58,12 +58,12 @@
58 58
59#ifdef CONFIG_PPC64 59#ifdef CONFIG_PPC64
60#define do_signal do_signal32 60#define do_signal do_signal32
61#define sys_sigsuspend sys32_sigsuspend 61#define sys_sigsuspend compat_sys_sigsuspend
62#define sys_rt_sigsuspend sys32_rt_sigsuspend 62#define sys_rt_sigsuspend compat_sys_rt_sigsuspend
63#define sys_rt_sigreturn sys32_rt_sigreturn 63#define sys_rt_sigreturn compat_sys_rt_sigreturn
64#define sys_sigaction sys32_sigaction 64#define sys_sigaction compat_sys_sigaction
65#define sys_swapcontext sys32_swapcontext 65#define sys_swapcontext compat_sys_swapcontext
66#define sys_sigreturn sys32_sigreturn 66#define sys_sigreturn compat_sys_sigreturn
67 67
68#define old_sigaction old_sigaction32 68#define old_sigaction old_sigaction32
69#define sigcontext sigcontext32 69#define sigcontext sigcontext32
@@ -540,7 +540,7 @@ static long restore_user_regs(struct pt_regs *regs,
540} 540}
541 541
542#ifdef CONFIG_PPC64 542#ifdef CONFIG_PPC64
543long sys32_rt_sigaction(int sig, const struct sigaction32 __user *act, 543long compat_sys_rt_sigaction(int sig, const struct sigaction32 __user *act,
544 struct sigaction32 __user *oact, size_t sigsetsize) 544 struct sigaction32 __user *oact, size_t sigsetsize)
545{ 545{
546 struct k_sigaction new_ka, old_ka; 546 struct k_sigaction new_ka, old_ka;
@@ -577,7 +577,7 @@ long sys32_rt_sigaction(int sig, const struct sigaction32 __user *act,
577 * of a signed int (msr in 32-bit mode) and the register representation 577 * of a signed int (msr in 32-bit mode) and the register representation
578 * of a signed int (msr in 64-bit mode) is performed. 578 * of a signed int (msr in 64-bit mode) is performed.
579 */ 579 */
580long sys32_rt_sigprocmask(u32 how, compat_sigset_t __user *set, 580long compat_sys_rt_sigprocmask(u32 how, compat_sigset_t __user *set,
581 compat_sigset_t __user *oset, size_t sigsetsize) 581 compat_sigset_t __user *oset, size_t sigsetsize)
582{ 582{
583 sigset_t s; 583 sigset_t s;
@@ -605,7 +605,7 @@ long sys32_rt_sigprocmask(u32 how, compat_sigset_t __user *set,
605 return 0; 605 return 0;
606} 606}
607 607
608long sys32_rt_sigpending(compat_sigset_t __user *set, compat_size_t sigsetsize) 608long compat_sys_rt_sigpending(compat_sigset_t __user *set, compat_size_t sigsetsize)
609{ 609{
610 sigset_t s; 610 sigset_t s;
611 int ret; 611 int ret;
@@ -687,7 +687,7 @@ int copy_siginfo_to_user32(struct compat_siginfo __user *d, siginfo_t *s)
687 * (msr in 32-bit mode) and the register representation of a signed int 687 * (msr in 32-bit mode) and the register representation of a signed int
688 * (msr in 64-bit mode) is performed. 688 * (msr in 64-bit mode) is performed.
689 */ 689 */
690long sys32_rt_sigqueueinfo(u32 pid, u32 sig, compat_siginfo_t __user *uinfo) 690long compat_sys_rt_sigqueueinfo(u32 pid, u32 sig, compat_siginfo_t __user *uinfo)
691{ 691{
692 siginfo_t info; 692 siginfo_t info;
693 int ret; 693 int ret;
@@ -706,10 +706,10 @@ long sys32_rt_sigqueueinfo(u32 pid, u32 sig, compat_siginfo_t __user *uinfo)
706 * Start Alternate signal stack support 706 * Start Alternate signal stack support
707 * 707 *
708 * System Calls 708 * System Calls
709 * sigaltatck sys32_sigaltstack 709 * sigaltatck compat_sys_sigaltstack
710 */ 710 */
711 711
712int sys32_sigaltstack(u32 __new, u32 __old, int r5, 712int compat_sys_sigaltstack(u32 __new, u32 __old, int r5,
713 int r6, int r7, int r8, struct pt_regs *regs) 713 int r6, int r7, int r8, struct pt_regs *regs)
714{ 714{
715 stack_32_t __user * newstack = (stack_32_t __user *)(long) __new; 715 stack_32_t __user * newstack = (stack_32_t __user *)(long) __new;
@@ -942,11 +942,11 @@ long sys_rt_sigreturn(int r3, int r4, int r5, int r6, int r7, int r8,
942 */ 942 */
943#ifdef CONFIG_PPC64 943#ifdef CONFIG_PPC64
944 /* 944 /*
945 * We use the sys32_ version that does the 32/64 bits conversion 945 * We use the compat_sys_ version that does the 32/64 bits conversion
946 * and takes userland pointer directly. What about error checking ? 946 * and takes userland pointer directly. What about error checking ?
947 * nobody does any... 947 * nobody does any...
948 */ 948 */
949 sys32_sigaltstack((u32)(u64)&rt_sf->uc.uc_stack, 0, 0, 0, 0, 0, regs); 949 compat_sys_sigaltstack((u32)(u64)&rt_sf->uc.uc_stack, 0, 0, 0, 0, 0, regs);
950 return (int)regs->result; 950 return (int)regs->result;
951#else 951#else
952 do_sigaltstack(&rt_sf->uc.uc_stack, NULL, regs->gpr[1]); 952 do_sigaltstack(&rt_sf->uc.uc_stack, NULL, regs->gpr[1]);
diff --git a/arch/powerpc/kernel/sys_ppc32.c b/arch/powerpc/kernel/sys_ppc32.c
index 2f1e41a82876..a8210ed5c686 100644
--- a/arch/powerpc/kernel/sys_ppc32.c
+++ b/arch/powerpc/kernel/sys_ppc32.c
@@ -113,96 +113,6 @@ out:
113 return error; 113 return error;
114} 114}
115 115
116struct linux_dirent32 {
117 u32 d_ino;
118 u32 d_off;
119 unsigned short d_reclen;
120 char d_name[1];
121};
122
123struct getdents_callback32 {
124 struct linux_dirent32 __user * current_dir;
125 struct linux_dirent32 __user * previous;
126 int count;
127 int error;
128};
129
130static int filldir(void * __buf, const char * name, int namlen, off_t offset,
131 ino_t ino, unsigned int d_type)
132{
133 struct linux_dirent32 __user * dirent;
134 struct getdents_callback32 * buf = (struct getdents_callback32 *) __buf;
135 int reclen = ROUND_UP(NAME_OFFSET(dirent) + namlen + 2);
136
137 buf->error = -EINVAL; /* only used if we fail.. */
138 if (reclen > buf->count)
139 return -EINVAL;
140 dirent = buf->previous;
141 if (dirent) {
142 if (__put_user(offset, &dirent->d_off))
143 goto efault;
144 }
145 dirent = buf->current_dir;
146 if (__put_user(ino, &dirent->d_ino))
147 goto efault;
148 if (__put_user(reclen, &dirent->d_reclen))
149 goto efault;
150 if (copy_to_user(dirent->d_name, name, namlen))
151 goto efault;
152 if (__put_user(0, dirent->d_name + namlen))
153 goto efault;
154 if (__put_user(d_type, (char __user *) dirent + reclen - 1))
155 goto efault;
156 buf->previous = dirent;
157 dirent = (void __user *)dirent + reclen;
158 buf->current_dir = dirent;
159 buf->count -= reclen;
160 return 0;
161efault:
162 buf->error = -EFAULT;
163 return -EFAULT;
164}
165
166asmlinkage long sys32_getdents(unsigned int fd, struct linux_dirent32 __user *dirent,
167 unsigned int count)
168{
169 struct file * file;
170 struct linux_dirent32 __user * lastdirent;
171 struct getdents_callback32 buf;
172 int error;
173
174 error = -EFAULT;
175 if (!access_ok(VERIFY_WRITE, dirent, count))
176 goto out;
177
178 error = -EBADF;
179 file = fget(fd);
180 if (!file)
181 goto out;
182
183 buf.current_dir = dirent;
184 buf.previous = NULL;
185 buf.count = count;
186 buf.error = 0;
187
188 error = vfs_readdir(file, (filldir_t)filldir, &buf);
189 if (error < 0)
190 goto out_putf;
191 error = buf.error;
192 lastdirent = buf.previous;
193 if (lastdirent) {
194 if (put_user(file->f_pos, &lastdirent->d_off))
195 error = -EFAULT;
196 else
197 error = count - buf.count;
198 }
199
200out_putf:
201 fput(file);
202out:
203 return error;
204}
205
206asmlinkage long ppc32_select(u32 n, compat_ulong_t __user *inp, 116asmlinkage long ppc32_select(u32 n, compat_ulong_t __user *inp,
207 compat_ulong_t __user *outp, compat_ulong_t __user *exp, 117 compat_ulong_t __user *outp, compat_ulong_t __user *exp,
208 compat_uptr_t tvp_x) 118 compat_uptr_t tvp_x)
@@ -247,7 +157,7 @@ int cp_compat_stat(struct kstat *stat, struct compat_stat __user *statbuf)
247 * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode) 157 * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode)
248 * and the register representation of a signed int (msr in 64-bit mode) is performed. 158 * and the register representation of a signed int (msr in 64-bit mode) is performed.
249 */ 159 */
250asmlinkage long sys32_sysfs(u32 option, u32 arg1, u32 arg2) 160asmlinkage long compat_sys_sysfs(u32 option, u32 arg1, u32 arg2)
251{ 161{
252 return sys_sysfs((int)option, arg1, arg2); 162 return sys_sysfs((int)option, arg1, arg2);
253} 163}
@@ -269,7 +179,7 @@ struct timex32 {
269extern int do_adjtimex(struct timex *); 179extern int do_adjtimex(struct timex *);
270extern void ppc_adjtimex(void); 180extern void ppc_adjtimex(void);
271 181
272asmlinkage long sys32_adjtimex(struct timex32 __user *utp) 182asmlinkage long compat_sys_adjtimex(struct timex32 __user *utp)
273{ 183{
274 struct timex txc; 184 struct timex txc;
275 int ret; 185 int ret;
@@ -328,7 +238,7 @@ asmlinkage long sys32_adjtimex(struct timex32 __user *utp)
328 return ret; 238 return ret;
329} 239}
330 240
331asmlinkage long sys32_pause(void) 241asmlinkage long compat_sys_pause(void)
332{ 242{
333 current->state = TASK_INTERRUPTIBLE; 243 current->state = TASK_INTERRUPTIBLE;
334 schedule(); 244 schedule();
@@ -374,7 +284,7 @@ struct sysinfo32 {
374 char _f[20-2*sizeof(int)-sizeof(int)]; 284 char _f[20-2*sizeof(int)-sizeof(int)];
375}; 285};
376 286
377asmlinkage long sys32_sysinfo(struct sysinfo32 __user *info) 287asmlinkage long compat_sys_sysinfo(struct sysinfo32 __user *info)
378{ 288{
379 struct sysinfo s; 289 struct sysinfo s;
380 int ret, err; 290 int ret, err;
@@ -431,7 +341,7 @@ asmlinkage long sys32_sysinfo(struct sysinfo32 __user *info)
431 sorts of things, like timeval and itimerval. */ 341 sorts of things, like timeval and itimerval. */
432extern struct timezone sys_tz; 342extern struct timezone sys_tz;
433 343
434asmlinkage long sys32_gettimeofday(struct compat_timeval __user *tv, struct timezone __user *tz) 344asmlinkage long compat_sys_gettimeofday(struct compat_timeval __user *tv, struct timezone __user *tz)
435{ 345{
436 if (tv) { 346 if (tv) {
437 struct timeval ktv; 347 struct timeval ktv;
@@ -449,7 +359,7 @@ asmlinkage long sys32_gettimeofday(struct compat_timeval __user *tv, struct time
449 359
450 360
451 361
452asmlinkage long sys32_settimeofday(struct compat_timeval __user *tv, struct timezone __user *tz) 362asmlinkage long compat_sys_settimeofday(struct compat_timeval __user *tv, struct timezone __user *tz)
453{ 363{
454 struct timespec kts; 364 struct timespec kts;
455 struct timezone ktz; 365 struct timezone ktz;
@@ -467,7 +377,7 @@ asmlinkage long sys32_settimeofday(struct compat_timeval __user *tv, struct time
467} 377}
468 378
469#ifdef CONFIG_SYSVIPC 379#ifdef CONFIG_SYSVIPC
470long sys32_ipc(u32 call, u32 first, u32 second, u32 third, compat_uptr_t ptr, 380long compat_sys_ipc(u32 call, u32 first, u32 second, u32 third, compat_uptr_t ptr,
471 u32 fifth) 381 u32 fifth)
472{ 382{
473 int version; 383 int version;
@@ -538,7 +448,7 @@ long sys32_ipc(u32 call, u32 first, u32 second, u32 third, compat_uptr_t ptr,
538 * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode) 448 * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode)
539 * and the register representation of a signed int (msr in 64-bit mode) is performed. 449 * and the register representation of a signed int (msr in 64-bit mode) is performed.
540 */ 450 */
541asmlinkage long sys32_sendfile(u32 out_fd, u32 in_fd, compat_off_t __user * offset, u32 count) 451asmlinkage long compat_sys_sendfile(u32 out_fd, u32 in_fd, compat_off_t __user * offset, u32 count)
542{ 452{
543 mm_segment_t old_fs = get_fs(); 453 mm_segment_t old_fs = get_fs();
544 int ret; 454 int ret;
@@ -560,7 +470,7 @@ asmlinkage long sys32_sendfile(u32 out_fd, u32 in_fd, compat_off_t __user * offs
560 return ret; 470 return ret;
561} 471}
562 472
563asmlinkage int sys32_sendfile64(int out_fd, int in_fd, compat_loff_t __user *offset, s32 count) 473asmlinkage int compat_sys_sendfile64(int out_fd, int in_fd, compat_loff_t __user *offset, s32 count)
564{ 474{
565 mm_segment_t old_fs = get_fs(); 475 mm_segment_t old_fs = get_fs();
566 int ret; 476 int ret;
@@ -582,7 +492,7 @@ asmlinkage int sys32_sendfile64(int out_fd, int in_fd, compat_loff_t __user *off
582 return ret; 492 return ret;
583} 493}
584 494
585long sys32_execve(unsigned long a0, unsigned long a1, unsigned long a2, 495long compat_sys_execve(unsigned long a0, unsigned long a1, unsigned long a2,
586 unsigned long a3, unsigned long a4, unsigned long a5, 496 unsigned long a3, unsigned long a4, unsigned long a5,
587 struct pt_regs *regs) 497 struct pt_regs *regs)
588{ 498{
@@ -614,7 +524,7 @@ out:
614 * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode) 524 * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode)
615 * and the register representation of a signed int (msr in 64-bit mode) is performed. 525 * and the register representation of a signed int (msr in 64-bit mode) is performed.
616 */ 526 */
617asmlinkage long sys32_prctl(u32 option, u32 arg2, u32 arg3, u32 arg4, u32 arg5) 527asmlinkage long compat_sys_prctl(u32 option, u32 arg2, u32 arg3, u32 arg4, u32 arg5)
618{ 528{
619 return sys_prctl((int)option, 529 return sys_prctl((int)option,
620 (unsigned long) arg2, 530 (unsigned long) arg2,
@@ -628,7 +538,7 @@ asmlinkage long sys32_prctl(u32 option, u32 arg2, u32 arg3, u32 arg4, u32 arg5)
628 * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode) 538 * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode)
629 * and the register representation of a signed int (msr in 64-bit mode) is performed. 539 * and the register representation of a signed int (msr in 64-bit mode) is performed.
630 */ 540 */
631asmlinkage long sys32_sched_rr_get_interval(u32 pid, struct compat_timespec __user *interval) 541asmlinkage long compat_sys_sched_rr_get_interval(u32 pid, struct compat_timespec __user *interval)
632{ 542{
633 struct timespec t; 543 struct timespec t;
634 int ret; 544 int ret;
@@ -643,7 +553,7 @@ asmlinkage long sys32_sched_rr_get_interval(u32 pid, struct compat_timespec __us
643 return ret; 553 return ret;
644} 554}
645 555
646asmlinkage int sys32_pciconfig_read(u32 bus, u32 dfn, u32 off, u32 len, u32 ubuf) 556asmlinkage int compat_sys_pciconfig_read(u32 bus, u32 dfn, u32 off, u32 len, u32 ubuf)
647{ 557{
648 return sys_pciconfig_read((unsigned long) bus, 558 return sys_pciconfig_read((unsigned long) bus,
649 (unsigned long) dfn, 559 (unsigned long) dfn,
@@ -652,7 +562,7 @@ asmlinkage int sys32_pciconfig_read(u32 bus, u32 dfn, u32 off, u32 len, u32 ubuf
652 compat_ptr(ubuf)); 562 compat_ptr(ubuf));
653} 563}
654 564
655asmlinkage int sys32_pciconfig_write(u32 bus, u32 dfn, u32 off, u32 len, u32 ubuf) 565asmlinkage int compat_sys_pciconfig_write(u32 bus, u32 dfn, u32 off, u32 len, u32 ubuf)
656{ 566{
657 return sys_pciconfig_write((unsigned long) bus, 567 return sys_pciconfig_write((unsigned long) bus,
658 (unsigned long) dfn, 568 (unsigned long) dfn,
@@ -661,7 +571,7 @@ asmlinkage int sys32_pciconfig_write(u32 bus, u32 dfn, u32 off, u32 len, u32 ubu
661 compat_ptr(ubuf)); 571 compat_ptr(ubuf));
662} 572}
663 573
664asmlinkage int sys32_pciconfig_iobase(u32 which, u32 in_bus, u32 in_devfn) 574asmlinkage int compat_sys_pciconfig_iobase(u32 which, u32 in_bus, u32 in_devfn)
665{ 575{
666 return sys_pciconfig_iobase(which, in_bus, in_devfn); 576 return sys_pciconfig_iobase(which, in_bus, in_devfn);
667} 577}
@@ -672,7 +582,7 @@ asmlinkage int sys32_pciconfig_iobase(u32 which, u32 in_bus, u32 in_devfn)
672 * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode) 582 * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode)
673 * and the register representation of a signed int (msr in 64-bit mode) is performed. 583 * and the register representation of a signed int (msr in 64-bit mode) is performed.
674 */ 584 */
675asmlinkage long sys32_access(const char __user * filename, u32 mode) 585asmlinkage long compat_sys_access(const char __user * filename, u32 mode)
676{ 586{
677 return sys_access(filename, (int)mode); 587 return sys_access(filename, (int)mode);
678} 588}
@@ -683,7 +593,7 @@ asmlinkage long sys32_access(const char __user * filename, u32 mode)
683 * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode) 593 * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode)
684 * and the register representation of a signed int (msr in 64-bit mode) is performed. 594 * and the register representation of a signed int (msr in 64-bit mode) is performed.
685 */ 595 */
686asmlinkage long sys32_creat(const char __user * pathname, u32 mode) 596asmlinkage long compat_sys_creat(const char __user * pathname, u32 mode)
687{ 597{
688 return sys_creat(pathname, (int)mode); 598 return sys_creat(pathname, (int)mode);
689} 599}
@@ -694,7 +604,7 @@ asmlinkage long sys32_creat(const char __user * pathname, u32 mode)
694 * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode) 604 * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode)
695 * and the register representation of a signed int (msr in 64-bit mode) is performed. 605 * and the register representation of a signed int (msr in 64-bit mode) is performed.
696 */ 606 */
697asmlinkage long sys32_waitpid(u32 pid, unsigned int __user * stat_addr, u32 options) 607asmlinkage long compat_sys_waitpid(u32 pid, unsigned int __user * stat_addr, u32 options)
698{ 608{
699 return sys_waitpid((int)pid, stat_addr, (int)options); 609 return sys_waitpid((int)pid, stat_addr, (int)options);
700} 610}
@@ -705,7 +615,7 @@ asmlinkage long sys32_waitpid(u32 pid, unsigned int __user * stat_addr, u32 opti
705 * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode) 615 * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode)
706 * and the register representation of a signed int (msr in 64-bit mode) is performed. 616 * and the register representation of a signed int (msr in 64-bit mode) is performed.
707 */ 617 */
708asmlinkage long sys32_getgroups(u32 gidsetsize, gid_t __user *grouplist) 618asmlinkage long compat_sys_getgroups(u32 gidsetsize, gid_t __user *grouplist)
709{ 619{
710 return sys_getgroups((int)gidsetsize, grouplist); 620 return sys_getgroups((int)gidsetsize, grouplist);
711} 621}
@@ -716,7 +626,7 @@ asmlinkage long sys32_getgroups(u32 gidsetsize, gid_t __user *grouplist)
716 * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode) 626 * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode)
717 * and the register representation of a signed int (msr in 64-bit mode) is performed. 627 * and the register representation of a signed int (msr in 64-bit mode) is performed.
718 */ 628 */
719asmlinkage long sys32_getpgid(u32 pid) 629asmlinkage long compat_sys_getpgid(u32 pid)
720{ 630{
721 return sys_getpgid((int)pid); 631 return sys_getpgid((int)pid);
722} 632}
@@ -728,7 +638,7 @@ asmlinkage long sys32_getpgid(u32 pid)
728 * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode) 638 * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode)
729 * and the register representation of a signed int (msr in 64-bit mode) is performed. 639 * and the register representation of a signed int (msr in 64-bit mode) is performed.
730 */ 640 */
731asmlinkage long sys32_getsid(u32 pid) 641asmlinkage long compat_sys_getsid(u32 pid)
732{ 642{
733 return sys_getsid((int)pid); 643 return sys_getsid((int)pid);
734} 644}
@@ -739,7 +649,7 @@ asmlinkage long sys32_getsid(u32 pid)
739 * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode) 649 * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode)
740 * and the register representation of a signed int (msr in 64-bit mode) is performed. 650 * and the register representation of a signed int (msr in 64-bit mode) is performed.
741 */ 651 */
742asmlinkage long sys32_kill(u32 pid, u32 sig) 652asmlinkage long compat_sys_kill(u32 pid, u32 sig)
743{ 653{
744 return sys_kill((int)pid, (int)sig); 654 return sys_kill((int)pid, (int)sig);
745} 655}
@@ -750,12 +660,12 @@ asmlinkage long sys32_kill(u32 pid, u32 sig)
750 * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode) 660 * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode)
751 * and the register representation of a signed int (msr in 64-bit mode) is performed. 661 * and the register representation of a signed int (msr in 64-bit mode) is performed.
752 */ 662 */
753asmlinkage long sys32_mkdir(const char __user * pathname, u32 mode) 663asmlinkage long compat_sys_mkdir(const char __user * pathname, u32 mode)
754{ 664{
755 return sys_mkdir(pathname, (int)mode); 665 return sys_mkdir(pathname, (int)mode);
756} 666}
757 667
758long sys32_nice(u32 increment) 668long compat_sys_nice(u32 increment)
759{ 669{
760 /* sign extend increment */ 670 /* sign extend increment */
761 return sys_nice((int)increment); 671 return sys_nice((int)increment);
@@ -772,7 +682,7 @@ off_t ppc32_lseek(unsigned int fd, u32 offset, unsigned int origin)
772 * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode) 682 * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode)
773 * and the register representation of a signed int (msr in 64-bit mode) is performed. 683 * and the register representation of a signed int (msr in 64-bit mode) is performed.
774 */ 684 */
775asmlinkage long sys32_readlink(const char __user * path, char __user * buf, u32 bufsiz) 685asmlinkage long compat_sys_readlink(const char __user * path, char __user * buf, u32 bufsiz)
776{ 686{
777 return sys_readlink(path, buf, (int)bufsiz); 687 return sys_readlink(path, buf, (int)bufsiz);
778} 688}
@@ -782,7 +692,7 @@ asmlinkage long sys32_readlink(const char __user * path, char __user * buf, u32
782 * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode) 692 * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode)
783 * and the register representation of a signed int (msr in 64-bit mode) is performed. 693 * and the register representation of a signed int (msr in 64-bit mode) is performed.
784 */ 694 */
785asmlinkage long sys32_sched_get_priority_max(u32 policy) 695asmlinkage long compat_sys_sched_get_priority_max(u32 policy)
786{ 696{
787 return sys_sched_get_priority_max((int)policy); 697 return sys_sched_get_priority_max((int)policy);
788} 698}
@@ -793,7 +703,7 @@ asmlinkage long sys32_sched_get_priority_max(u32 policy)
793 * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode) 703 * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode)
794 * and the register representation of a signed int (msr in 64-bit mode) is performed. 704 * and the register representation of a signed int (msr in 64-bit mode) is performed.
795 */ 705 */
796asmlinkage long sys32_sched_get_priority_min(u32 policy) 706asmlinkage long compat_sys_sched_get_priority_min(u32 policy)
797{ 707{
798 return sys_sched_get_priority_min((int)policy); 708 return sys_sched_get_priority_min((int)policy);
799} 709}
@@ -804,7 +714,7 @@ asmlinkage long sys32_sched_get_priority_min(u32 policy)
804 * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode) 714 * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode)
805 * and the register representation of a signed int (msr in 64-bit mode) is performed. 715 * and the register representation of a signed int (msr in 64-bit mode) is performed.
806 */ 716 */
807asmlinkage long sys32_sched_getparam(u32 pid, struct sched_param __user *param) 717asmlinkage long compat_sys_sched_getparam(u32 pid, struct sched_param __user *param)
808{ 718{
809 return sys_sched_getparam((int)pid, param); 719 return sys_sched_getparam((int)pid, param);
810} 720}
@@ -815,7 +725,7 @@ asmlinkage long sys32_sched_getparam(u32 pid, struct sched_param __user *param)
815 * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode) 725 * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode)
816 * and the register representation of a signed int (msr in 64-bit mode) is performed. 726 * and the register representation of a signed int (msr in 64-bit mode) is performed.
817 */ 727 */
818asmlinkage long sys32_sched_getscheduler(u32 pid) 728asmlinkage long compat_sys_sched_getscheduler(u32 pid)
819{ 729{
820 return sys_sched_getscheduler((int)pid); 730 return sys_sched_getscheduler((int)pid);
821} 731}
@@ -826,7 +736,7 @@ asmlinkage long sys32_sched_getscheduler(u32 pid)
826 * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode) 736 * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode)
827 * and the register representation of a signed int (msr in 64-bit mode) is performed. 737 * and the register representation of a signed int (msr in 64-bit mode) is performed.
828 */ 738 */
829asmlinkage long sys32_sched_setparam(u32 pid, struct sched_param __user *param) 739asmlinkage long compat_sys_sched_setparam(u32 pid, struct sched_param __user *param)
830{ 740{
831 return sys_sched_setparam((int)pid, param); 741 return sys_sched_setparam((int)pid, param);
832} 742}
@@ -837,7 +747,7 @@ asmlinkage long sys32_sched_setparam(u32 pid, struct sched_param __user *param)
837 * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode) 747 * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode)
838 * and the register representation of a signed int (msr in 64-bit mode) is performed. 748 * and the register representation of a signed int (msr in 64-bit mode) is performed.
839 */ 749 */
840asmlinkage long sys32_sched_setscheduler(u32 pid, u32 policy, struct sched_param __user *param) 750asmlinkage long compat_sys_sched_setscheduler(u32 pid, u32 policy, struct sched_param __user *param)
841{ 751{
842 return sys_sched_setscheduler((int)pid, (int)policy, param); 752 return sys_sched_setscheduler((int)pid, (int)policy, param);
843} 753}
@@ -848,7 +758,7 @@ asmlinkage long sys32_sched_setscheduler(u32 pid, u32 policy, struct sched_param
848 * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode) 758 * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode)
849 * and the register representation of a signed int (msr in 64-bit mode) is performed. 759 * and the register representation of a signed int (msr in 64-bit mode) is performed.
850 */ 760 */
851asmlinkage long sys32_setdomainname(char __user *name, u32 len) 761asmlinkage long compat_sys_setdomainname(char __user *name, u32 len)
852{ 762{
853 return sys_setdomainname(name, (int)len); 763 return sys_setdomainname(name, (int)len);
854} 764}
@@ -859,13 +769,13 @@ asmlinkage long sys32_setdomainname(char __user *name, u32 len)
859 * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode) 769 * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode)
860 * and the register representation of a signed int (msr in 64-bit mode) is performed. 770 * and the register representation of a signed int (msr in 64-bit mode) is performed.
861 */ 771 */
862asmlinkage long sys32_setgroups(u32 gidsetsize, gid_t __user *grouplist) 772asmlinkage long compat_sys_setgroups(u32 gidsetsize, gid_t __user *grouplist)
863{ 773{
864 return sys_setgroups((int)gidsetsize, grouplist); 774 return sys_setgroups((int)gidsetsize, grouplist);
865} 775}
866 776
867 777
868asmlinkage long sys32_sethostname(char __user *name, u32 len) 778asmlinkage long compat_sys_sethostname(char __user *name, u32 len)
869{ 779{
870 /* sign extend len */ 780 /* sign extend len */
871 return sys_sethostname(name, (int)len); 781 return sys_sethostname(name, (int)len);
@@ -877,30 +787,30 @@ asmlinkage long sys32_sethostname(char __user *name, u32 len)
877 * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode) 787 * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode)
878 * and the register representation of a signed int (msr in 64-bit mode) is performed. 788 * and the register representation of a signed int (msr in 64-bit mode) is performed.
879 */ 789 */
880asmlinkage long sys32_setpgid(u32 pid, u32 pgid) 790asmlinkage long compat_sys_setpgid(u32 pid, u32 pgid)
881{ 791{
882 return sys_setpgid((int)pid, (int)pgid); 792 return sys_setpgid((int)pid, (int)pgid);
883} 793}
884 794
885long sys32_getpriority(u32 which, u32 who) 795long compat_sys_getpriority(u32 which, u32 who)
886{ 796{
887 /* sign extend which and who */ 797 /* sign extend which and who */
888 return sys_getpriority((int)which, (int)who); 798 return sys_getpriority((int)which, (int)who);
889} 799}
890 800
891long sys32_setpriority(u32 which, u32 who, u32 niceval) 801long compat_sys_setpriority(u32 which, u32 who, u32 niceval)
892{ 802{
893 /* sign extend which, who and niceval */ 803 /* sign extend which, who and niceval */
894 return sys_setpriority((int)which, (int)who, (int)niceval); 804 return sys_setpriority((int)which, (int)who, (int)niceval);
895} 805}
896 806
897long sys32_ioprio_get(u32 which, u32 who) 807long compat_sys_ioprio_get(u32 which, u32 who)
898{ 808{
899 /* sign extend which and who */ 809 /* sign extend which and who */
900 return sys_ioprio_get((int)which, (int)who); 810 return sys_ioprio_get((int)which, (int)who);
901} 811}
902 812
903long sys32_ioprio_set(u32 which, u32 who, u32 ioprio) 813long compat_sys_ioprio_set(u32 which, u32 who, u32 ioprio)
904{ 814{
905 /* sign extend which, who and ioprio */ 815 /* sign extend which, who and ioprio */
906 return sys_ioprio_set((int)which, (int)who, (int)ioprio); 816 return sys_ioprio_set((int)which, (int)who, (int)ioprio);
@@ -911,12 +821,12 @@ long sys32_ioprio_set(u32 which, u32 who, u32 ioprio)
911 * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode) 821 * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode)
912 * and the register representation of a signed int (msr in 64-bit mode) is performed. 822 * and the register representation of a signed int (msr in 64-bit mode) is performed.
913 */ 823 */
914asmlinkage long sys32_ssetmask(u32 newmask) 824asmlinkage long compat_sys_ssetmask(u32 newmask)
915{ 825{
916 return sys_ssetmask((int) newmask); 826 return sys_ssetmask((int) newmask);
917} 827}
918 828
919asmlinkage long sys32_syslog(u32 type, char __user * buf, u32 len) 829asmlinkage long compat_sys_syslog(u32 type, char __user * buf, u32 len)
920{ 830{
921 /* sign extend len */ 831 /* sign extend len */
922 return sys_syslog(type, buf, (int)len); 832 return sys_syslog(type, buf, (int)len);
@@ -928,7 +838,7 @@ asmlinkage long sys32_syslog(u32 type, char __user * buf, u32 len)
928 * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode) 838 * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode)
929 * and the register representation of a signed int (msr in 64-bit mode) is performed. 839 * and the register representation of a signed int (msr in 64-bit mode) is performed.
930 */ 840 */
931asmlinkage long sys32_umask(u32 mask) 841asmlinkage long compat_sys_umask(u32 mask)
932{ 842{
933 return sys_umask((int)mask); 843 return sys_umask((int)mask);
934} 844}
@@ -944,7 +854,7 @@ struct __sysctl_args32 {
944 u32 __unused[4]; 854 u32 __unused[4];
945}; 855};
946 856
947asmlinkage long sys32_sysctl(struct __sysctl_args32 __user *args) 857asmlinkage long compat_sys_sysctl(struct __sysctl_args32 __user *args)
948{ 858{
949 struct __sysctl_args32 tmp; 859 struct __sysctl_args32 tmp;
950 int error; 860 int error;
@@ -985,7 +895,7 @@ asmlinkage long sys32_sysctl(struct __sysctl_args32 __user *args)
985} 895}
986#endif 896#endif
987 897
988unsigned long sys32_mmap2(unsigned long addr, size_t len, 898unsigned long compat_sys_mmap2(unsigned long addr, size_t len,
989 unsigned long prot, unsigned long flags, 899 unsigned long prot, unsigned long flags,
990 unsigned long fd, unsigned long pgoff) 900 unsigned long fd, unsigned long pgoff)
991{ 901{
@@ -993,29 +903,7 @@ unsigned long sys32_mmap2(unsigned long addr, size_t len,
993 return sys_mmap(addr, len, prot, flags, fd, pgoff << 12); 903 return sys_mmap(addr, len, prot, flags, fd, pgoff << 12);
994} 904}
995 905
996int get_compat_timeval(struct timeval *tv, struct compat_timeval __user *ctv) 906long compat_sys_tgkill(u32 tgid, u32 pid, int sig)
997{
998 return (!access_ok(VERIFY_READ, ctv, sizeof(*ctv)) ||
999 __get_user(tv->tv_sec, &ctv->tv_sec) ||
1000 __get_user(tv->tv_usec, &ctv->tv_usec)) ? -EFAULT : 0;
1001}
1002
1003asmlinkage long sys32_utimes(char __user *filename, struct compat_timeval __user *tvs)
1004{
1005 struct timeval ktvs[2], *ptr;
1006
1007 ptr = NULL;
1008 if (tvs) {
1009 if (get_compat_timeval(&ktvs[0], &tvs[0]) ||
1010 get_compat_timeval(&ktvs[1], &tvs[1]))
1011 return -EFAULT;
1012 ptr = ktvs;
1013 }
1014
1015 return do_utimes(filename, ptr);
1016}
1017
1018long sys32_tgkill(u32 tgid, u32 pid, int sig)
1019{ 907{
1020 /* sign extend tgid, pid */ 908 /* sign extend tgid, pid */
1021 return sys_tgkill((int)tgid, (int)pid, sig); 909 return sys_tgkill((int)tgid, (int)pid, sig);
@@ -1026,30 +914,30 @@ long sys32_tgkill(u32 tgid, u32 pid, int sig)
1026 * The 32 bit ABI passes long longs in an odd even register pair. 914 * The 32 bit ABI passes long longs in an odd even register pair.
1027 */ 915 */
1028 916
1029compat_ssize_t sys32_pread64(unsigned int fd, char __user *ubuf, compat_size_t count, 917compat_ssize_t compat_sys_pread64(unsigned int fd, char __user *ubuf, compat_size_t count,
1030 u32 reg6, u32 poshi, u32 poslo) 918 u32 reg6, u32 poshi, u32 poslo)
1031{ 919{
1032 return sys_pread64(fd, ubuf, count, ((loff_t)poshi << 32) | poslo); 920 return sys_pread64(fd, ubuf, count, ((loff_t)poshi << 32) | poslo);
1033} 921}
1034 922
1035compat_ssize_t sys32_pwrite64(unsigned int fd, char __user *ubuf, compat_size_t count, 923compat_ssize_t compat_sys_pwrite64(unsigned int fd, char __user *ubuf, compat_size_t count,
1036 u32 reg6, u32 poshi, u32 poslo) 924 u32 reg6, u32 poshi, u32 poslo)
1037{ 925{
1038 return sys_pwrite64(fd, ubuf, count, ((loff_t)poshi << 32) | poslo); 926 return sys_pwrite64(fd, ubuf, count, ((loff_t)poshi << 32) | poslo);
1039} 927}
1040 928
1041compat_ssize_t sys32_readahead(int fd, u32 r4, u32 offhi, u32 offlo, u32 count) 929compat_ssize_t compat_sys_readahead(int fd, u32 r4, u32 offhi, u32 offlo, u32 count)
1042{ 930{
1043 return sys_readahead(fd, ((loff_t)offhi << 32) | offlo, count); 931 return sys_readahead(fd, ((loff_t)offhi << 32) | offlo, count);
1044} 932}
1045 933
1046asmlinkage int sys32_truncate64(const char __user * path, u32 reg4, 934asmlinkage int compat_sys_truncate64(const char __user * path, u32 reg4,
1047 unsigned long high, unsigned long low) 935 unsigned long high, unsigned long low)
1048{ 936{
1049 return sys_truncate(path, (high << 32) | low); 937 return sys_truncate(path, (high << 32) | low);
1050} 938}
1051 939
1052asmlinkage int sys32_ftruncate64(unsigned int fd, u32 reg4, unsigned long high, 940asmlinkage int compat_sys_ftruncate64(unsigned int fd, u32 reg4, unsigned long high,
1053 unsigned long low) 941 unsigned long low)
1054{ 942{
1055 return sys_ftruncate(fd, (high << 32) | low); 943 return sys_ftruncate(fd, (high << 32) | low);
@@ -1101,7 +989,7 @@ long ppc32_timer_create(clockid_t clock,
1101 return err; 989 return err;
1102} 990}
1103 991
1104asmlinkage long sys32_add_key(const char __user *_type, 992asmlinkage long compat_sys_add_key(const char __user *_type,
1105 const char __user *_description, 993 const char __user *_description,
1106 const void __user *_payload, 994 const void __user *_payload,
1107 u32 plen, 995 u32 plen,
@@ -1110,7 +998,7 @@ asmlinkage long sys32_add_key(const char __user *_type,
1110 return sys_add_key(_type, _description, _payload, plen, ringid); 998 return sys_add_key(_type, _description, _payload, plen, ringid);
1111} 999}
1112 1000
1113asmlinkage long sys32_request_key(const char __user *_type, 1001asmlinkage long compat_sys_request_key(const char __user *_type,
1114 const char __user *_description, 1002 const char __user *_description,
1115 const char __user *_callout_info, 1003 const char __user *_callout_info,
1116 u32 destringid) 1004 u32 destringid)
diff --git a/arch/powerpc/kernel/systbl.S b/arch/powerpc/kernel/systbl.S
index 1b807f79d5da..65eaea91b499 100644
--- a/arch/powerpc/kernel/systbl.S
+++ b/arch/powerpc/kernel/systbl.S
@@ -19,15 +19,13 @@
19 19
20#ifdef CONFIG_PPC64 20#ifdef CONFIG_PPC64
21#define SYSCALL(func) .llong .sys_##func,.sys_##func 21#define SYSCALL(func) .llong .sys_##func,.sys_##func
22#define SYSCALL32(func) .llong .sys_##func,.sys32_##func
23#define COMPAT_SYS(func) .llong .sys_##func,.compat_sys_##func 22#define COMPAT_SYS(func) .llong .sys_##func,.compat_sys_##func
24#define PPC_SYS(func) .llong .ppc_##func,.ppc_##func 23#define PPC_SYS(func) .llong .ppc_##func,.ppc_##func
25#define OLDSYS(func) .llong .sys_ni_syscall,.sys_ni_syscall 24#define OLDSYS(func) .llong .sys_ni_syscall,.sys_ni_syscall
26#define SYS32ONLY(func) .llong .sys_ni_syscall,.sys32_##func 25#define SYS32ONLY(func) .llong .sys_ni_syscall,.compat_sys_##func
27#define SYSX(f, f3264, f32) .llong .f,.f3264 26#define SYSX(f, f3264, f32) .llong .f,.f3264
28#else 27#else
29#define SYSCALL(func) .long sys_##func 28#define SYSCALL(func) .long sys_##func
30#define SYSCALL32(func) .long sys_##func
31#define COMPAT_SYS(func) .long sys_##func 29#define COMPAT_SYS(func) .long sys_##func
32#define PPC_SYS(func) .long ppc_##func 30#define PPC_SYS(func) .long ppc_##func
33#define OLDSYS(func) .long sys_##func 31#define OLDSYS(func) .long sys_##func
@@ -50,11 +48,11 @@ SYSCALL(read)
50SYSCALL(write) 48SYSCALL(write)
51COMPAT_SYS(open) 49COMPAT_SYS(open)
52SYSCALL(close) 50SYSCALL(close)
53SYSCALL32(waitpid) 51COMPAT_SYS(waitpid)
54SYSCALL32(creat) 52COMPAT_SYS(creat)
55SYSCALL(link) 53SYSCALL(link)
56SYSCALL(unlink) 54SYSCALL(unlink)
57SYSCALL32(execve) 55COMPAT_SYS(execve)
58SYSCALL(chdir) 56SYSCALL(chdir)
59SYSX(sys64_time,compat_sys_time,sys_time) 57SYSX(sys64_time,compat_sys_time,sys_time)
60SYSCALL(mknod) 58SYSCALL(mknod)
@@ -69,20 +67,20 @@ SYSX(sys_ni_syscall,sys_oldumount,sys_oldumount)
69SYSCALL(setuid) 67SYSCALL(setuid)
70SYSCALL(getuid) 68SYSCALL(getuid)
71COMPAT_SYS(stime) 69COMPAT_SYS(stime)
72SYSCALL32(ptrace) 70COMPAT_SYS(ptrace)
73SYSCALL(alarm) 71SYSCALL(alarm)
74OLDSYS(fstat) 72OLDSYS(fstat)
75SYSCALL32(pause) 73COMPAT_SYS(pause)
76COMPAT_SYS(utime) 74COMPAT_SYS(utime)
77SYSCALL(ni_syscall) 75SYSCALL(ni_syscall)
78SYSCALL(ni_syscall) 76SYSCALL(ni_syscall)
79SYSCALL32(access) 77COMPAT_SYS(access)
80SYSCALL32(nice) 78COMPAT_SYS(nice)
81SYSCALL(ni_syscall) 79SYSCALL(ni_syscall)
82SYSCALL(sync) 80SYSCALL(sync)
83SYSCALL32(kill) 81COMPAT_SYS(kill)
84SYSCALL(rename) 82SYSCALL(rename)
85SYSCALL32(mkdir) 83COMPAT_SYS(mkdir)
86SYSCALL(rmdir) 84SYSCALL(rmdir)
87SYSCALL(dup) 85SYSCALL(dup)
88SYSCALL(pipe) 86SYSCALL(pipe)
@@ -100,10 +98,10 @@ SYSCALL(ni_syscall)
100COMPAT_SYS(ioctl) 98COMPAT_SYS(ioctl)
101COMPAT_SYS(fcntl) 99COMPAT_SYS(fcntl)
102SYSCALL(ni_syscall) 100SYSCALL(ni_syscall)
103SYSCALL32(setpgid) 101COMPAT_SYS(setpgid)
104SYSCALL(ni_syscall) 102SYSCALL(ni_syscall)
105SYSX(sys_ni_syscall,sys_olduname, sys_olduname) 103SYSX(sys_ni_syscall,sys_olduname, sys_olduname)
106SYSCALL32(umask) 104COMPAT_SYS(umask)
107SYSCALL(chroot) 105SYSCALL(chroot)
108SYSCALL(ustat) 106SYSCALL(ustat)
109SYSCALL(dup2) 107SYSCALL(dup2)
@@ -112,23 +110,23 @@ SYSCALL(getpgrp)
112SYSCALL(setsid) 110SYSCALL(setsid)
113SYS32ONLY(sigaction) 111SYS32ONLY(sigaction)
114SYSCALL(sgetmask) 112SYSCALL(sgetmask)
115SYSCALL32(ssetmask) 113COMPAT_SYS(ssetmask)
116SYSCALL(setreuid) 114SYSCALL(setreuid)
117SYSCALL(setregid) 115SYSCALL(setregid)
118SYSX(sys_ni_syscall,ppc32_sigsuspend,ppc_sigsuspend) 116SYSX(sys_ni_syscall,ppc32_sigsuspend,ppc_sigsuspend)
119COMPAT_SYS(sigpending) 117COMPAT_SYS(sigpending)
120SYSCALL32(sethostname) 118COMPAT_SYS(sethostname)
121COMPAT_SYS(setrlimit) 119COMPAT_SYS(setrlimit)
122COMPAT_SYS(old_getrlimit) 120COMPAT_SYS(old_getrlimit)
123COMPAT_SYS(getrusage) 121COMPAT_SYS(getrusage)
124SYSCALL32(gettimeofday) 122COMPAT_SYS(gettimeofday)
125SYSCALL32(settimeofday) 123COMPAT_SYS(settimeofday)
126SYSCALL32(getgroups) 124COMPAT_SYS(getgroups)
127SYSCALL32(setgroups) 125COMPAT_SYS(setgroups)
128SYSX(sys_ni_syscall,sys_ni_syscall,ppc_select) 126SYSX(sys_ni_syscall,sys_ni_syscall,ppc_select)
129SYSCALL(symlink) 127SYSCALL(symlink)
130OLDSYS(lstat) 128OLDSYS(lstat)
131SYSCALL32(readlink) 129COMPAT_SYS(readlink)
132SYSCALL(uselib) 130SYSCALL(uselib)
133SYSCALL(swapon) 131SYSCALL(swapon)
134SYSCALL(reboot) 132SYSCALL(reboot)
@@ -139,14 +137,14 @@ SYSCALL(truncate)
139SYSCALL(ftruncate) 137SYSCALL(ftruncate)
140SYSCALL(fchmod) 138SYSCALL(fchmod)
141SYSCALL(fchown) 139SYSCALL(fchown)
142SYSCALL32(getpriority) 140COMPAT_SYS(getpriority)
143SYSCALL32(setpriority) 141COMPAT_SYS(setpriority)
144SYSCALL(ni_syscall) 142SYSCALL(ni_syscall)
145COMPAT_SYS(statfs) 143COMPAT_SYS(statfs)
146COMPAT_SYS(fstatfs) 144COMPAT_SYS(fstatfs)
147SYSCALL(ni_syscall) 145SYSCALL(ni_syscall)
148COMPAT_SYS(socketcall) 146COMPAT_SYS(socketcall)
149SYSCALL32(syslog) 147COMPAT_SYS(syslog)
150COMPAT_SYS(setitimer) 148COMPAT_SYS(setitimer)
151COMPAT_SYS(getitimer) 149COMPAT_SYS(getitimer)
152COMPAT_SYS(newstat) 150COMPAT_SYS(newstat)
@@ -159,15 +157,15 @@ SYSCALL(ni_syscall)
159SYSCALL(ni_syscall) 157SYSCALL(ni_syscall)
160COMPAT_SYS(wait4) 158COMPAT_SYS(wait4)
161SYSCALL(swapoff) 159SYSCALL(swapoff)
162SYSCALL32(sysinfo) 160COMPAT_SYS(sysinfo)
163SYSCALL32(ipc) 161COMPAT_SYS(ipc)
164SYSCALL(fsync) 162SYSCALL(fsync)
165SYSX(sys_ni_syscall,ppc32_sigreturn,sys_sigreturn) 163SYSX(sys_ni_syscall,ppc32_sigreturn,sys_sigreturn)
166PPC_SYS(clone) 164PPC_SYS(clone)
167SYSCALL32(setdomainname) 165COMPAT_SYS(setdomainname)
168PPC_SYS(newuname) 166PPC_SYS(newuname)
169SYSCALL(ni_syscall) 167SYSCALL(ni_syscall)
170SYSCALL32(adjtimex) 168COMPAT_SYS(adjtimex)
171SYSCALL(mprotect) 169SYSCALL(mprotect)
172SYSX(sys_ni_syscall,compat_sys_sigprocmask,sys_sigprocmask) 170SYSX(sys_ni_syscall,compat_sys_sigprocmask,sys_sigprocmask)
173SYSCALL(ni_syscall) 171SYSCALL(ni_syscall)
@@ -175,36 +173,36 @@ SYSCALL(init_module)
175SYSCALL(delete_module) 173SYSCALL(delete_module)
176SYSCALL(ni_syscall) 174SYSCALL(ni_syscall)
177SYSCALL(quotactl) 175SYSCALL(quotactl)
178SYSCALL32(getpgid) 176COMPAT_SYS(getpgid)
179SYSCALL(fchdir) 177SYSCALL(fchdir)
180SYSCALL(bdflush) 178SYSCALL(bdflush)
181SYSCALL32(sysfs) 179COMPAT_SYS(sysfs)
182SYSX(ppc64_personality,ppc64_personality,sys_personality) 180SYSX(ppc64_personality,ppc64_personality,sys_personality)
183SYSCALL(ni_syscall) 181SYSCALL(ni_syscall)
184SYSCALL(setfsuid) 182SYSCALL(setfsuid)
185SYSCALL(setfsgid) 183SYSCALL(setfsgid)
186SYSCALL(llseek) 184SYSCALL(llseek)
187SYSCALL32(getdents) 185COMPAT_SYS(getdents)
188SYSX(sys_select,ppc32_select,ppc_select) 186SYSX(sys_select,ppc32_select,ppc_select)
189SYSCALL(flock) 187SYSCALL(flock)
190SYSCALL(msync) 188SYSCALL(msync)
191COMPAT_SYS(readv) 189COMPAT_SYS(readv)
192COMPAT_SYS(writev) 190COMPAT_SYS(writev)
193SYSCALL32(getsid) 191COMPAT_SYS(getsid)
194SYSCALL(fdatasync) 192SYSCALL(fdatasync)
195SYSCALL32(sysctl) 193COMPAT_SYS(sysctl)
196SYSCALL(mlock) 194SYSCALL(mlock)
197SYSCALL(munlock) 195SYSCALL(munlock)
198SYSCALL(mlockall) 196SYSCALL(mlockall)
199SYSCALL(munlockall) 197SYSCALL(munlockall)
200SYSCALL32(sched_setparam) 198COMPAT_SYS(sched_setparam)
201SYSCALL32(sched_getparam) 199COMPAT_SYS(sched_getparam)
202SYSCALL32(sched_setscheduler) 200COMPAT_SYS(sched_setscheduler)
203SYSCALL32(sched_getscheduler) 201COMPAT_SYS(sched_getscheduler)
204SYSCALL(sched_yield) 202SYSCALL(sched_yield)
205SYSCALL32(sched_get_priority_max) 203COMPAT_SYS(sched_get_priority_max)
206SYSCALL32(sched_get_priority_min) 204COMPAT_SYS(sched_get_priority_min)
207SYSCALL32(sched_rr_get_interval) 205COMPAT_SYS(sched_rr_get_interval)
208COMPAT_SYS(nanosleep) 206COMPAT_SYS(nanosleep)
209SYSCALL(mremap) 207SYSCALL(mremap)
210SYSCALL(setresuid) 208SYSCALL(setresuid)
@@ -214,36 +212,36 @@ SYSCALL(poll)
214COMPAT_SYS(nfsservctl) 212COMPAT_SYS(nfsservctl)
215SYSCALL(setresgid) 213SYSCALL(setresgid)
216SYSCALL(getresgid) 214SYSCALL(getresgid)
217SYSCALL32(prctl) 215COMPAT_SYS(prctl)
218SYSX(ppc64_rt_sigreturn,ppc32_rt_sigreturn,sys_rt_sigreturn) 216SYSX(ppc64_rt_sigreturn,ppc32_rt_sigreturn,sys_rt_sigreturn)
219SYSCALL32(rt_sigaction) 217COMPAT_SYS(rt_sigaction)
220SYSCALL32(rt_sigprocmask) 218COMPAT_SYS(rt_sigprocmask)
221SYSCALL32(rt_sigpending) 219COMPAT_SYS(rt_sigpending)
222COMPAT_SYS(rt_sigtimedwait) 220COMPAT_SYS(rt_sigtimedwait)
223SYSCALL32(rt_sigqueueinfo) 221COMPAT_SYS(rt_sigqueueinfo)
224SYSX(ppc64_rt_sigsuspend,ppc32_rt_sigsuspend,ppc_rt_sigsuspend) 222SYSX(ppc64_rt_sigsuspend,ppc32_rt_sigsuspend,ppc_rt_sigsuspend)
225SYSCALL32(pread64) 223COMPAT_SYS(pread64)
226SYSCALL32(pwrite64) 224COMPAT_SYS(pwrite64)
227SYSCALL(chown) 225SYSCALL(chown)
228SYSCALL(getcwd) 226SYSCALL(getcwd)
229SYSCALL(capget) 227SYSCALL(capget)
230SYSCALL(capset) 228SYSCALL(capset)
231SYSCALL32(sigaltstack) 229COMPAT_SYS(sigaltstack)
232SYSX(sys_sendfile64,sys32_sendfile,sys_sendfile) 230SYSX(sys_sendfile64,compat_sys_sendfile,sys_sendfile)
233SYSCALL(ni_syscall) 231SYSCALL(ni_syscall)
234SYSCALL(ni_syscall) 232SYSCALL(ni_syscall)
235PPC_SYS(vfork) 233PPC_SYS(vfork)
236COMPAT_SYS(getrlimit) 234COMPAT_SYS(getrlimit)
237SYSCALL32(readahead) 235COMPAT_SYS(readahead)
238SYS32ONLY(mmap2) 236SYS32ONLY(mmap2)
239SYS32ONLY(truncate64) 237SYS32ONLY(truncate64)
240SYS32ONLY(ftruncate64) 238SYS32ONLY(ftruncate64)
241SYSX(sys_ni_syscall,sys_stat64,sys_stat64) 239SYSX(sys_ni_syscall,sys_stat64,sys_stat64)
242SYSX(sys_ni_syscall,sys_lstat64,sys_lstat64) 240SYSX(sys_ni_syscall,sys_lstat64,sys_lstat64)
243SYSX(sys_ni_syscall,sys_fstat64,sys_fstat64) 241SYSX(sys_ni_syscall,sys_fstat64,sys_fstat64)
244SYSCALL32(pciconfig_read) 242COMPAT_SYS(pciconfig_read)
245SYSCALL32(pciconfig_write) 243COMPAT_SYS(pciconfig_write)
246SYSCALL32(pciconfig_iobase) 244COMPAT_SYS(pciconfig_iobase)
247SYSCALL(ni_syscall) 245SYSCALL(ni_syscall)
248SYSCALL(getdents64) 246SYSCALL(getdents64)
249SYSCALL(pivot_root) 247SYSCALL(pivot_root)
@@ -293,8 +291,8 @@ COMPAT_SYS(clock_gettime)
293COMPAT_SYS(clock_getres) 291COMPAT_SYS(clock_getres)
294COMPAT_SYS(clock_nanosleep) 292COMPAT_SYS(clock_nanosleep)
295SYSX(ppc64_swapcontext,ppc32_swapcontext,ppc_swapcontext) 293SYSX(ppc64_swapcontext,ppc32_swapcontext,ppc_swapcontext)
296SYSCALL32(tgkill) 294COMPAT_SYS(tgkill)
297SYSCALL32(utimes) 295COMPAT_SYS(utimes)
298COMPAT_SYS(statfs64) 296COMPAT_SYS(statfs64)
299COMPAT_SYS(fstatfs64) 297COMPAT_SYS(fstatfs64)
300SYSX(sys_ni_syscall, ppc_fadvise64_64, ppc_fadvise64_64) 298SYSX(sys_ni_syscall, ppc_fadvise64_64, ppc_fadvise64_64)
@@ -312,12 +310,12 @@ COMPAT_SYS(mq_timedreceive)
312COMPAT_SYS(mq_notify) 310COMPAT_SYS(mq_notify)
313COMPAT_SYS(mq_getsetattr) 311COMPAT_SYS(mq_getsetattr)
314COMPAT_SYS(kexec_load) 312COMPAT_SYS(kexec_load)
315SYSCALL32(add_key) 313COMPAT_SYS(add_key)
316SYSCALL32(request_key) 314COMPAT_SYS(request_key)
317COMPAT_SYS(keyctl) 315COMPAT_SYS(keyctl)
318COMPAT_SYS(waitid) 316COMPAT_SYS(waitid)
319SYSCALL32(ioprio_set) 317COMPAT_SYS(ioprio_set)
320SYSCALL32(ioprio_get) 318COMPAT_SYS(ioprio_get)
321SYSCALL(inotify_init) 319SYSCALL(inotify_init)
322SYSCALL(inotify_add_watch) 320SYSCALL(inotify_add_watch)
323SYSCALL(inotify_rm_watch) 321SYSCALL(inotify_rm_watch)
diff --git a/arch/ppc64/kernel/entry.S b/arch/ppc64/kernel/entry.S
index ea30af810e0c..5d2fcbe384c1 100644
--- a/arch/ppc64/kernel/entry.S
+++ b/arch/ppc64/kernel/entry.S
@@ -265,7 +265,7 @@ _GLOBAL(save_nvgprs)
265 */ 265 */
266_GLOBAL(ppc32_sigsuspend) 266_GLOBAL(ppc32_sigsuspend)
267 bl .save_nvgprs 267 bl .save_nvgprs
268 bl .sys32_sigsuspend 268 bl .compat_sys_sigsuspend
269 b 70f 269 b 70f
270 270
271_GLOBAL(ppc64_rt_sigsuspend) 271_GLOBAL(ppc64_rt_sigsuspend)
@@ -275,7 +275,7 @@ _GLOBAL(ppc64_rt_sigsuspend)
275 275
276_GLOBAL(ppc32_rt_sigsuspend) 276_GLOBAL(ppc32_rt_sigsuspend)
277 bl .save_nvgprs 277 bl .save_nvgprs
278 bl .sys32_rt_sigsuspend 278 bl .compat_sys_rt_sigsuspend
27970: cmpdi 0,r3,0 27970: cmpdi 0,r3,0
280 /* If it returned an error, we need to return via syscall_exit to set 280 /* If it returned an error, we need to return via syscall_exit to set
281 the SO bit in cr0 and potentially stop for ptrace. */ 281 the SO bit in cr0 and potentially stop for ptrace. */
@@ -310,7 +310,7 @@ _GLOBAL(ppc_clone)
310 310
311_GLOBAL(ppc32_swapcontext) 311_GLOBAL(ppc32_swapcontext)
312 bl .save_nvgprs 312 bl .save_nvgprs
313 bl .sys32_swapcontext 313 bl .compat_sys_swapcontext
314 b 80f 314 b 80f
315 315
316_GLOBAL(ppc64_swapcontext) 316_GLOBAL(ppc64_swapcontext)
@@ -319,11 +319,11 @@ _GLOBAL(ppc64_swapcontext)
319 b 80f 319 b 80f
320 320
321_GLOBAL(ppc32_sigreturn) 321_GLOBAL(ppc32_sigreturn)
322 bl .sys32_sigreturn 322 bl .compat_sys_sigreturn
323 b 80f 323 b 80f
324 324
325_GLOBAL(ppc32_rt_sigreturn) 325_GLOBAL(ppc32_rt_sigreturn)
326 bl .sys32_rt_sigreturn 326 bl .compat_sys_rt_sigreturn
327 b 80f 327 b 80f
328 328
329_GLOBAL(ppc64_rt_sigreturn) 329_GLOBAL(ppc64_rt_sigreturn)
diff --git a/arch/ppc64/kernel/misc.S b/arch/ppc64/kernel/misc.S
index 755d73f222e2..c2c3421b8f38 100644
--- a/arch/ppc64/kernel/misc.S
+++ b/arch/ppc64/kernel/misc.S
@@ -928,11 +928,11 @@ _GLOBAL(sys_call_table32)
928 .llong .sys_write 928 .llong .sys_write
929 .llong .compat_sys_open /* 5 */ 929 .llong .compat_sys_open /* 5 */
930 .llong .sys_close 930 .llong .sys_close
931 .llong .sys32_waitpid 931 .llong .compat_sys_waitpid
932 .llong .sys32_creat 932 .llong .compat_sys_creat
933 .llong .sys_link 933 .llong .sys_link
934 .llong .sys_unlink /* 10 */ 934 .llong .sys_unlink /* 10 */
935 .llong .sys32_execve 935 .llong .compat_sys_execve
936 .llong .sys_chdir 936 .llong .sys_chdir
937 .llong .compat_sys_time 937 .llong .compat_sys_time
938 .llong .sys_mknod 938 .llong .sys_mknod
@@ -947,20 +947,20 @@ _GLOBAL(sys_call_table32)
947 .llong .sys_setuid 947 .llong .sys_setuid
948 .llong .sys_getuid 948 .llong .sys_getuid
949 .llong .compat_sys_stime /* 25 */ 949 .llong .compat_sys_stime /* 25 */
950 .llong .sys32_ptrace 950 .llong .compat_sys_ptrace
951 .llong .sys_alarm 951 .llong .sys_alarm
952 .llong .sys_ni_syscall /* old fstat syscall */ 952 .llong .sys_ni_syscall /* old fstat syscall */
953 .llong .sys32_pause 953 .llong .compat_sys_pause
954 .llong .compat_sys_utime /* 30 */ 954 .llong .compat_sys_utime /* 30 */
955 .llong .sys_ni_syscall /* old stty syscall */ 955 .llong .sys_ni_syscall /* old stty syscall */
956 .llong .sys_ni_syscall /* old gtty syscall */ 956 .llong .sys_ni_syscall /* old gtty syscall */
957 .llong .sys32_access 957 .llong .compat_sys_access
958 .llong .sys32_nice 958 .llong .compat_sys_nice
959 .llong .sys_ni_syscall /* 35 - old ftime syscall */ 959 .llong .sys_ni_syscall /* 35 - old ftime syscall */
960 .llong .sys_sync 960 .llong .sys_sync
961 .llong .sys32_kill 961 .llong .compat_sys_kill
962 .llong .sys_rename 962 .llong .sys_rename
963 .llong .sys32_mkdir 963 .llong .compat_sys_mkdir
964 .llong .sys_rmdir /* 40 */ 964 .llong .sys_rmdir /* 40 */
965 .llong .sys_dup 965 .llong .sys_dup
966 .llong .sys_pipe 966 .llong .sys_pipe
@@ -978,35 +978,35 @@ _GLOBAL(sys_call_table32)
978 .llong .compat_sys_ioctl 978 .llong .compat_sys_ioctl
979 .llong .compat_sys_fcntl /* 55 */ 979 .llong .compat_sys_fcntl /* 55 */
980 .llong .sys_ni_syscall /* old mpx syscall */ 980 .llong .sys_ni_syscall /* old mpx syscall */
981 .llong .sys32_setpgid 981 .llong .compat_sys_setpgid
982 .llong .sys_ni_syscall /* old ulimit syscall */ 982 .llong .sys_ni_syscall /* old ulimit syscall */
983 .llong .sys_olduname 983 .llong .sys_olduname
984 .llong .sys32_umask /* 60 */ 984 .llong .compat_sys_umask /* 60 */
985 .llong .sys_chroot 985 .llong .sys_chroot
986 .llong .sys_ustat 986 .llong .sys_ustat
987 .llong .sys_dup2 987 .llong .sys_dup2
988 .llong .sys_getppid 988 .llong .sys_getppid
989 .llong .sys_getpgrp /* 65 */ 989 .llong .sys_getpgrp /* 65 */
990 .llong .sys_setsid 990 .llong .sys_setsid
991 .llong .sys32_sigaction 991 .llong .compat_sys_sigaction
992 .llong .sys_sgetmask 992 .llong .sys_sgetmask
993 .llong .sys32_ssetmask 993 .llong .compat_sys_ssetmask
994 .llong .sys_setreuid /* 70 */ 994 .llong .sys_setreuid /* 70 */
995 .llong .sys_setregid 995 .llong .sys_setregid
996 .llong .ppc32_sigsuspend 996 .llong .ppc32_sigsuspend
997 .llong .compat_sys_sigpending 997 .llong .compat_sys_sigpending
998 .llong .sys32_sethostname 998 .llong .compat_sys_sethostname
999 .llong .compat_sys_setrlimit /* 75 */ 999 .llong .compat_sys_setrlimit /* 75 */
1000 .llong .compat_sys_old_getrlimit 1000 .llong .compat_sys_old_getrlimit
1001 .llong .compat_sys_getrusage 1001 .llong .compat_sys_getrusage
1002 .llong .sys32_gettimeofday 1002 .llong .compat_sys_gettimeofday
1003 .llong .sys32_settimeofday 1003 .llong .compat_sys_settimeofday
1004 .llong .sys32_getgroups /* 80 */ 1004 .llong .compat_sys_getgroups /* 80 */
1005 .llong .sys32_setgroups 1005 .llong .compat_sys_setgroups
1006 .llong .sys_ni_syscall /* old select syscall */ 1006 .llong .sys_ni_syscall /* old select syscall */
1007 .llong .sys_symlink 1007 .llong .sys_symlink
1008 .llong .sys_ni_syscall /* old lstat syscall */ 1008 .llong .sys_ni_syscall /* old lstat syscall */
1009 .llong .sys32_readlink /* 85 */ 1009 .llong .compat_sys_readlink /* 85 */
1010 .llong .sys_uselib 1010 .llong .sys_uselib
1011 .llong .sys_swapon 1011 .llong .sys_swapon
1012 .llong .sys_reboot 1012 .llong .sys_reboot
@@ -1017,14 +1017,14 @@ _GLOBAL(sys_call_table32)
1017 .llong .sys_ftruncate 1017 .llong .sys_ftruncate
1018 .llong .sys_fchmod 1018 .llong .sys_fchmod
1019 .llong .sys_fchown /* 95 */ 1019 .llong .sys_fchown /* 95 */
1020 .llong .sys32_getpriority 1020 .llong .compat_sys_getpriority
1021 .llong .sys32_setpriority 1021 .llong .compat_sys_setpriority
1022 .llong .sys_ni_syscall /* old profil syscall */ 1022 .llong .sys_ni_syscall /* old profil syscall */
1023 .llong .compat_sys_statfs 1023 .llong .compat_sys_statfs
1024 .llong .compat_sys_fstatfs /* 100 */ 1024 .llong .compat_sys_fstatfs /* 100 */
1025 .llong .sys_ni_syscall /* old ioperm syscall */ 1025 .llong .sys_ni_syscall /* old ioperm syscall */
1026 .llong .compat_sys_socketcall 1026 .llong .compat_sys_socketcall
1027 .llong .sys32_syslog 1027 .llong .compat_sys_syslog
1028 .llong .compat_sys_setitimer 1028 .llong .compat_sys_setitimer
1029 .llong .compat_sys_getitimer /* 105 */ 1029 .llong .compat_sys_getitimer /* 105 */
1030 .llong .compat_sys_newstat 1030 .llong .compat_sys_newstat
@@ -1037,15 +1037,15 @@ _GLOBAL(sys_call_table32)
1037 .llong .sys_ni_syscall /* old vm86 syscall */ 1037 .llong .sys_ni_syscall /* old vm86 syscall */
1038 .llong .compat_sys_wait4 1038 .llong .compat_sys_wait4
1039 .llong .sys_swapoff /* 115 */ 1039 .llong .sys_swapoff /* 115 */
1040 .llong .sys32_sysinfo 1040 .llong .compat_sys_sysinfo
1041 .llong .sys32_ipc 1041 .llong .compat_sys_ipc
1042 .llong .sys_fsync 1042 .llong .sys_fsync
1043 .llong .ppc32_sigreturn 1043 .llong .ppc32_sigreturn
1044 .llong .ppc_clone /* 120 */ 1044 .llong .ppc_clone /* 120 */
1045 .llong .sys32_setdomainname 1045 .llong .compat_sys_setdomainname
1046 .llong .ppc_newuname 1046 .llong .ppc_newuname
1047 .llong .sys_ni_syscall /* old modify_ldt syscall */ 1047 .llong .sys_ni_syscall /* old modify_ldt syscall */
1048 .llong .sys32_adjtimex 1048 .llong .compat_sys_adjtimex
1049 .llong .sys_mprotect /* 125 */ 1049 .llong .sys_mprotect /* 125 */
1050 .llong .compat_sys_sigprocmask 1050 .llong .compat_sys_sigprocmask
1051 .llong .sys_ni_syscall /* old create_module syscall */ 1051 .llong .sys_ni_syscall /* old create_module syscall */
@@ -1053,36 +1053,36 @@ _GLOBAL(sys_call_table32)
1053 .llong .sys_delete_module 1053 .llong .sys_delete_module
1054 .llong .sys_ni_syscall /* 130 old get_kernel_syms syscall */ 1054 .llong .sys_ni_syscall /* 130 old get_kernel_syms syscall */
1055 .llong .sys_quotactl 1055 .llong .sys_quotactl
1056 .llong .sys32_getpgid 1056 .llong .compat_sys_getpgid
1057 .llong .sys_fchdir 1057 .llong .sys_fchdir
1058 .llong .sys_bdflush 1058 .llong .sys_bdflush
1059 .llong .sys32_sysfs /* 135 */ 1059 .llong .compat_sys_sysfs /* 135 */
1060 .llong .ppc64_personality 1060 .llong .ppc64_personality
1061 .llong .sys_ni_syscall /* for afs_syscall */ 1061 .llong .sys_ni_syscall /* for afs_syscall */
1062 .llong .sys_setfsuid 1062 .llong .sys_setfsuid
1063 .llong .sys_setfsgid 1063 .llong .sys_setfsgid
1064 .llong .sys_llseek /* 140 */ 1064 .llong .sys_llseek /* 140 */
1065 .llong .sys32_getdents 1065 .llong .compat_sys_getdents
1066 .llong .ppc32_select 1066 .llong .ppc32_select
1067 .llong .sys_flock 1067 .llong .sys_flock
1068 .llong .sys_msync 1068 .llong .sys_msync
1069 .llong .compat_sys_readv /* 145 */ 1069 .llong .compat_sys_readv /* 145 */
1070 .llong .compat_sys_writev 1070 .llong .compat_sys_writev
1071 .llong .sys32_getsid 1071 .llong .compat_sys_getsid
1072 .llong .sys_fdatasync 1072 .llong .sys_fdatasync
1073 .llong .sys32_sysctl 1073 .llong .compat_sys_sysctl
1074 .llong .sys_mlock /* 150 */ 1074 .llong .sys_mlock /* 150 */
1075 .llong .sys_munlock 1075 .llong .sys_munlock
1076 .llong .sys_mlockall 1076 .llong .sys_mlockall
1077 .llong .sys_munlockall 1077 .llong .sys_munlockall
1078 .llong .sys32_sched_setparam 1078 .llong .compat_sys_sched_setparam
1079 .llong .sys32_sched_getparam /* 155 */ 1079 .llong .compat_sys_sched_getparam /* 155 */
1080 .llong .sys32_sched_setscheduler 1080 .llong .compat_sys_sched_setscheduler
1081 .llong .sys32_sched_getscheduler 1081 .llong .compat_sys_sched_getscheduler
1082 .llong .sys_sched_yield 1082 .llong .sys_sched_yield
1083 .llong .sys32_sched_get_priority_max 1083 .llong .compat_sys_sched_get_priority_max
1084 .llong .sys32_sched_get_priority_min /* 160 */ 1084 .llong .compat_sys_sched_get_priority_min /* 160 */
1085 .llong .sys32_sched_rr_get_interval 1085 .llong .compat_sys_sched_rr_get_interval
1086 .llong .compat_sys_nanosleep 1086 .llong .compat_sys_nanosleep
1087 .llong .sys_mremap 1087 .llong .sys_mremap
1088 .llong .sys_setresuid 1088 .llong .sys_setresuid
@@ -1092,36 +1092,36 @@ _GLOBAL(sys_call_table32)
1092 .llong .compat_sys_nfsservctl 1092 .llong .compat_sys_nfsservctl
1093 .llong .sys_setresgid 1093 .llong .sys_setresgid
1094 .llong .sys_getresgid /* 170 */ 1094 .llong .sys_getresgid /* 170 */
1095 .llong .sys32_prctl 1095 .llong .compat_sys_prctl
1096 .llong .ppc32_rt_sigreturn 1096 .llong .ppc32_rt_sigreturn
1097 .llong .sys32_rt_sigaction 1097 .llong .compat_sys_rt_sigaction
1098 .llong .sys32_rt_sigprocmask 1098 .llong .compat_sys_rt_sigprocmask
1099 .llong .sys32_rt_sigpending /* 175 */ 1099 .llong .compat_sys_rt_sigpending /* 175 */
1100 .llong .compat_sys_rt_sigtimedwait 1100 .llong .compat_sys_rt_sigtimedwait
1101 .llong .sys32_rt_sigqueueinfo 1101 .llong .compat_sys_rt_sigqueueinfo
1102 .llong .ppc32_rt_sigsuspend 1102 .llong .ppc32_rt_sigsuspend
1103 .llong .sys32_pread64 1103 .llong .compat_sys_pread64
1104 .llong .sys32_pwrite64 /* 180 */ 1104 .llong .compat_sys_pwrite64 /* 180 */
1105 .llong .sys_chown 1105 .llong .sys_chown
1106 .llong .sys_getcwd 1106 .llong .sys_getcwd
1107 .llong .sys_capget 1107 .llong .sys_capget
1108 .llong .sys_capset 1108 .llong .sys_capset
1109 .llong .sys32_sigaltstack /* 185 */ 1109 .llong .compat_sys_sigaltstack /* 185 */
1110 .llong .sys32_sendfile 1110 .llong .compat_sys_sendfile
1111 .llong .sys_ni_syscall /* reserved for streams1 */ 1111 .llong .sys_ni_syscall /* reserved for streams1 */
1112 .llong .sys_ni_syscall /* reserved for streams2 */ 1112 .llong .sys_ni_syscall /* reserved for streams2 */
1113 .llong .ppc_vfork 1113 .llong .ppc_vfork
1114 .llong .compat_sys_getrlimit /* 190 */ 1114 .llong .compat_sys_getrlimit /* 190 */
1115 .llong .sys32_readahead 1115 .llong .compat_sys_readahead
1116 .llong .sys32_mmap2 1116 .llong .compat_sys_mmap2
1117 .llong .sys32_truncate64 1117 .llong .compat_sys_truncate64
1118 .llong .sys32_ftruncate64 1118 .llong .compat_sys_ftruncate64
1119 .llong .sys_stat64 /* 195 */ 1119 .llong .sys_stat64 /* 195 */
1120 .llong .sys_lstat64 1120 .llong .sys_lstat64
1121 .llong .sys_fstat64 1121 .llong .sys_fstat64
1122 .llong .sys32_pciconfig_read 1122 .llong .compat_sys_pciconfig_read
1123 .llong .sys32_pciconfig_write 1123 .llong .compat_sys_pciconfig_write
1124 .llong .sys32_pciconfig_iobase /* 200 - pciconfig_iobase */ 1124 .llong .compat_sys_pciconfig_iobase /* 200 - pciconfig_iobase */
1125 .llong .sys_ni_syscall /* reserved for MacOnLinux */ 1125 .llong .sys_ni_syscall /* reserved for MacOnLinux */
1126 .llong .sys_getdents64 1126 .llong .sys_getdents64
1127 .llong .sys_pivot_root 1127 .llong .sys_pivot_root
@@ -1147,7 +1147,7 @@ _GLOBAL(sys_call_table32)
1147 .llong .compat_sys_sched_getaffinity 1147 .llong .compat_sys_sched_getaffinity
1148 .llong .sys_ni_syscall 1148 .llong .sys_ni_syscall
1149 .llong .sys_ni_syscall /* 225 - reserved for tux */ 1149 .llong .sys_ni_syscall /* 225 - reserved for tux */
1150 .llong .sys32_sendfile64 1150 .llong .compat_sys_sendfile64
1151 .llong .compat_sys_io_setup 1151 .llong .compat_sys_io_setup
1152 .llong .sys_io_destroy 1152 .llong .sys_io_destroy
1153 .llong .compat_sys_io_getevents 1153 .llong .compat_sys_io_getevents
@@ -1171,8 +1171,8 @@ _GLOBAL(sys_call_table32)
1171 .llong .compat_sys_clock_getres 1171 .llong .compat_sys_clock_getres
1172 .llong .compat_sys_clock_nanosleep 1172 .llong .compat_sys_clock_nanosleep
1173 .llong .ppc32_swapcontext 1173 .llong .ppc32_swapcontext
1174 .llong .sys32_tgkill /* 250 */ 1174 .llong .compat_sys_tgkill /* 250 */
1175 .llong .sys32_utimes 1175 .llong .compat_sys_utimes
1176 .llong .compat_sys_statfs64 1176 .llong .compat_sys_statfs64
1177 .llong .compat_sys_fstatfs64 1177 .llong .compat_sys_fstatfs64
1178 .llong .ppc_fadvise64_64 /* 32bit only fadvise64_64 */ 1178 .llong .ppc_fadvise64_64 /* 32bit only fadvise64_64 */
@@ -1190,12 +1190,12 @@ _GLOBAL(sys_call_table32)
1190 .llong .compat_sys_mq_notify 1190 .llong .compat_sys_mq_notify
1191 .llong .compat_sys_mq_getsetattr 1191 .llong .compat_sys_mq_getsetattr
1192 .llong .compat_sys_kexec_load 1192 .llong .compat_sys_kexec_load
1193 .llong .sys32_add_key 1193 .llong .compat_sys_add_key
1194 .llong .sys32_request_key /* 270 */ 1194 .llong .compat_sys_request_key /* 270 */
1195 .llong .compat_sys_keyctl 1195 .llong .compat_sys_keyctl
1196 .llong .compat_sys_waitid 1196 .llong .compat_sys_waitid
1197 .llong .sys32_ioprio_set 1197 .llong .compat_sys_ioprio_set
1198 .llong .sys32_ioprio_get 1198 .llong .compat_sys_ioprio_get
1199 .llong .sys_inotify_init /* 275 */ 1199 .llong .sys_inotify_init /* 275 */
1200 .llong .sys_inotify_add_watch 1200 .llong .sys_inotify_add_watch
1201 .llong .sys_inotify_rm_watch 1201 .llong .sys_inotify_rm_watch
diff --git a/arch/ppc64/kernel/ptrace32.c b/arch/ppc64/kernel/ptrace32.c
index fb8c22d6084a..2e1df3ddd9fb 100644
--- a/arch/ppc64/kernel/ptrace32.c
+++ b/arch/ppc64/kernel/ptrace32.c
@@ -40,7 +40,7 @@
40 * in exit.c or in signal.c. 40 * in exit.c or in signal.c.
41 */ 41 */
42 42
43int sys32_ptrace(long request, long pid, unsigned long addr, unsigned long data) 43int compat_sys_ptrace(long request, long pid, unsigned long addr, unsigned long data)
44{ 44{
45 struct task_struct *child; 45 struct task_struct *child;
46 int ret = -EPERM; 46 int ret = -EPERM;