diff options
author | David Howells <dhowells@redhat.com> | 2011-03-18 12:54:30 -0400 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2011-03-18 12:54:30 -0400 |
commit | 67ddb4052daac9d449caf2643ac365d42a04219a (patch) | |
tree | 7c610973a19b7e70b47294c540b182f203680fde /arch/mn10300/include/asm | |
parent | 7f386ac3272e057fbf51e5b5712fad1a80e77125 (diff) |
MN10300: Create generic kernel debugger hooks
Create generic kernel debugger hooks in the MN10300 arch and make gdbstub use
them. This is a preparation for KGDB support.
Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'arch/mn10300/include/asm')
-rw-r--r-- | arch/mn10300/include/asm/debugger.h | 15 | ||||
-rw-r--r-- | arch/mn10300/include/asm/fpu.h | 2 | ||||
-rw-r--r-- | arch/mn10300/include/asm/irqflags.h | 2 | ||||
-rw-r--r-- | arch/mn10300/include/asm/smp.h | 3 |
4 files changed, 18 insertions, 4 deletions
diff --git a/arch/mn10300/include/asm/debugger.h b/arch/mn10300/include/asm/debugger.h index 4517f839a999..e1d3b083696c 100644 --- a/arch/mn10300/include/asm/debugger.h +++ b/arch/mn10300/include/asm/debugger.h | |||
@@ -14,6 +14,9 @@ | |||
14 | 14 | ||
15 | #if defined(CONFIG_KERNEL_DEBUGGER) | 15 | #if defined(CONFIG_KERNEL_DEBUGGER) |
16 | 16 | ||
17 | extern int debugger_intercept(enum exception_code, int, int, struct pt_regs *); | ||
18 | extern int at_debugger_breakpoint(struct pt_regs *); | ||
19 | |||
17 | #ifndef CONFIG_MN10300_DEBUGGER_CACHE_NO_FLUSH | 20 | #ifndef CONFIG_MN10300_DEBUGGER_CACHE_NO_FLUSH |
18 | extern void debugger_local_cache_flushinv(void); | 21 | extern void debugger_local_cache_flushinv(void); |
19 | extern void debugger_local_cache_flushinv_one(u8 *); | 22 | extern void debugger_local_cache_flushinv_one(u8 *); |
@@ -24,5 +27,17 @@ static inline void debugger_local_cache_flushinv_one(u8 *addr) {} | |||
24 | 27 | ||
25 | #else /* CONFIG_KERNEL_DEBUGGER */ | 28 | #else /* CONFIG_KERNEL_DEBUGGER */ |
26 | 29 | ||
30 | static inline int debugger_intercept(enum exception_code excep, | ||
31 | int signo, int si_code, | ||
32 | struct pt_regs *regs) | ||
33 | { | ||
34 | return 0; | ||
35 | } | ||
36 | |||
37 | static inline int at_debugger_breakpoint(struct pt_regs *regs) | ||
38 | { | ||
39 | return 0; | ||
40 | } | ||
41 | |||
27 | #endif /* CONFIG_KERNEL_DEBUGGER */ | 42 | #endif /* CONFIG_KERNEL_DEBUGGER */ |
28 | #endif /* _ASM_DEBUGGER_H */ | 43 | #endif /* _ASM_DEBUGGER_H */ |
diff --git a/arch/mn10300/include/asm/fpu.h b/arch/mn10300/include/asm/fpu.h index b7625de8eade..738ff72659d5 100644 --- a/arch/mn10300/include/asm/fpu.h +++ b/arch/mn10300/include/asm/fpu.h | |||
@@ -55,7 +55,6 @@ static inline void clear_using_fpu(struct task_struct *tsk) | |||
55 | 55 | ||
56 | extern asmlinkage void fpu_kill_state(struct task_struct *); | 56 | extern asmlinkage void fpu_kill_state(struct task_struct *); |
57 | extern asmlinkage void fpu_exception(struct pt_regs *, enum exception_code); | 57 | extern asmlinkage void fpu_exception(struct pt_regs *, enum exception_code); |
58 | extern asmlinkage void fpu_invalid_op(struct pt_regs *, enum exception_code); | ||
59 | extern asmlinkage void fpu_init_state(void); | 58 | extern asmlinkage void fpu_init_state(void); |
60 | extern asmlinkage void fpu_save(struct fpu_state_struct *); | 59 | extern asmlinkage void fpu_save(struct fpu_state_struct *); |
61 | extern int fpu_setup_sigcontext(struct fpucontext *buf); | 60 | extern int fpu_setup_sigcontext(struct fpucontext *buf); |
@@ -113,7 +112,6 @@ static inline void flush_fpu(void) | |||
113 | 112 | ||
114 | extern asmlinkage | 113 | extern asmlinkage |
115 | void unexpected_fpu_exception(struct pt_regs *, enum exception_code); | 114 | void unexpected_fpu_exception(struct pt_regs *, enum exception_code); |
116 | #define fpu_invalid_op unexpected_fpu_exception | ||
117 | #define fpu_exception unexpected_fpu_exception | 115 | #define fpu_exception unexpected_fpu_exception |
118 | 116 | ||
119 | struct task_struct; | 117 | struct task_struct; |
diff --git a/arch/mn10300/include/asm/irqflags.h b/arch/mn10300/include/asm/irqflags.h index 7a7ae12c7119..678f68d5f37b 100644 --- a/arch/mn10300/include/asm/irqflags.h +++ b/arch/mn10300/include/asm/irqflags.h | |||
@@ -20,7 +20,7 @@ | |||
20 | /* | 20 | /* |
21 | * interrupt control | 21 | * interrupt control |
22 | * - "disabled": run in IM1/2 | 22 | * - "disabled": run in IM1/2 |
23 | * - level 0 - GDB stub | 23 | * - level 0 - kernel debugger |
24 | * - level 1 - virtual serial DMA (if present) | 24 | * - level 1 - virtual serial DMA (if present) |
25 | * - level 5 - normal interrupt priority | 25 | * - level 5 - normal interrupt priority |
26 | * - level 6 - timer interrupt | 26 | * - level 6 - timer interrupt |
diff --git a/arch/mn10300/include/asm/smp.h b/arch/mn10300/include/asm/smp.h index a3930e43a958..e3d13a899855 100644 --- a/arch/mn10300/include/asm/smp.h +++ b/arch/mn10300/include/asm/smp.h | |||
@@ -34,7 +34,7 @@ | |||
34 | #define LOCAL_TIMER_IPI 193 | 34 | #define LOCAL_TIMER_IPI 193 |
35 | #define FLUSH_CACHE_IPI 194 | 35 | #define FLUSH_CACHE_IPI 194 |
36 | #define CALL_FUNCTION_NMI_IPI 195 | 36 | #define CALL_FUNCTION_NMI_IPI 195 |
37 | #define GDB_NMI_IPI 196 | 37 | #define DEBUGGER_NMI_IPI 196 |
38 | 38 | ||
39 | #define SMP_BOOT_IRQ 195 | 39 | #define SMP_BOOT_IRQ 195 |
40 | 40 | ||
@@ -43,6 +43,7 @@ | |||
43 | #define LOCAL_TIMER_GxICR_LV GxICR_LEVEL_4 | 43 | #define LOCAL_TIMER_GxICR_LV GxICR_LEVEL_4 |
44 | #define FLUSH_CACHE_GxICR_LV GxICR_LEVEL_0 | 44 | #define FLUSH_CACHE_GxICR_LV GxICR_LEVEL_0 |
45 | #define SMP_BOOT_GxICR_LV GxICR_LEVEL_0 | 45 | #define SMP_BOOT_GxICR_LV GxICR_LEVEL_0 |
46 | #define DEBUGGER_GxICR_LV CONFIG_DEBUGGER_IRQ_LEVEL | ||
46 | 47 | ||
47 | #define TIME_OUT_COUNT_BOOT_IPI 100 | 48 | #define TIME_OUT_COUNT_BOOT_IPI 100 |
48 | #define DELAY_TIME_BOOT_IPI 75000 | 49 | #define DELAY_TIME_BOOT_IPI 75000 |