diff options
author | Chris Metcalf <cmetcalf@ezchip.com> | 2015-03-23 14:23:58 -0400 |
---|---|---|
committer | Chris Metcalf <cmetcalf@ezchip.com> | 2015-04-17 14:01:10 -0400 |
commit | 49e4e15619cd7cd9fc275d460fae2a95c1337fcc (patch) | |
tree | 700e24bb8f72a7662e7d4ae26d847e908d08de92 /arch/tile/mm | |
parent | b340c656af6317e28b466996a72cca019d97b42d (diff) |
tile: support CONTEXT_TRACKING and thus NOHZ_FULL
Add the TIF_NOHZ flag appropriately.
Add call to user_exit() on entry to do_work_pending() and on entry
to syscalls via do_syscall_trace_enter(), and also the top of
do_syscall_trace_exit() just because it's done in x86.
Add call to user_enter() at the bottom of do_work_pending() once we
have no more work to do before returning to userspace.
Wrap all the trap code in exception_enter() / exception_exit().
Signed-off-by: Chris Metcalf <cmetcalf@ezchip.com>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
Diffstat (limited to 'arch/tile/mm')
-rw-r--r-- | arch/tile/mm/fault.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/arch/tile/mm/fault.c b/arch/tile/mm/fault.c index 0f61a73534e6..e83cc999da02 100644 --- a/arch/tile/mm/fault.c +++ b/arch/tile/mm/fault.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <linux/syscalls.h> | 35 | #include <linux/syscalls.h> |
36 | #include <linux/uaccess.h> | 36 | #include <linux/uaccess.h> |
37 | #include <linux/kdebug.h> | 37 | #include <linux/kdebug.h> |
38 | #include <linux/context_tracking.h> | ||
38 | 39 | ||
39 | #include <asm/pgalloc.h> | 40 | #include <asm/pgalloc.h> |
40 | #include <asm/sections.h> | 41 | #include <asm/sections.h> |
@@ -702,6 +703,7 @@ void do_page_fault(struct pt_regs *regs, int fault_num, | |||
702 | unsigned long address, unsigned long write) | 703 | unsigned long address, unsigned long write) |
703 | { | 704 | { |
704 | int is_page_fault; | 705 | int is_page_fault; |
706 | enum ctx_state prev_state = exception_enter(); | ||
705 | 707 | ||
706 | #ifdef CONFIG_KPROBES | 708 | #ifdef CONFIG_KPROBES |
707 | /* | 709 | /* |
@@ -711,7 +713,7 @@ void do_page_fault(struct pt_regs *regs, int fault_num, | |||
711 | */ | 713 | */ |
712 | if (notify_die(DIE_PAGE_FAULT, "page fault", regs, -1, | 714 | if (notify_die(DIE_PAGE_FAULT, "page fault", regs, -1, |
713 | regs->faultnum, SIGSEGV) == NOTIFY_STOP) | 715 | regs->faultnum, SIGSEGV) == NOTIFY_STOP) |
714 | return; | 716 | goto done; |
715 | #endif | 717 | #endif |
716 | 718 | ||
717 | #ifdef __tilegx__ | 719 | #ifdef __tilegx__ |
@@ -750,7 +752,6 @@ void do_page_fault(struct pt_regs *regs, int fault_num, | |||
750 | current->comm, current->pid, pc, address); | 752 | current->comm, current->pid, pc, address); |
751 | show_regs(regs); | 753 | show_regs(regs); |
752 | do_group_exit(SIGKILL); | 754 | do_group_exit(SIGKILL); |
753 | return; | ||
754 | } | 755 | } |
755 | } | 756 | } |
756 | #else | 757 | #else |
@@ -834,12 +835,15 @@ void do_page_fault(struct pt_regs *regs, int fault_num, | |||
834 | async->is_fault = is_page_fault; | 835 | async->is_fault = is_page_fault; |
835 | async->is_write = write; | 836 | async->is_write = write; |
836 | async->address = address; | 837 | async->address = address; |
837 | return; | 838 | goto done; |
838 | } | 839 | } |
839 | } | 840 | } |
840 | #endif | 841 | #endif |
841 | 842 | ||
842 | handle_page_fault(regs, fault_num, is_page_fault, address, write); | 843 | handle_page_fault(regs, fault_num, is_page_fault, address, write); |
844 | |||
845 | done: | ||
846 | exception_exit(prev_state); | ||
843 | } | 847 | } |
844 | 848 | ||
845 | 849 | ||