]> err.no Git - linux-2.6/commit
[AVR32] Enable debugging only when needed
authorHaavard Skinnemoen <hskinnemoen@atmel.com>
Tue, 27 Nov 2007 12:50:45 +0000 (13:50 +0100)
committerHaavard Skinnemoen <hskinnemoen@atmel.com>
Fri, 25 Jan 2008 07:31:39 +0000 (08:31 +0100)
commit13b54a50525a9685065684e1e11258d27dd27bdf
tree5cc2dbceb4efff1810e5425617ce9bc850e1e8cb
parent6ea6dd93c9454cc9521134f907bc970d09f460e4
[AVR32] Enable debugging only when needed

Keep track of processes being debugged (including the kernel itself)
and turn the OCD system on and off as appropriate. Since enabling
debugging turns off some optimizations in the CPU core, this fixes the
issue that enabling KProbes support or simply running a program under
gdbserver will reduce system performance significantly until the next
reboot.

The CPU performance will still be reduced for all processes while a
process is being debugged, but this is a lot better than reducing the
performance forever.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
arch/avr32/kernel/Makefile
arch/avr32/kernel/kprobes.c
arch/avr32/kernel/ocd.c [new file with mode: 0644]
arch/avr32/kernel/process.c
arch/avr32/kernel/ptrace.c
include/asm-avr32/ocd.h
include/asm-avr32/ptrace.h
include/asm-avr32/thread_info.h