Skip to content

Commit

Permalink
sh: Kill off kgdb's magical NMI debouncing.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Paul Mundt committed Sep 1, 2009
1 parent 1e1030d commit ade315d
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 36 deletions.
3 changes: 0 additions & 3 deletions arch/sh/include/asm/kgdb.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ static inline void arch_kgdb_breakpoint(void)
__asm__ __volatile__ ("trapa #0x3c\n");
}

/* State info */
extern char in_nmi; /* Debounce flag to prevent NMI reentry*/

#define BUFMAX 2048

#define CACHE_FLUSH_IS_SAFE 1
Expand Down
31 changes: 0 additions & 31 deletions arch/sh/kernel/cpu/sh3/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,6 @@
* syscall #
*
*/
#if defined(CONFIG_KGDB)
NMI_VEC = 0x1c0 ! Must catch early for debounce
#endif

/* Offsets to the stack */
OFF_R0 = 0 /* Return value. New ABI also arg4 */
OFF_R1 = 4 /* New ABI: arg5 */
Expand All @@ -71,7 +67,6 @@ OFF_PC = (16*4)
OFF_SR = (16*4+8)
OFF_TRA = (16*4+6*4)


#define k0 r0
#define k1 r1
#define k2 r2
Expand Down Expand Up @@ -281,21 +276,12 @@ restore_all:
6: or k0, k2 ! Set the IMASK-bits
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
rte
nop

.align 2
5: .long 0x00001000 ! DSP
#ifdef CONFIG_KGDB
6: .long in_nmi
#endif
7: .long 0x30000000

! common exception handler
Expand Down Expand Up @@ -487,23 +473,6 @@ ENTRY(save_low_regs)
!
.balign 512,0,512
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
mova exception_data, k0

Expand Down
2 changes: 0 additions & 2 deletions arch/sh/kernel/kgdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
#include <linux/io.h>
#include <asm/cacheflush.h>

char in_nmi = 0; /* Set during NMI to prevent re-entry */

/* Macros for single step instruction identification */
#define OPCODE_BT(op) (((op) & 0xff00) == 0x8900)
#define OPCODE_BF(op) (((op) & 0xff00) == 0x8b00)
Expand Down

0 comments on commit ade315d

Please sign in to comment.