aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2009-09-01 04:45:35 -0400
committerPaul Mundt <lethal@linux-sh.org>2009-09-01 04:45:35 -0400
commitade315d83c1d53b3c6b820134cb16601351810fe (patch)
tree19d528431ba57ba3f4d7593f3849007ef64d0163 /arch/sh
parent1e1030dccb1084c8a38976d3656aab1d50d762da (diff)
sh: Kill off kgdb's magical NMI debouncing.
The kgdb stub has traditionally tied in to the NMI slot, and manually handled debounce. Now that we have a generic way to do this instead, all of the stub-specific debounce silliness can be killed off. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh')
-rw-r--r--arch/sh/include/asm/kgdb.h3
-rw-r--r--arch/sh/kernel/cpu/sh3/entry.S31
-rw-r--r--arch/sh/kernel/kgdb.c2
3 files changed, 0 insertions, 36 deletions
diff --git a/arch/sh/include/asm/kgdb.h b/arch/sh/include/asm/kgdb.h
index 72704ed725e5..4235e228d921 100644
--- a/arch/sh/include/asm/kgdb.h
+++ b/arch/sh/include/asm/kgdb.h
@@ -30,9 +30,6 @@ static inline void arch_kgdb_breakpoint(void)
30 __asm__ __volatile__ ("trapa #0x3c\n"); 30 __asm__ __volatile__ ("trapa #0x3c\n");
31} 31}
32 32
33/* State info */
34extern char in_nmi; /* Debounce flag to prevent NMI reentry*/
35
36#define BUFMAX 2048 33#define BUFMAX 2048
37 34
38#define CACHE_FLUSH_IS_SAFE 1 35#define CACHE_FLUSH_IS_SAFE 1
diff --git a/arch/sh/kernel/cpu/sh3/entry.S b/arch/sh/kernel/cpu/sh3/entry.S
index d1142d365925..0151933e5253 100644
--- a/arch/sh/kernel/cpu/sh3/entry.S
+++ b/arch/sh/kernel/cpu/sh3/entry.S
@@ -53,10 +53,6 @@
53 * syscall # 53 * syscall #
54 * 54 *
55 */ 55 */
56#if defined(CONFIG_KGDB)
57NMI_VEC = 0x1c0 ! Must catch early for debounce
58#endif
59
60/* Offsets to the stack */ 56/* Offsets to the stack */
61OFF_R0 = 0 /* Return value. New ABI also arg4 */ 57OFF_R0 = 0 /* Return value. New ABI also arg4 */
62OFF_R1 = 4 /* New ABI: arg5 */ 58OFF_R1 = 4 /* New ABI: arg5 */
@@ -71,7 +67,6 @@ OFF_PC = (16*4)
71OFF_SR = (16*4+8) 67OFF_SR = (16*4+8)
72OFF_TRA = (16*4+6*4) 68OFF_TRA = (16*4+6*4)
73 69
74
75#define k0 r0 70#define k0 r0
76#define k1 r1 71#define k1 r1
77#define k2 r2 72#define k2 r2
@@ -281,21 +276,12 @@ restore_all:
2816: or k0, k2 ! Set the IMASK-bits 2766: or k0, k2 ! Set the IMASK-bits
282 ldc k2, ssr 277 ldc k2, ssr
283 ! 278 !
284#if defined(CONFIG_KGDB)
285 ! Clear in_nmi
286 mov.l 6f, k0
287 mov #0, k1
288 mov.b k1, @k0
289#endif
290 mov k4, r15 279 mov k4, r15
291 rte 280 rte
292 nop 281 nop
293 282
294 .align 2 283 .align 2
2955: .long 0x00001000 ! DSP 2845: .long 0x00001000 ! DSP
296#ifdef CONFIG_KGDB
2976: .long in_nmi
298#endif
2997: .long 0x30000000 2857: .long 0x30000000
300 286
301! common exception handler 287! common exception handler
@@ -487,23 +473,6 @@ ENTRY(save_low_regs)
487! 473!
488 .balign 512,0,512 474 .balign 512,0,512
489ENTRY(handle_interrupt) 475ENTRY(handle_interrupt)
490#if defined(CONFIG_KGDB)
491 mov.l 2f, k2
492 ! Debounce (filter nested NMI)
493 mov.l @k2, k0
494 mov.l 9f, k1
495 cmp/eq k1, k0
496 bf 11f
497 mov.l 10f, k1
498 tas.b @k1
499 bt 11f
500 rte
501 nop
502 .align 2
5039: .long NMI_VEC
50410: .long in_nmi
50511:
506#endif /* defined(CONFIG_KGDB) */
507 sts pr, k3 ! save original pr value in k3 476 sts pr, k3 ! save original pr value in k3
508 mova exception_data, k0 477 mova exception_data, k0
509 478
diff --git a/arch/sh/kernel/kgdb.c b/arch/sh/kernel/kgdb.c
index d29de7864f32..3e532d0d4a5c 100644
--- a/arch/sh/kernel/kgdb.c
+++ b/arch/sh/kernel/kgdb.c
@@ -15,8 +15,6 @@
15#include <linux/io.h> 15#include <linux/io.h>
16#include <asm/cacheflush.h> 16#include <asm/cacheflush.h>
17 17
18char in_nmi = 0; /* Set during NMI to prevent re-entry */
19
20/* Macros for single step instruction identification */ 18/* Macros for single step instruction identification */
21#define OPCODE_BT(op) (((op) & 0xff00) == 0x8900) 19#define OPCODE_BT(op) (((op) & 0xff00) == 0x8900)
22#define OPCODE_BF(op) (((op) & 0xff00) == 0x8b00) 20#define OPCODE_BF(op) (((op) & 0xff00) == 0x8b00)