diff options
author | Chris Metcalf <cmetcalf@ezchip.com> | 2015-12-23 23:13:04 +0100 |
---|---|---|
committer | Chris Metcalf <cmetcalf@ezchip.com> | 2016-01-18 20:49:30 +0100 |
commit | 1bb50cad45f4a3fb9a339006d76efc50f70eed5b (patch) | |
tree | 91e00be5d5852acdb7c5c9ba9707b9f7926e6bc6 /arch/tile/kernel/traps.c | |
parent | tile: fix bug in setting PT_FLAGS_DISABLE_IRQ on kernel entry (diff) | |
download | linux-1bb50cad45f4a3fb9a339006d76efc50f70eed5b.tar.xz linux-1bb50cad45f4a3fb9a339006d76efc50f70eed5b.zip |
arch/tile: move user_exit() to early kernel entry sequence
This ensures that we always notify context tracking that we
have exited from user space no matter how we enter the kernel.
It is similar to how arm64 handles context tracking, for example.
This allows the removal of all the exception_enter() calls that
were added in commit 49e4e15619cd ("tile: support CONTEXT_TRACKING and
thus NOHZ_FULL").
Signed-off-by: Chris Metcalf <cmetcalf@ezchip.com>
Diffstat (limited to 'arch/tile/kernel/traps.c')
-rw-r--r-- | arch/tile/kernel/traps.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/arch/tile/kernel/traps.c b/arch/tile/kernel/traps.c index 0011a9ff0525..4d9651c5b1ad 100644 --- a/arch/tile/kernel/traps.c +++ b/arch/tile/kernel/traps.c @@ -20,7 +20,6 @@ #include <linux/reboot.h> #include <linux/uaccess.h> #include <linux/ptrace.h> -#include <linux/context_tracking.h> #include <asm/stack.h> #include <asm/traps.h> #include <asm/setup.h> @@ -254,7 +253,6 @@ static int do_bpt(struct pt_regs *regs) void __kprobes do_trap(struct pt_regs *regs, int fault_num, unsigned long reason) { - enum ctx_state prev_state = exception_enter(); siginfo_t info = { 0 }; int signo, code; unsigned long address = 0; @@ -263,7 +261,7 @@ void __kprobes do_trap(struct pt_regs *regs, int fault_num, /* Handle breakpoints, etc. */ if (is_kernel && fault_num == INT_ILL && do_bpt(regs)) - goto done; + return; /* Re-enable interrupts, if they were previously enabled. */ if (!(regs->flags & PT_FLAGS_DISABLE_IRQ)) @@ -277,7 +275,7 @@ void __kprobes do_trap(struct pt_regs *regs, int fault_num, const char *name; char buf[100]; if (fixup_exception(regs)) /* ILL_TRANS or UNALIGN_DATA */ - goto done; + return; if (fault_num >= 0 && fault_num < ARRAY_SIZE(int_name) && int_name[fault_num] != NULL) @@ -319,7 +317,7 @@ void __kprobes do_trap(struct pt_regs *regs, int fault_num, case INT_GPV: #if CHIP_HAS_TILE_DMA() if (retry_gpv(reason)) - goto done; + return; #endif /*FALLTHROUGH*/ case INT_UDN_ACCESS: @@ -346,7 +344,7 @@ void __kprobes do_trap(struct pt_regs *regs, int fault_num, if (!state || (void __user *)(regs->pc) != state->buffer) { single_step_once(regs); - goto done; + return; } } #endif @@ -390,9 +388,6 @@ void __kprobes do_trap(struct pt_regs *regs, int fault_num, if (signo != SIGTRAP) trace_unhandled_signal("trap", regs, address, signo); force_sig_info(signo, &info, current); - -done: - exception_exit(prev_state); } void do_nmi(struct pt_regs *regs, int fault_num, unsigned long reason) |