summaryrefslogtreecommitdiffstats
path: root/arch/sparc/kernel/ptrace_64.c
diff options
context:
space:
mode:
authorKirill Tkhai <tkhai@yandex.ru>2013-09-14 14:02:11 +0200
committerDavid S. Miller <davem@davemloft.net>2013-11-14 23:57:21 +0100
commit812cb83a56a908729c453a7db3fb2c262119bc9d (patch)
tree3fdf3df047276db7de85558ff6caff006c3b1cc4 /arch/sparc/kernel/ptrace_64.c
parentsparc64: Add self-IPI support for smp_send_reschedule() (diff)
downloadlinux-812cb83a56a908729c453a7db3fb2c262119bc9d.tar.xz
linux-812cb83a56a908729c453a7db3fb2c262119bc9d.zip
sparc64: Implement HAVE_CONTEXT_TRACKING
Mark the places when the system are in user or are in kernel. This is used to make full dynticks system (tickless) -- CONFIG_NO_HZ_FULL dependence. Signed-off-by: Kirill Tkhai <tkhai@yandex.ru> CC: David Miller <davem@davemloft.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/kernel/ptrace_64.c')
-rw-r--r--arch/sparc/kernel/ptrace_64.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/sparc/kernel/ptrace_64.c b/arch/sparc/kernel/ptrace_64.c
index 773c1f2983ce..c13c9f25d83a 100644
--- a/arch/sparc/kernel/ptrace_64.c
+++ b/arch/sparc/kernel/ptrace_64.c
@@ -27,6 +27,7 @@
#include <trace/syscall.h>
#include <linux/compat.h>
#include <linux/elf.h>
+#include <linux/context_tracking.h>
#include <asm/asi.h>
#include <asm/pgtable.h>
@@ -1066,6 +1067,9 @@ asmlinkage int syscall_trace_enter(struct pt_regs *regs)
/* do the secure computing check first */
secure_computing_strict(regs->u_regs[UREG_G1]);
+ if (test_thread_flag(TIF_NOHZ))
+ user_exit();
+
if (test_thread_flag(TIF_SYSCALL_TRACE))
ret = tracehook_report_syscall_entry(regs);
@@ -1086,6 +1090,9 @@ asmlinkage int syscall_trace_enter(struct pt_regs *regs)
asmlinkage void syscall_trace_leave(struct pt_regs *regs)
{
+ if (test_thread_flag(TIF_NOHZ))
+ user_exit();
+
audit_syscall_exit(regs);
if (unlikely(test_thread_flag(TIF_SYSCALL_TRACEPOINT)))
@@ -1093,4 +1100,7 @@ asmlinkage void syscall_trace_leave(struct pt_regs *regs)
if (test_thread_flag(TIF_SYSCALL_TRACE))
tracehook_report_syscall_exit(regs, 0);
+
+ if (test_thread_flag(TIF_NOHZ))
+ user_enter();
}