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/include | |
| 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/include')
| -rw-r--r-- | arch/tile/include/asm/thread_info.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/arch/tile/include/asm/thread_info.h b/arch/tile/include/asm/thread_info.h index 96c14c1430d8..6130a3db505b 100644 --- a/arch/tile/include/asm/thread_info.h +++ b/arch/tile/include/asm/thread_info.h | |||
| @@ -126,6 +126,7 @@ extern void _cpu_idle(void); | |||
| 126 | #define TIF_NOTIFY_RESUME 8 /* callback before returning to user */ | 126 | #define TIF_NOTIFY_RESUME 8 /* callback before returning to user */ |
| 127 | #define TIF_SYSCALL_TRACEPOINT 9 /* syscall tracepoint instrumentation */ | 127 | #define TIF_SYSCALL_TRACEPOINT 9 /* syscall tracepoint instrumentation */ |
| 128 | #define TIF_POLLING_NRFLAG 10 /* idle is polling for TIF_NEED_RESCHED */ | 128 | #define TIF_POLLING_NRFLAG 10 /* idle is polling for TIF_NEED_RESCHED */ |
| 129 | #define TIF_NOHZ 11 /* in adaptive nohz mode */ | ||
| 129 | 130 | ||
| 130 | #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) | 131 | #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) |
| 131 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) | 132 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) |
| @@ -138,14 +139,16 @@ extern void _cpu_idle(void); | |||
| 138 | #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) | 139 | #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) |
| 139 | #define _TIF_SYSCALL_TRACEPOINT (1<<TIF_SYSCALL_TRACEPOINT) | 140 | #define _TIF_SYSCALL_TRACEPOINT (1<<TIF_SYSCALL_TRACEPOINT) |
| 140 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) | 141 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) |
| 142 | #define _TIF_NOHZ (1<<TIF_NOHZ) | ||
| 141 | 143 | ||
| 142 | /* Work to do on any return to user space. */ | 144 | /* Work to do on any return to user space. */ |
| 143 | #define _TIF_ALLWORK_MASK \ | 145 | #define _TIF_ALLWORK_MASK \ |
| 144 | (_TIF_SIGPENDING|_TIF_NEED_RESCHED|_TIF_SINGLESTEP|\ | 146 | (_TIF_SIGPENDING | _TIF_NEED_RESCHED | _TIF_SINGLESTEP | \ |
| 145 | _TIF_ASYNC_TLB|_TIF_NOTIFY_RESUME) | 147 | _TIF_ASYNC_TLB | _TIF_NOTIFY_RESUME | _TIF_NOHZ) |
| 146 | 148 | ||
| 147 | /* Work to do at syscall entry. */ | 149 | /* Work to do at syscall entry. */ |
| 148 | #define _TIF_SYSCALL_ENTRY_WORK (_TIF_SYSCALL_TRACE | _TIF_SYSCALL_TRACEPOINT) | 150 | #define _TIF_SYSCALL_ENTRY_WORK \ |
| 151 | (_TIF_SYSCALL_TRACE | _TIF_SYSCALL_TRACEPOINT | _TIF_NOHZ) | ||
| 149 | 152 | ||
| 150 | /* Work to do at syscall exit. */ | 153 | /* Work to do at syscall exit. */ |
| 151 | #define _TIF_SYSCALL_EXIT_WORK (_TIF_SYSCALL_TRACE | _TIF_SYSCALL_TRACEPOINT) | 154 | #define _TIF_SYSCALL_EXIT_WORK (_TIF_SYSCALL_TRACE | _TIF_SYSCALL_TRACEPOINT) |
