diff options
| author | Wim Van Sebroeck <wim@iguana.be> | 2007-05-11 19:03:13 +0000 | 
|---|---|---|
| committer | Wim Van Sebroeck <wim@iguana.be> | 2007-05-11 19:03:13 +0000 | 
| commit | 5c34202b8bf942da411b6599668a76b07449bbfd (patch) | |
| tree | 5719c361321eaddc8e4f1b0c8a7994f0e9a6fdd3 /arch/sh/kernel/signal.c | |
| parent | 0d4804b31f91cfbcff6d62af0bc09a893a1c8ae0 (diff) | |
| parent | 1f8a6b658a943b4f04a1fc7b3a420360202c86cd (diff) | |
Merge /pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'arch/sh/kernel/signal.c')
| -rw-r--r-- | arch/sh/kernel/signal.c | 14 | 
1 files changed, 8 insertions, 6 deletions
diff --git a/arch/sh/kernel/signal.c b/arch/sh/kernel/signal.c index 9f39ef1f73d..b32c35a7c0a 100644 --- a/arch/sh/kernel/signal.c +++ b/arch/sh/kernel/signal.c @@ -11,7 +11,6 @@  #include <linux/sched.h>  #include <linux/mm.h>  #include <linux/smp.h> -#include <linux/smp_lock.h>  #include <linux/kernel.h>  #include <linux/signal.h>  #include <linux/errno.h> @@ -24,7 +23,7 @@  #include <linux/personality.h>  #include <linux/binfmts.h>  #include <linux/freezer.h> - +#include <asm/system.h>  #include <asm/ucontext.h>  #include <asm/uaccess.h>  #include <asm/pgtable.h> @@ -501,7 +500,9 @@ handle_signal(unsigned long sig, struct k_sigaction *ka, siginfo_t *info,  				}  			/* fallthrough */  			case -ERESTARTNOINTR: -				regs->pc -= 2; +				regs->pc -= instruction_size( +						ctrl_inw(regs->pc - 4)); +				break;  		}  	} else {  		/* gUSA handling */ @@ -517,7 +518,8 @@ handle_signal(unsigned long sig, struct k_sigaction *ka, siginfo_t *info,  			regs->regs[15] = regs->regs[1];  			if (regs->pc < regs->regs[0])  				/* Go to rewind point #1 */ -				regs->pc = regs->regs[0] + offset - 2; +				regs->pc = regs->regs[0] + offset - +					instruction_size(ctrl_inw(regs->pc-4));  		}  #ifdef CONFIG_PREEMPT  		local_irq_restore(flags); @@ -601,9 +603,9 @@ static void do_signal(struct pt_regs *regs, unsigned int save_r0)  		    regs->regs[0] == -ERESTARTSYS ||  		    regs->regs[0] == -ERESTARTNOINTR) {  			regs->regs[0] = save_r0; -			regs->pc -= 2; +			regs->pc -= instruction_size(ctrl_inw(regs->pc - 4));  		} else if (regs->regs[0] == -ERESTART_RESTARTBLOCK) { -			regs->pc -= 2; +			regs->pc -= instruction_size(ctrl_inw(regs->pc - 4));  			regs->regs[3] = __NR_restart_syscall;  		}  	}  | 
