Commit ade315d8 authored by Paul Mundt's avatar Paul Mundt

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: default avatarPaul Mundt <lethal@linux-sh.org>
parent 1e1030dc
...@@ -30,9 +30,6 @@ static inline void arch_kgdb_breakpoint(void) ...@@ -30,9 +30,6 @@ static inline void arch_kgdb_breakpoint(void)
__asm__ __volatile__ ("trapa #0x3c\n"); __asm__ __volatile__ ("trapa #0x3c\n");
} }
/* State info */
extern char in_nmi; /* Debounce flag to prevent NMI reentry*/
#define BUFMAX 2048 #define BUFMAX 2048
#define CACHE_FLUSH_IS_SAFE 1 #define CACHE_FLUSH_IS_SAFE 1
......
...@@ -53,10 +53,6 @@ ...@@ -53,10 +53,6 @@
* syscall # * syscall #
* *
*/ */
#if defined(CONFIG_KGDB)
NMI_VEC = 0x1c0 ! Must catch early for debounce
#endif
/* Offsets to the stack */ /* Offsets to the stack */
OFF_R0 = 0 /* Return value. New ABI also arg4 */ OFF_R0 = 0 /* Return value. New ABI also arg4 */
OFF_R1 = 4 /* New ABI: arg5 */ OFF_R1 = 4 /* New ABI: arg5 */
...@@ -71,7 +67,6 @@ OFF_PC = (16*4) ...@@ -71,7 +67,6 @@ OFF_PC = (16*4)
OFF_SR = (16*4+8) OFF_SR = (16*4+8)
OFF_TRA = (16*4+6*4) OFF_TRA = (16*4+6*4)
#define k0 r0 #define k0 r0
#define k1 r1 #define k1 r1
#define k2 r2 #define k2 r2
...@@ -281,21 +276,12 @@ restore_all: ...@@ -281,21 +276,12 @@ restore_all:
6: or k0, k2 ! Set the IMASK-bits 6: or k0, k2 ! Set the IMASK-bits
ldc k2, ssr ldc k2, ssr
! !
#if defined(CONFIG_KGDB)
! Clear in_nmi
mov.l 6f, k0
mov #0, k1
mov.b k1, @k0
#endif
mov k4, r15 mov k4, r15
rte rte
nop nop
.align 2 .align 2
5: .long 0x00001000 ! DSP 5: .long 0x00001000 ! DSP
#ifdef CONFIG_KGDB
6: .long in_nmi
#endif
7: .long 0x30000000 7: .long 0x30000000
! common exception handler ! common exception handler
...@@ -487,23 +473,6 @@ ENTRY(save_low_regs) ...@@ -487,23 +473,6 @@ ENTRY(save_low_regs)
! !
.balign 512,0,512 .balign 512,0,512
ENTRY(handle_interrupt) ENTRY(handle_interrupt)
#if defined(CONFIG_KGDB)
mov.l 2f, k2
! Debounce (filter nested NMI)
mov.l @k2, k0
mov.l 9f, k1
cmp/eq k1, k0
bf 11f
mov.l 10f, k1
tas.b @k1
bt 11f
rte
nop
.align 2
9: .long NMI_VEC
10: .long in_nmi
11:
#endif /* defined(CONFIG_KGDB) */
sts pr, k3 ! save original pr value in k3 sts pr, k3 ! save original pr value in k3
mova exception_data, k0 mova exception_data, k0
......
...@@ -15,8 +15,6 @@ ...@@ -15,8 +15,6 @@
#include <linux/io.h> #include <linux/io.h>
#include <asm/cacheflush.h> #include <asm/cacheflush.h>
char in_nmi = 0; /* Set during NMI to prevent re-entry */
/* Macros for single step instruction identification */ /* Macros for single step instruction identification */
#define OPCODE_BT(op) (((op) & 0xff00) == 0x8900) #define OPCODE_BT(op) (((op) & 0xff00) == 0x8900)
#define OPCODE_BF(op) (((op) & 0xff00) == 0x8b00) #define OPCODE_BF(op) (((op) & 0xff00) == 0x8b00)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment