aboutsummaryrefslogtreecommitdiffstats
path: root/arch/parisc
diff options
context:
space:
mode:
Diffstat (limited to 'arch/parisc')
-rw-r--r--arch/parisc/Kconfig1
-rw-r--r--arch/parisc/hpux/fs.c21
-rw-r--r--arch/parisc/hpux/gate.S2
-rw-r--r--arch/parisc/include/asm/Kbuild2
-rw-r--r--arch/parisc/include/asm/compat.h59
-rw-r--r--arch/parisc/include/asm/exec.h6
-rw-r--r--arch/parisc/include/asm/thread_info.h5
-rw-r--r--arch/parisc/include/uapi/asm/Kbuild3
-rw-r--r--arch/parisc/kernel/cache.c3
-rw-r--r--arch/parisc/kernel/pdc_cons.c1
-rw-r--r--arch/parisc/kernel/process.c7
-rw-r--r--arch/parisc/kernel/signal.c45
-rw-r--r--arch/parisc/kernel/signal32.h52
-rw-r--r--arch/parisc/kernel/sys_parisc32.c4
-rw-r--r--arch/parisc/kernel/syscall.S9
15 files changed, 108 insertions, 112 deletions
diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig
index 166d9911bc83..11def45b98c5 100644
--- a/arch/parisc/Kconfig
+++ b/arch/parisc/Kconfig
@@ -13,6 +13,7 @@ config PARISC
13 select HAVE_PERF_EVENTS 13 select HAVE_PERF_EVENTS
14 select GENERIC_ATOMIC64 if !64BIT 14 select GENERIC_ATOMIC64 if !64BIT
15 select HAVE_GENERIC_HARDIRQS 15 select HAVE_GENERIC_HARDIRQS
16 select BROKEN_RODATA
16 select GENERIC_IRQ_PROBE 17 select GENERIC_IRQ_PROBE
17 select GENERIC_PCI_IOMAP 18 select GENERIC_PCI_IOMAP
18 select IRQ_PER_CPU 19 select IRQ_PER_CPU
diff --git a/arch/parisc/hpux/fs.c b/arch/parisc/hpux/fs.c
index c71eb6c79897..a0760b87fd4e 100644
--- a/arch/parisc/hpux/fs.c
+++ b/arch/parisc/hpux/fs.c
@@ -34,14 +34,14 @@
34int hpux_execve(struct pt_regs *regs) 34int hpux_execve(struct pt_regs *regs)
35{ 35{
36 int error; 36 int error;
37 char *filename; 37 struct filename *filename;
38 38
39 filename = getname((const char __user *) regs->gr[26]); 39 filename = getname((const char __user *) regs->gr[26]);
40 error = PTR_ERR(filename); 40 error = PTR_ERR(filename);
41 if (IS_ERR(filename)) 41 if (IS_ERR(filename))
42 goto out; 42 goto out;
43 43
44 error = do_execve(filename, 44 error = do_execve(filename->name,
45 (const char __user *const __user *) regs->gr[25], 45 (const char __user *const __user *) regs->gr[25],
46 (const char __user *const __user *) regs->gr[24], 46 (const char __user *const __user *) regs->gr[24],
47 regs); 47 regs);
@@ -109,33 +109,32 @@ Efault:
109 109
110int hpux_getdents(unsigned int fd, struct hpux_dirent __user *dirent, unsigned int count) 110int hpux_getdents(unsigned int fd, struct hpux_dirent __user *dirent, unsigned int count)
111{ 111{
112 struct file * file; 112 struct fd arg;
113 struct hpux_dirent __user * lastdirent; 113 struct hpux_dirent __user * lastdirent;
114 struct getdents_callback buf; 114 struct getdents_callback buf;
115 int error = -EBADF; 115 int error;
116 116
117 file = fget(fd); 117 arg = fdget(fd);
118 if (!file) 118 if (!arg.file)
119 goto out; 119 return -EBADF;
120 120
121 buf.current_dir = dirent; 121 buf.current_dir = dirent;
122 buf.previous = NULL; 122 buf.previous = NULL;
123 buf.count = count; 123 buf.count = count;
124 buf.error = 0; 124 buf.error = 0;
125 125
126 error = vfs_readdir(file, filldir, &buf); 126 error = vfs_readdir(arg.file, filldir, &buf);
127 if (error >= 0) 127 if (error >= 0)
128 error = buf.error; 128 error = buf.error;
129 lastdirent = buf.previous; 129 lastdirent = buf.previous;
130 if (lastdirent) { 130 if (lastdirent) {
131 if (put_user(file->f_pos, &lastdirent->d_off)) 131 if (put_user(arg.file->f_pos, &lastdirent->d_off))
132 error = -EFAULT; 132 error = -EFAULT;
133 else 133 else
134 error = count - buf.count; 134 error = count - buf.count;
135 } 135 }
136 136
137 fput(file); 137 fdput(arg);
138out:
139 return error; 138 return error;
140} 139}
141 140
diff --git a/arch/parisc/hpux/gate.S b/arch/parisc/hpux/gate.S
index 38a1c1b8d4e8..011468857e98 100644
--- a/arch/parisc/hpux/gate.S
+++ b/arch/parisc/hpux/gate.S
@@ -71,7 +71,7 @@ ENTRY(hpux_gateway_page)
71 STREG %r26, TASK_PT_GR26(%r1) /* 1st argument */ 71 STREG %r26, TASK_PT_GR26(%r1) /* 1st argument */
72 STREG %r27, TASK_PT_GR27(%r1) /* user dp */ 72 STREG %r27, TASK_PT_GR27(%r1) /* user dp */
73 STREG %r28, TASK_PT_GR28(%r1) /* return value 0 */ 73 STREG %r28, TASK_PT_GR28(%r1) /* return value 0 */
74 STREG %r28, TASK_PT_ORIG_R28(%r1) /* return value 0 (saved for signals) */ 74 STREG %r0, TASK_PT_ORIG_R28(%r1) /* don't prohibit restarts */
75 STREG %r29, TASK_PT_GR29(%r1) /* 8th argument */ 75 STREG %r29, TASK_PT_GR29(%r1) /* 8th argument */
76 STREG %r31, TASK_PT_GR31(%r1) /* preserve syscall return ptr */ 76 STREG %r31, TASK_PT_GR31(%r1) /* preserve syscall return ptr */
77 77
diff --git a/arch/parisc/include/asm/Kbuild b/arch/parisc/include/asm/Kbuild
index 4383707d9801..458371a1565a 100644
--- a/arch/parisc/include/asm/Kbuild
+++ b/arch/parisc/include/asm/Kbuild
@@ -1,4 +1,6 @@
1include include/asm-generic/Kbuild.asm 1include include/asm-generic/Kbuild.asm
2 2
3header-y += pdc.h 3header-y += pdc.h
4generic-y += clkdev.h
4generic-y += word-at-a-time.h 5generic-y += word-at-a-time.h
6generic-y += exec.h
diff --git a/arch/parisc/include/asm/compat.h b/arch/parisc/include/asm/compat.h
index 760f331d4fa3..db7a662691a8 100644
--- a/arch/parisc/include/asm/compat.h
+++ b/arch/parisc/include/asm/compat.h
@@ -36,6 +36,7 @@ typedef s64 compat_s64;
36typedef u32 compat_uint_t; 36typedef u32 compat_uint_t;
37typedef u32 compat_ulong_t; 37typedef u32 compat_ulong_t;
38typedef u64 compat_u64; 38typedef u64 compat_u64;
39typedef u32 compat_uptr_t;
39 40
40struct compat_timespec { 41struct compat_timespec {
41 compat_time_t tv_sec; 42 compat_time_t tv_sec;
@@ -127,6 +128,63 @@ typedef u32 compat_old_sigset_t; /* at least 32 bits */
127 128
128typedef u32 compat_sigset_word; 129typedef u32 compat_sigset_word;
129 130
131typedef union compat_sigval {
132 compat_int_t sival_int;
133 compat_uptr_t sival_ptr;
134} compat_sigval_t;
135
136typedef struct compat_siginfo {
137 int si_signo;
138 int si_errno;
139 int si_code;
140
141 union {
142 int _pad[128/sizeof(int) - 3];
143
144 /* kill() */
145 struct {
146 unsigned int _pid; /* sender's pid */
147 unsigned int _uid; /* sender's uid */
148 } _kill;
149
150 /* POSIX.1b timers */
151 struct {
152 compat_timer_t _tid; /* timer id */
153 int _overrun; /* overrun count */
154 char _pad[sizeof(unsigned int) - sizeof(int)];
155 compat_sigval_t _sigval; /* same as below */
156 int _sys_private; /* not to be passed to user */
157 } _timer;
158
159 /* POSIX.1b signals */
160 struct {
161 unsigned int _pid; /* sender's pid */
162 unsigned int _uid; /* sender's uid */
163 compat_sigval_t _sigval;
164 } _rt;
165
166 /* SIGCHLD */
167 struct {
168 unsigned int _pid; /* which child */
169 unsigned int _uid; /* sender's uid */
170 int _status; /* exit code */
171 compat_clock_t _utime;
172 compat_clock_t _stime;
173 } _sigchld;
174
175 /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */
176 struct {
177 unsigned int _addr; /* faulting insn/memory ref. */
178 } _sigfault;
179
180 /* SIGPOLL */
181 struct {
182 int _band; /* POLL_IN, POLL_OUT, POLL_MSG */
183 int _fd;
184 } _sigpoll;
185 } _sifields;
186} compat_siginfo_t;
187
130#define COMPAT_OFF_T_MAX 0x7fffffff 188#define COMPAT_OFF_T_MAX 0x7fffffff
131#define COMPAT_LOFF_T_MAX 0x7fffffffffffffffL 189#define COMPAT_LOFF_T_MAX 0x7fffffffffffffffL
132 190
@@ -136,7 +194,6 @@ typedef u32 compat_sigset_word;
136 * as pointers because the syscall entry code will have 194 * as pointers because the syscall entry code will have
137 * appropriately converted them already. 195 * appropriately converted them already.
138 */ 196 */
139typedef u32 compat_uptr_t;
140 197
141static inline void __user *compat_ptr(compat_uptr_t uptr) 198static inline void __user *compat_ptr(compat_uptr_t uptr)
142{ 199{
diff --git a/arch/parisc/include/asm/exec.h b/arch/parisc/include/asm/exec.h
deleted file mode 100644
index 6bb5af75b17a..000000000000
--- a/arch/parisc/include/asm/exec.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __PARISC_EXEC_H
2#define __PARISC_EXEC_H
3
4#define arch_align_stack(x) (x)
5
6#endif /* __PARISC_EXEC_H */
diff --git a/arch/parisc/include/asm/thread_info.h b/arch/parisc/include/asm/thread_info.h
index 22b4726dee49..d1fb79a36f3d 100644
--- a/arch/parisc/include/asm/thread_info.h
+++ b/arch/parisc/include/asm/thread_info.h
@@ -68,13 +68,16 @@ struct thread_info {
68#define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) 68#define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED)
69#define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG) 69#define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG)
70#define _TIF_32BIT (1 << TIF_32BIT) 70#define _TIF_32BIT (1 << TIF_32BIT)
71#define _TIF_RESTORE_SIGMASK (1 << TIF_RESTORE_SIGMASK)
72#define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) 71#define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME)
73#define _TIF_SINGLESTEP (1 << TIF_SINGLESTEP) 72#define _TIF_SINGLESTEP (1 << TIF_SINGLESTEP)
74#define _TIF_BLOCKSTEP (1 << TIF_BLOCKSTEP) 73#define _TIF_BLOCKSTEP (1 << TIF_BLOCKSTEP)
75 74
76#define _TIF_USER_WORK_MASK (_TIF_SIGPENDING | _TIF_NOTIFY_RESUME | \ 75#define _TIF_USER_WORK_MASK (_TIF_SIGPENDING | _TIF_NOTIFY_RESUME | \
77 _TIF_NEED_RESCHED) 76 _TIF_NEED_RESCHED)
77#define _TIF_SYSCALL_TRACE_MASK (_TIF_SYSCALL_TRACE | _TIF_SINGLESTEP | \
78 _TIF_BLOCKSTEP)
79
80#define tsk_is_polling(t) test_tsk_thread_flag(t, TIF_POLLING_NRFLAG)
78 81
79#endif /* __KERNEL__ */ 82#endif /* __KERNEL__ */
80 83
diff --git a/arch/parisc/include/uapi/asm/Kbuild b/arch/parisc/include/uapi/asm/Kbuild
new file mode 100644
index 000000000000..baebb3da1d44
--- /dev/null
+++ b/arch/parisc/include/uapi/asm/Kbuild
@@ -0,0 +1,3 @@
1# UAPI Header export list
2include include/uapi/asm-generic/Kbuild.asm
3
diff --git a/arch/parisc/kernel/cache.c b/arch/parisc/kernel/cache.c
index 9d181890a7e3..48e16dc20102 100644
--- a/arch/parisc/kernel/cache.c
+++ b/arch/parisc/kernel/cache.c
@@ -276,7 +276,6 @@ void flush_dcache_page(struct page *page)
276{ 276{
277 struct address_space *mapping = page_mapping(page); 277 struct address_space *mapping = page_mapping(page);
278 struct vm_area_struct *mpnt; 278 struct vm_area_struct *mpnt;
279 struct prio_tree_iter iter;
280 unsigned long offset; 279 unsigned long offset;
281 unsigned long addr, old_addr = 0; 280 unsigned long addr, old_addr = 0;
282 pgoff_t pgoff; 281 pgoff_t pgoff;
@@ -299,7 +298,7 @@ void flush_dcache_page(struct page *page)
299 * to flush one address here for them all to become coherent */ 298 * to flush one address here for them all to become coherent */
300 299
301 flush_dcache_mmap_lock(mapping); 300 flush_dcache_mmap_lock(mapping);
302 vma_prio_tree_foreach(mpnt, &iter, &mapping->i_mmap, pgoff, pgoff) { 301 vma_interval_tree_foreach(mpnt, &mapping->i_mmap, pgoff, pgoff) {
303 offset = (pgoff - mpnt->vm_pgoff) << PAGE_SHIFT; 302 offset = (pgoff - mpnt->vm_pgoff) << PAGE_SHIFT;
304 addr = mpnt->vm_start + offset; 303 addr = mpnt->vm_start + offset;
305 304
diff --git a/arch/parisc/kernel/pdc_cons.c b/arch/parisc/kernel/pdc_cons.c
index 47341aa208f2..88238638aee6 100644
--- a/arch/parisc/kernel/pdc_cons.c
+++ b/arch/parisc/kernel/pdc_cons.c
@@ -202,6 +202,7 @@ static int __init pdc_console_tty_driver_init(void)
202 pdc_console_tty_driver->flags = TTY_DRIVER_REAL_RAW | 202 pdc_console_tty_driver->flags = TTY_DRIVER_REAL_RAW |
203 TTY_DRIVER_RESET_TERMIOS; 203 TTY_DRIVER_RESET_TERMIOS;
204 tty_set_operations(pdc_console_tty_driver, &pdc_console_tty_ops); 204 tty_set_operations(pdc_console_tty_driver, &pdc_console_tty_ops);
205 tty_port_link_device(&tty_port, pdc_console_tty_driver, 0);
205 206
206 err = tty_register_driver(pdc_console_tty_driver); 207 err = tty_register_driver(pdc_console_tty_driver);
207 if (err) { 208 if (err) {
diff --git a/arch/parisc/kernel/process.c b/arch/parisc/kernel/process.c
index 2c05a9292a81..cbc37216bf90 100644
--- a/arch/parisc/kernel/process.c
+++ b/arch/parisc/kernel/process.c
@@ -48,6 +48,7 @@
48#include <linux/unistd.h> 48#include <linux/unistd.h>
49#include <linux/kallsyms.h> 49#include <linux/kallsyms.h>
50#include <linux/uaccess.h> 50#include <linux/uaccess.h>
51#include <linux/rcupdate.h>
51 52
52#include <asm/io.h> 53#include <asm/io.h>
53#include <asm/asm-offsets.h> 54#include <asm/asm-offsets.h>
@@ -69,8 +70,10 @@ void cpu_idle(void)
69 70
70 /* endless idle loop with no priority at all */ 71 /* endless idle loop with no priority at all */
71 while (1) { 72 while (1) {
73 rcu_idle_enter();
72 while (!need_resched()) 74 while (!need_resched())
73 barrier(); 75 barrier();
76 rcu_idle_exit();
74 schedule_preempt_disabled(); 77 schedule_preempt_disabled();
75 check_pgt_cache(); 78 check_pgt_cache();
76 } 79 }
@@ -339,13 +342,13 @@ unsigned long thread_saved_pc(struct task_struct *t)
339asmlinkage int sys_execve(struct pt_regs *regs) 342asmlinkage int sys_execve(struct pt_regs *regs)
340{ 343{
341 int error; 344 int error;
342 char *filename; 345 struct filename *filename;
343 346
344 filename = getname((const char __user *) regs->gr[26]); 347 filename = getname((const char __user *) regs->gr[26]);
345 error = PTR_ERR(filename); 348 error = PTR_ERR(filename);
346 if (IS_ERR(filename)) 349 if (IS_ERR(filename))
347 goto out; 350 goto out;
348 error = do_execve(filename, 351 error = do_execve(filename->name,
349 (const char __user *const __user *) regs->gr[25], 352 (const char __user *const __user *) regs->gr[25],
350 (const char __user *const __user *) regs->gr[24], 353 (const char __user *const __user *) regs->gr[24],
351 regs); 354 regs);
diff --git a/arch/parisc/kernel/signal.c b/arch/parisc/kernel/signal.c
index 594459bde14e..537996955998 100644
--- a/arch/parisc/kernel/signal.c
+++ b/arch/parisc/kernel/signal.c
@@ -113,6 +113,8 @@ sys_rt_sigreturn(struct pt_regs *regs, int in_syscall)
113 (usp - sigframe_size); 113 (usp - sigframe_size);
114 DBG(2,"sys_rt_sigreturn: frame is %p\n", frame); 114 DBG(2,"sys_rt_sigreturn: frame is %p\n", frame);
115 115
116 regs->orig_r28 = 1; /* no restarts for sigreturn */
117
116#ifdef CONFIG_64BIT 118#ifdef CONFIG_64BIT
117 compat_frame = (struct compat_rt_sigframe __user *)frame; 119 compat_frame = (struct compat_rt_sigframe __user *)frame;
118 120
@@ -437,7 +439,7 @@ give_sigsegv:
437 * OK, we're invoking a handler. 439 * OK, we're invoking a handler.
438 */ 440 */
439 441
440static long 442static void
441handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka, 443handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka,
442 struct pt_regs *regs, int in_syscall) 444 struct pt_regs *regs, int in_syscall)
443{ 445{
@@ -447,7 +449,7 @@ handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka,
447 449
448 /* Set up the stack frame */ 450 /* Set up the stack frame */
449 if (!setup_rt_frame(sig, ka, info, oldset, regs, in_syscall)) 451 if (!setup_rt_frame(sig, ka, info, oldset, regs, in_syscall))
450 return 0; 452 return;
451 453
452 signal_delivered(sig, info, ka, regs, 454 signal_delivered(sig, info, ka, regs,
453 test_thread_flag(TIF_SINGLESTEP) || 455 test_thread_flag(TIF_SINGLESTEP) ||
@@ -455,13 +457,14 @@ handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka,
455 457
456 DBG(1,KERN_DEBUG "do_signal: Exit (success), regs->gr[28] = %ld\n", 458 DBG(1,KERN_DEBUG "do_signal: Exit (success), regs->gr[28] = %ld\n",
457 regs->gr[28]); 459 regs->gr[28]);
458
459 return 1;
460} 460}
461 461
462static inline void 462static inline void
463syscall_restart(struct pt_regs *regs, struct k_sigaction *ka) 463syscall_restart(struct pt_regs *regs, struct k_sigaction *ka)
464{ 464{
465 if (regs->orig_r28)
466 return;
467 regs->orig_r28 = 1; /* no more restarts */
465 /* Check the return code */ 468 /* Check the return code */
466 switch (regs->gr[28]) { 469 switch (regs->gr[28]) {
467 case -ERESTART_RESTARTBLOCK: 470 case -ERESTART_RESTARTBLOCK:
@@ -482,8 +485,6 @@ syscall_restart(struct pt_regs *regs, struct k_sigaction *ka)
482 * we have to do is fiddle the return pointer. 485 * we have to do is fiddle the return pointer.
483 */ 486 */
484 regs->gr[31] -= 8; /* delayed branching */ 487 regs->gr[31] -= 8; /* delayed branching */
485 /* Preserve original r28. */
486 regs->gr[28] = regs->orig_r28;
487 break; 488 break;
488 } 489 }
489} 490}
@@ -491,6 +492,9 @@ syscall_restart(struct pt_regs *regs, struct k_sigaction *ka)
491static inline void 492static inline void
492insert_restart_trampoline(struct pt_regs *regs) 493insert_restart_trampoline(struct pt_regs *regs)
493{ 494{
495 if (regs->orig_r28)
496 return;
497 regs->orig_r28 = 1; /* no more restarts */
494 switch(regs->gr[28]) { 498 switch(regs->gr[28]) {
495 case -ERESTART_RESTARTBLOCK: { 499 case -ERESTART_RESTARTBLOCK: {
496 /* Restart the system call - no handlers present */ 500 /* Restart the system call - no handlers present */
@@ -525,9 +529,6 @@ insert_restart_trampoline(struct pt_regs *regs)
525 flush_user_icache_range(regs->gr[30], regs->gr[30] + 4); 529 flush_user_icache_range(regs->gr[30], regs->gr[30] + 4);
526 530
527 regs->gr[31] = regs->gr[30] + 8; 531 regs->gr[31] = regs->gr[30] + 8;
528 /* Preserve original r28. */
529 regs->gr[28] = regs->orig_r28;
530
531 return; 532 return;
532 } 533 }
533 case -ERESTARTNOHAND: 534 case -ERESTARTNOHAND:
@@ -539,9 +540,6 @@ insert_restart_trampoline(struct pt_regs *regs)
539 * slot of the branch external instruction. 540 * slot of the branch external instruction.
540 */ 541 */
541 regs->gr[31] -= 8; 542 regs->gr[31] -= 8;
542 /* Preserve original r28. */
543 regs->gr[28] = regs->orig_r28;
544
545 return; 543 return;
546 } 544 }
547 default: 545 default:
@@ -570,30 +568,17 @@ do_signal(struct pt_regs *regs, long in_syscall)
570 DBG(1,"\ndo_signal: regs=0x%p, sr7 %#lx, in_syscall=%d\n", 568 DBG(1,"\ndo_signal: regs=0x%p, sr7 %#lx, in_syscall=%d\n",
571 regs, regs->sr[7], in_syscall); 569 regs, regs->sr[7], in_syscall);
572 570
573 /* Everyone else checks to see if they are in kernel mode at 571 signr = get_signal_to_deliver(&info, &ka, regs, NULL);
574 this point and exits if that's the case. I'm not sure why 572 DBG(3,"do_signal: signr = %d, regs->gr[28] = %ld\n", signr, regs->gr[28]);
575 we would be called in that case, but for some reason we
576 are. */
577
578 /* May need to force signal if handle_signal failed to deliver */
579 while (1) {
580 signr = get_signal_to_deliver(&info, &ka, regs, NULL);
581 DBG(3,"do_signal: signr = %d, regs->gr[28] = %ld\n", signr, regs->gr[28]);
582 573
583 if (signr <= 0) 574 if (signr > 0) {
584 break;
585
586 /* Restart a system call if necessary. */ 575 /* Restart a system call if necessary. */
587 if (in_syscall) 576 if (in_syscall)
588 syscall_restart(regs, &ka); 577 syscall_restart(regs, &ka);
589 578
590 /* Whee! Actually deliver the signal. If the 579 handle_signal(signr, &info, &ka, regs, in_syscall);
591 delivery failed, we need to continue to iterate in 580 return;
592 this loop so we can deliver the SIGSEGV... */
593 if (handle_signal(signr, &info, &ka, regs, in_syscall))
594 return;
595 } 581 }
596 /* end of while(1) looping forever if we can't force a signal */
597 582
598 /* Did we come from a system call? */ 583 /* Did we come from a system call? */
599 if (in_syscall) 584 if (in_syscall)
diff --git a/arch/parisc/kernel/signal32.h b/arch/parisc/kernel/signal32.h
index c7800846422c..08a88b5349a2 100644
--- a/arch/parisc/kernel/signal32.h
+++ b/arch/parisc/kernel/signal32.h
@@ -55,58 +55,6 @@ struct k_sigaction32 {
55 struct compat_sigaction sa; 55 struct compat_sigaction sa;
56}; 56};
57 57
58typedef struct compat_siginfo {
59 int si_signo;
60 int si_errno;
61 int si_code;
62
63 union {
64 int _pad[((128/sizeof(int)) - 3)];
65
66 /* kill() */
67 struct {
68 unsigned int _pid; /* sender's pid */
69 unsigned int _uid; /* sender's uid */
70 } _kill;
71
72 /* POSIX.1b timers */
73 struct {
74 compat_timer_t _tid; /* timer id */
75 int _overrun; /* overrun count */
76 char _pad[sizeof(unsigned int) - sizeof(int)];
77 compat_sigval_t _sigval; /* same as below */
78 int _sys_private; /* not to be passed to user */
79 } _timer;
80
81 /* POSIX.1b signals */
82 struct {
83 unsigned int _pid; /* sender's pid */
84 unsigned int _uid; /* sender's uid */
85 compat_sigval_t _sigval;
86 } _rt;
87
88 /* SIGCHLD */
89 struct {
90 unsigned int _pid; /* which child */
91 unsigned int _uid; /* sender's uid */
92 int _status; /* exit code */
93 compat_clock_t _utime;
94 compat_clock_t _stime;
95 } _sigchld;
96
97 /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */
98 struct {
99 unsigned int _addr; /* faulting insn/memory ref. */
100 } _sigfault;
101
102 /* SIGPOLL */
103 struct {
104 int _band; /* POLL_IN, POLL_OUT, POLL_MSG */
105 int _fd;
106 } _sigpoll;
107 } _sifields;
108} compat_siginfo_t;
109
110int copy_siginfo_to_user32 (compat_siginfo_t __user *to, siginfo_t *from); 58int copy_siginfo_to_user32 (compat_siginfo_t __user *to, siginfo_t *from);
111int copy_siginfo_from_user32 (siginfo_t *to, compat_siginfo_t __user *from); 59int copy_siginfo_from_user32 (siginfo_t *to, compat_siginfo_t __user *from);
112 60
diff --git a/arch/parisc/kernel/sys_parisc32.c b/arch/parisc/kernel/sys_parisc32.c
index dc9a62462323..bf5b93a885d3 100644
--- a/arch/parisc/kernel/sys_parisc32.c
+++ b/arch/parisc/kernel/sys_parisc32.c
@@ -60,14 +60,14 @@
60asmlinkage int sys32_execve(struct pt_regs *regs) 60asmlinkage int sys32_execve(struct pt_regs *regs)
61{ 61{
62 int error; 62 int error;
63 char *filename; 63 struct filename *filename;
64 64
65 DBG(("sys32_execve(%p) r26 = 0x%lx\n", regs, regs->gr[26])); 65 DBG(("sys32_execve(%p) r26 = 0x%lx\n", regs, regs->gr[26]));
66 filename = getname((const char __user *) regs->gr[26]); 66 filename = getname((const char __user *) regs->gr[26]);
67 error = PTR_ERR(filename); 67 error = PTR_ERR(filename);
68 if (IS_ERR(filename)) 68 if (IS_ERR(filename))
69 goto out; 69 goto out;
70 error = compat_do_execve(filename, compat_ptr(regs->gr[25]), 70 error = compat_do_execve(filename->name, compat_ptr(regs->gr[25]),
71 compat_ptr(regs->gr[24]), regs); 71 compat_ptr(regs->gr[24]), regs);
72 putname(filename); 72 putname(filename);
73out: 73out:
diff --git a/arch/parisc/kernel/syscall.S b/arch/parisc/kernel/syscall.S
index 82a52b2fb13f..86742df0b194 100644
--- a/arch/parisc/kernel/syscall.S
+++ b/arch/parisc/kernel/syscall.S
@@ -156,7 +156,7 @@ linux_gateway_entry:
156 STREG %r26, TASK_PT_GR26(%r1) /* 1st argument */ 156 STREG %r26, TASK_PT_GR26(%r1) /* 1st argument */
157 STREG %r27, TASK_PT_GR27(%r1) /* user dp */ 157 STREG %r27, TASK_PT_GR27(%r1) /* user dp */
158 STREG %r28, TASK_PT_GR28(%r1) /* return value 0 */ 158 STREG %r28, TASK_PT_GR28(%r1) /* return value 0 */
159 STREG %r28, TASK_PT_ORIG_R28(%r1) /* return value 0 (saved for signals) */ 159 STREG %r0, TASK_PT_ORIG_R28(%r1) /* don't prohibit restarts */
160 STREG %r29, TASK_PT_GR29(%r1) /* return value 1 */ 160 STREG %r29, TASK_PT_GR29(%r1) /* return value 1 */
161 STREG %r31, TASK_PT_GR31(%r1) /* preserve syscall return ptr */ 161 STREG %r31, TASK_PT_GR31(%r1) /* preserve syscall return ptr */
162 162
@@ -180,9 +180,10 @@ linux_gateway_entry:
180 180
181 /* Are we being ptraced? */ 181 /* Are we being ptraced? */
182 mfctl %cr30, %r1 182 mfctl %cr30, %r1
183 LDREG TI_TASK(%r1),%r1 183 LDREG TI_FLAGS(%r1),%r1
184 ldw TASK_PTRACE(%r1), %r1 184 ldi _TIF_SYSCALL_TRACE_MASK, %r19
185 bb,<,n %r1,31,.Ltracesys 185 and,COND(=) %r1, %r19, %r0
186 b,n .Ltracesys
186 187
187 /* Note! We cannot use the syscall table that is mapped 188 /* Note! We cannot use the syscall table that is mapped
188 nearby since the gateway page is mapped execute-only. */ 189 nearby since the gateway page is mapped execute-only. */