diff options
Diffstat (limited to 'arch/frv/kernel/debug-stub.c')
-rw-r--r-- | arch/frv/kernel/debug-stub.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/arch/frv/kernel/debug-stub.c b/arch/frv/kernel/debug-stub.c index 4761cc4b4a90..2f6c60c921e0 100644 --- a/arch/frv/kernel/debug-stub.c +++ b/arch/frv/kernel/debug-stub.c | |||
@@ -39,10 +39,9 @@ do { \ | |||
39 | gdbstub_do_rx(); \ | 39 | gdbstub_do_rx(); \ |
40 | } while(!FLOWCTL_QUERY(LINE)) | 40 | } while(!FLOWCTL_QUERY(LINE)) |
41 | 41 | ||
42 | static void __init debug_stub_init(void); | 42 | struct frv_debug_status __debug_status; |
43 | 43 | ||
44 | extern asmlinkage void __break_hijack_kernel_event(void); | 44 | static void __init debug_stub_init(void); |
45 | extern asmlinkage void __break_hijack_kernel_event_breaks_here(void); | ||
46 | 45 | ||
47 | /*****************************************************************************/ | 46 | /*****************************************************************************/ |
48 | /* | 47 | /* |
@@ -67,7 +66,7 @@ asmlinkage void debug_stub(void) | |||
67 | __set_HSR(0, hsr0 & ~HSR0_ETMD); | 66 | __set_HSR(0, hsr0 & ~HSR0_ETMD); |
68 | 67 | ||
69 | /* disable single stepping */ | 68 | /* disable single stepping */ |
70 | __debug_regs->dcr &= ~DCR_SE; | 69 | __debug_status.dcr &= ~DCR_SE; |
71 | 70 | ||
72 | /* kernel mode can propose an exception be handled in debug mode by jumping to a special | 71 | /* kernel mode can propose an exception be handled in debug mode by jumping to a special |
73 | * location */ | 72 | * location */ |
@@ -76,8 +75,8 @@ asmlinkage void debug_stub(void) | |||
76 | * the top kernel context */ | 75 | * the top kernel context */ |
77 | *__debug_frame = *__frame; | 76 | *__debug_frame = *__frame; |
78 | __frame = __debug_frame->next_frame; | 77 | __frame = __debug_frame->next_frame; |
79 | __debug_regs->brr = (__debug_frame->tbr & TBR_TT) << 12; | 78 | __debug_status.brr = (__debug_frame->tbr & TBR_TT) << 12; |
80 | __debug_regs->brr |= BRR_EB; | 79 | __debug_status.brr |= BRR_EB; |
81 | } | 80 | } |
82 | 81 | ||
83 | if (__debug_frame->pc == (unsigned long) __debug_bug_trap + 4) { | 82 | if (__debug_frame->pc == (unsigned long) __debug_bug_trap + 4) { |
@@ -124,7 +123,7 @@ static void __init debug_stub_init(void) | |||
124 | __debug_frame->pc = (unsigned long) start_kernel; | 123 | __debug_frame->pc = (unsigned long) start_kernel; |
125 | 124 | ||
126 | /* enable the debug events we want to trap */ | 125 | /* enable the debug events we want to trap */ |
127 | __debug_regs->dcr = DCR_EBE; | 126 | __debug_status.dcr = DCR_EBE; |
128 | 127 | ||
129 | #ifdef CONFIG_GDBSTUB | 128 | #ifdef CONFIG_GDBSTUB |
130 | gdbstub_init(); | 129 | gdbstub_init(); |