diff options
author | Michal Simek <monstr@monstr.eu> | 2010-08-03 05:45:08 -0400 |
---|---|---|
committer | Michal Simek <monstr@monstr.eu> | 2010-08-04 04:45:17 -0400 |
commit | 2d5973cb5ac5d04662f86e19a06a4c52fa4c4ae3 (patch) | |
tree | 21ddc58eed5ccad856fc44dfb0ee794da41d5b16 /arch/microblaze/mm | |
parent | 751f1605e03533a6279ccf456e938e9595c7d888 (diff) |
microblaze: Add KGDB support
Kgdb uses brki r16, 0x18 instruction to call
low level _debug_exception function which save
current state to pt_regs and call microblaze_kgdb_break
function. _debug_exception should be called only from
the kernel space. User space calling is not supported
because user application debugging uses different handling.
pt_regs_to_gdb_regs loads additional special registers
which can't be changed
* Enable KGDB in Kconfig
* Remove ancient not-tested KGDB support
* Remove ancient _debug_exception code from entry.S
Only MMU KGDB support is supported.
Signed-off-by: Michal Simek <monstr@monstr.eu>
CC: Jason Wessel <jason.wessel@windriver.com>
CC: John Williams <john.williams@petalogix.com>
CC: Edgar E. Iglesias <edgar.iglesias@petalogix.com>
CC: linux-kernel@vger.kernel.org
Acked-by: Jason Wessel <jason.wessel@windriver.com>
Diffstat (limited to 'arch/microblaze/mm')
-rw-r--r-- | arch/microblaze/mm/fault.c | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/arch/microblaze/mm/fault.c b/arch/microblaze/mm/fault.c index b224c650a18d..57bd2a09610c 100644 --- a/arch/microblaze/mm/fault.c +++ b/arch/microblaze/mm/fault.c | |||
@@ -37,10 +37,6 @@ | |||
37 | #include <linux/uaccess.h> | 37 | #include <linux/uaccess.h> |
38 | #include <asm/exceptions.h> | 38 | #include <asm/exceptions.h> |
39 | 39 | ||
40 | #if defined(CONFIG_KGDB) | ||
41 | int debugger_kernel_faults = 1; | ||
42 | #endif | ||
43 | |||
44 | static unsigned long pte_misses; /* updated by do_page_fault() */ | 40 | static unsigned long pte_misses; /* updated by do_page_fault() */ |
45 | static unsigned long pte_errors; /* updated by do_page_fault() */ | 41 | static unsigned long pte_errors; /* updated by do_page_fault() */ |
46 | 42 | ||
@@ -81,10 +77,6 @@ void bad_page_fault(struct pt_regs *regs, unsigned long address, int sig) | |||
81 | } | 77 | } |
82 | 78 | ||
83 | /* kernel has accessed a bad area */ | 79 | /* kernel has accessed a bad area */ |
84 | #if defined(CONFIG_KGDB) | ||
85 | if (debugger_kernel_faults) | ||
86 | debugger(regs); | ||
87 | #endif | ||
88 | die("kernel access of bad area", regs, sig); | 80 | die("kernel access of bad area", regs, sig); |
89 | } | 81 | } |
90 | 82 | ||
@@ -115,13 +107,6 @@ void do_page_fault(struct pt_regs *regs, unsigned long address, | |||
115 | if ((error_code & 0x13) == 0x13 || (error_code & 0x11) == 0x11) | 107 | if ((error_code & 0x13) == 0x13 || (error_code & 0x11) == 0x11) |
116 | is_write = 0; | 108 | is_write = 0; |
117 | 109 | ||
118 | #if defined(CONFIG_KGDB) | ||
119 | if (debugger_fault_handler && regs->trap == 0x300) { | ||
120 | debugger_fault_handler(regs); | ||
121 | return; | ||
122 | } | ||
123 | #endif /* CONFIG_KGDB */ | ||
124 | |||
125 | if (unlikely(in_atomic() || !mm)) { | 110 | if (unlikely(in_atomic() || !mm)) { |
126 | if (kernel_mode(regs)) | 111 | if (kernel_mode(regs)) |
127 | goto bad_area_nosemaphore; | 112 | goto bad_area_nosemaphore; |