diff options
author | H. Peter Anvin <hpa@linux.intel.com> | 2009-01-30 23:50:57 +0100 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2009-01-30 23:50:57 +0100 |
commit | 9b7ed8faa034fc2d350e2eff5c68680eb5c43a07 (patch) | |
tree | 5c94c34ad30e312604c1ce4f08ab6631b64a94f5 /arch/sh/kernel/traps_32.c | |
parent | x86: add pte_set_flags/clear_flags for pte flag manipulation (diff) | |
parent | Merge branch 'linus' into core/percpu (diff) | |
download | linux-9b7ed8faa034fc2d350e2eff5c68680eb5c43a07.tar.xz linux-9b7ed8faa034fc2d350e2eff5c68680eb5c43a07.zip |
Merge branch 'core/percpu' into x86/paravirt
Diffstat (limited to 'arch/sh/kernel/traps_32.c')
-rw-r--r-- | arch/sh/kernel/traps_32.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/arch/sh/kernel/traps_32.c b/arch/sh/kernel/traps_32.c index c0aa3d83ec0e..60dcf87ed019 100644 --- a/arch/sh/kernel/traps_32.c +++ b/arch/sh/kernel/traps_32.c @@ -125,20 +125,18 @@ static inline void die_if_kernel(const char *str, struct pt_regs *regs, * - userspace errors just cause EFAULT to be returned, resulting in SEGV * - kernel/userspace interfaces cause a jump to an appropriate handler * - other kernel errors are bad - * - return 0 if fixed-up, -EFAULT if non-fatal (to the kernel) fault */ -static int die_if_no_fixup(const char * str, struct pt_regs * regs, long err) +static void die_if_no_fixup(const char * str, struct pt_regs * regs, long err) { if (!user_mode(regs)) { const struct exception_table_entry *fixup; fixup = search_exception_tables(regs->pc); if (fixup) { regs->pc = fixup->fixup; - return 0; + return; } die(str, regs, err); } - return -EFAULT; } static inline void sign_extend(unsigned int count, unsigned char *dst) @@ -314,7 +312,8 @@ static int handle_unaligned_ins(opcode_t instruction, struct pt_regs *regs, /* Argh. Address not only misaligned but also non-existent. * Raise an EFAULT and see if it's trapped */ - return die_if_no_fixup("Fault in unaligned fixup", regs, 0); + die_if_no_fixup("Fault in unaligned fixup", regs, 0); + return -EFAULT; } /* |