aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68k/kernel/ptrace.c
diff options
context:
space:
mode:
authorRoman Zippel <zippel@linux-m68k.org>2005-11-13 19:06:59 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-13 21:14:14 -0500
commit3b66a1edb01b82269a668a478625765b1fa4936f (patch)
tree417ead0264e34fdd1ec345a26d8670427be4829c /arch/m68k/kernel/ptrace.c
parentabd03753bd1532c05eb13231569a5257b007e29c (diff)
[PATCH] m68k: convert thread flags to use bit fields
Remove task_work structure, use the standard thread flags functions and use shifts in entry.S to test the thread flags. Add a few local labels to entry.S to allow gas to generate short jumps. Finally it changes a number of inline functions in thread_info.h to macros to delay the current_thread_info() usage, which requires on m68k a structure (task_struct) not yet defined at this point. Signed-off-by: Roman Zippel <zippel@linux-m68k.org> Cc: Al Viro <viro@parcelfarce.linux.theplanet.co.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/m68k/kernel/ptrace.c')
-rw-r--r--arch/m68k/kernel/ptrace.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/arch/m68k/kernel/ptrace.c b/arch/m68k/kernel/ptrace.c
index 7e54422685cf..540638ca81f9 100644
--- a/arch/m68k/kernel/ptrace.c
+++ b/arch/m68k/kernel/ptrace.c
@@ -109,7 +109,7 @@ static inline void singlestep_disable(struct task_struct *child)
109{ 109{
110 unsigned long tmp = get_reg(child, PT_SR) & ~(TRACE_BITS << 16); 110 unsigned long tmp = get_reg(child, PT_SR) & ~(TRACE_BITS << 16);
111 put_reg(child, PT_SR, tmp); 111 put_reg(child, PT_SR, tmp);
112 child->thread.work.delayed_trace = 0; 112 clear_tsk_thread_flag(child, TIF_DELAYED_TRACE);
113} 113}
114 114
115/* 115/*
@@ -118,7 +118,7 @@ static inline void singlestep_disable(struct task_struct *child)
118void ptrace_disable(struct task_struct *child) 118void ptrace_disable(struct task_struct *child)
119{ 119{
120 singlestep_disable(child); 120 singlestep_disable(child);
121 child->thread.work.syscall_trace = 0; 121 clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
122} 122}
123 123
124long arch_ptrace(struct task_struct *child, long request, long addr, long data) 124long arch_ptrace(struct task_struct *child, long request, long addr, long data)
@@ -198,9 +198,9 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
198 goto out_eio; 198 goto out_eio;
199 199
200 if (request == PTRACE_SYSCALL) 200 if (request == PTRACE_SYSCALL)
201 child->thread.work.syscall_trace = ~0; 201 set_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
202 else 202 else
203 child->thread.work.syscall_trace = 0; 203 clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
204 child->exit_code = data; 204 child->exit_code = data;
205 singlestep_disable(child); 205 singlestep_disable(child);
206 wake_up_process(child); 206 wake_up_process(child);
@@ -223,10 +223,10 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
223 if (!valid_signal(data)) 223 if (!valid_signal(data))
224 goto out_eio; 224 goto out_eio;
225 225
226 child->thread.work.syscall_trace = 0; 226 clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
227 tmp = get_reg(child, PT_SR) | (TRACE_BITS << 16); 227 tmp = get_reg(child, PT_SR) | (TRACE_BITS << 16);
228 put_reg(child, PT_SR, tmp); 228 put_reg(child, PT_SR, tmp);
229 child->thread.work.delayed_trace = 1; 229 set_tsk_thread_flag(child, TIF_DELAYED_TRACE);
230 230
231 child->exit_code = data; 231 child->exit_code = data;
232 /* give it a chance to run. */ 232 /* give it a chance to run. */
@@ -288,9 +288,6 @@ out_eio:
288 288
289asmlinkage void syscall_trace(void) 289asmlinkage void syscall_trace(void)
290{ 290{
291 if (!current->thread.work.delayed_trace &&
292 !current->thread.work.syscall_trace)
293 return;
294 ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) 291 ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD)
295 ? 0x80 : 0)); 292 ? 0x80 : 0));
296 /* 293 /*