aboutsummaryrefslogtreecommitdiffstats
path: root/arch/frv/kernel/debug-stub.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2006-07-10 07:44:55 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-07-10 16:24:22 -0400
commit84e8cd6dbc00b4979e8d1c15c80d91987aeb3417 (patch)
tree5df8103b5e6d414bc39e165655ae8bd5341abd76 /arch/frv/kernel/debug-stub.c
parent6d8c4e3b0150ff537902477ed62f8a8e9e70007b (diff)
[PATCH] FRV: Introduce asm-offsets for FRV arch
Introduce the use of asm-offsets into the FRV architecture. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/frv/kernel/debug-stub.c')
-rw-r--r--arch/frv/kernel/debug-stub.c13
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
42static void __init debug_stub_init(void); 42struct frv_debug_status __debug_status;
43 43
44extern asmlinkage void __break_hijack_kernel_event(void); 44static void __init debug_stub_init(void);
45extern 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();