linux_dsm_epyc7002/arch/avr32/kernel
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
..
asm-offsets.c [AVR32] Follow the rules when dealing with the OCD system 2007-12-07 14:54:46 +01:00
avr32_ksyms.c [AVR32] Export clear_page symbol 2007-01-26 13:12:25 +01:00
cpu.c [AVR32] Clean up cpu identification and add features bitmap 2007-04-27 13:44:13 +02:00
entry-avr32b.S [AVR32] Follow the rules when dealing with the OCD system 2007-12-07 14:54:46 +01:00
head.S AVR32: Get rid of board_early_init 2006-11-06 10:43:23 +01:00
init_task.c [PATCH] avr32 architecture 2006-09-26 08:48:54 -07:00
irq.c [AVR32] Remove bogus comment in arch/avr32/kernel/irq.c 2007-05-13 16:05:59 +02:00
kprobes.c [AVR32] Clean up OCD register usage 2007-12-07 14:54:40 +01:00
Makefile [AVR32] Implement stacktrace support 2007-12-07 14:52:36 +01:00
module.c [AVR32] Clean up exception handling code 2007-04-27 13:44:13 +02:00
process.c [AVR32] Clean up OCD register usage 2007-12-07 14:54:40 +01:00
ptrace.c [AVR32] Follow the rules when dealing with the OCD system 2007-12-07 14:54:46 +01:00
semaphore.c [PATCH] avr32 architecture 2006-09-26 08:48:54 -07:00
setup.c [AVR32] fix command line parsing in early_parse_fbmem 2007-10-11 12:16:56 +02:00
signal.c [PATCH] Add include/linux/freezer.h and move definitions from sched.h 2006-12-07 08:39:27 -08:00
stacktrace.c [AVR32] Implement stacktrace support 2007-12-07 14:52:36 +01:00
switch_to.S [PATCH] avr32 architecture 2006-09-26 08:48:54 -07:00
sys_avr32.c [PATCH] AVR32: Implement kernel_execve 2006-10-02 07:57:24 -07:00
syscall_table.S [AVR32] Wire up signalfd, timerfd and eventfd 2007-05-13 17:07:57 +02:00
syscall-stubs.S AVR32: Wire up sys_epoll_pwait 2006-11-06 14:07:15 +01:00
time.c [AVR32] Change system timer from count-compare to Timer/Counter 0 2007-04-27 13:44:12 +02:00
traps.c [AVR32] Clean up OCD register usage 2007-12-07 14:54:40 +01:00
vmlinux.lds.S [AVR32] Follow the rules when dealing with the OCD system 2007-12-07 14:54:46 +01:00