linux/arch/avr32
Haavard Skinnemoen 2507bc1338 [AVR32] Follow the rules when dealing with the OCD system
The current debug trap handling code does a number of things that are
illegal according to the AVR32 Architecture manual. Most importantly,
it may try to schedule from Debug Mode, thus clearing the D bit, which
can lead to "undefined behaviour".

It seems like this works in most cases, but several people have
observed somewhat unstable behaviour when debugging programs,
including soft lockups. So there's definitely something which is not
right with the existing code.

The new code will never schedule from Debug mode, it will always exit
Debug mode with a "retd" instruction, and if something not running in
Debug mode needs to do something debug-related (like doing a single
step), it will enter debug mode through a "breakpoint" instruction.
The monitor code will then return directly to user space, bypassing
its own saved registers if necessary (since we don't actually care
about the trapped context, only the one that came before.)

This adds three instructions to the common exception handling code,
including one branch. It does not touch super-hot paths like the TLB
miss handler.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-12-07 14:54:46 +01:00
..
boards [AVR32] Wire up AT73C213 sound driver on ATSTK1000 board 2007-10-23 11:19:14 +02:00
boot [PATCH] AVR32: Minor Makefile cleanup 2006-10-25 20:26:32 -07:00
configs leds: leds-gpio for ngw100 2007-07-16 01:15:51 +01:00
kernel [AVR32] Follow the rules when dealing with the OCD system 2007-12-07 14:54:46 +01:00
lib [AVR32] Remove last remains of libgcc 2007-02-09 15:01:59 +01:00
mach-at32ap [AVR32] Export intc_get_pending symbol 2007-11-15 13:47:20 +01:00
mm pid namespaces: define is_global_init() and is_container_init() 2007-10-19 11:53:37 -07:00
Kconfig [AVR32] Implement irqflags trace and lockdep support 2007-12-07 14:52:37 +01:00
Kconfig.debug [PATCH] avr32 architecture 2006-09-26 08:48:54 -07:00
Makefile kbuild: enable 'make AFLAGS=...' to add additional options to AS 2007-10-15 21:59:31 +02:00