diff options
author | Haavard Skinnemoen <hskinnemoen@atmel.com> | 2007-03-01 04:37:35 -0500 |
---|---|---|
committer | Haavard Skinnemoen <hskinnemoen@atmel.com> | 2007-03-07 04:50:28 -0500 |
commit | a19b4a14053f24e2df93b6bcc72ed1086cce0de4 (patch) | |
tree | 2cfb0c1f10c87e713750e42e1390eb6fa2372f94 | |
parent | bfa4f55cc8d17e3944a4b5d08e2cce7d5a55a2d6 (diff) |
[AVR32] Fix bogus ti->flags manipulation in debug handler
We should OR in a bitmask, not a bit offset, into ti->flags. This
might fix some strange behaviour when single stepping.
Also, use set_ti_thread_flag() to manipulate the flags to avoid
surprises in the future.
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
-rw-r--r-- | arch/avr32/kernel/ptrace.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/avr32/kernel/ptrace.c b/arch/avr32/kernel/ptrace.c index f2e81cd79002..6f4388f7c20b 100644 --- a/arch/avr32/kernel/ptrace.c +++ b/arch/avr32/kernel/ptrace.c | |||
@@ -313,7 +313,7 @@ asmlinkage void do_debug_priv(struct pt_regs *regs) | |||
313 | __mtdr(DBGREG_DC, dc); | 313 | __mtdr(DBGREG_DC, dc); |
314 | 314 | ||
315 | ti = current_thread_info(); | 315 | ti = current_thread_info(); |
316 | ti->flags |= _TIF_BREAKPOINT; | 316 | set_ti_thread_flag(ti, TIF_BREAKPOINT); |
317 | 317 | ||
318 | /* The TLB miss handlers don't check thread flags */ | 318 | /* The TLB miss handlers don't check thread flags */ |
319 | if ((regs->pc >= (unsigned long)&itlb_miss) | 319 | if ((regs->pc >= (unsigned long)&itlb_miss) |
@@ -328,7 +328,7 @@ asmlinkage void do_debug_priv(struct pt_regs *regs) | |||
328 | * single step. | 328 | * single step. |
329 | */ | 329 | */ |
330 | if ((regs->sr & MODE_MASK) != MODE_SUPERVISOR) | 330 | if ((regs->sr & MODE_MASK) != MODE_SUPERVISOR) |
331 | ti->flags |= TIF_SINGLE_STEP; | 331 | set_ti_thread_flag(ti, TIF_SINGLE_STEP); |
332 | } else { | 332 | } else { |
333 | panic("Unable to handle debug trap at pc = %08lx\n", | 333 | panic("Unable to handle debug trap at pc = %08lx\n", |
334 | regs->pc); | 334 | regs->pc); |