diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/kgdb.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/include/linux/kgdb.h b/include/linux/kgdb.h index 4830142ec339..5b37df00000d 100644 --- a/include/linux/kgdb.h +++ b/include/linux/kgdb.h | |||
@@ -16,10 +16,12 @@ | |||
16 | #include <linux/serial_8250.h> | 16 | #include <linux/serial_8250.h> |
17 | #include <linux/linkage.h> | 17 | #include <linux/linkage.h> |
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | |||
20 | #include <asm/atomic.h> | 19 | #include <asm/atomic.h> |
20 | #ifdef CONFIG_HAVE_ARCH_KGDB | ||
21 | #include <asm/kgdb.h> | 21 | #include <asm/kgdb.h> |
22 | #endif | ||
22 | 23 | ||
24 | #ifdef CONFIG_KGDB | ||
23 | struct pt_regs; | 25 | struct pt_regs; |
24 | 26 | ||
25 | /** | 27 | /** |
@@ -262,6 +264,7 @@ extern struct kgdb_arch arch_kgdb_ops; | |||
262 | 264 | ||
263 | extern unsigned long __weak kgdb_arch_pc(int exception, struct pt_regs *regs); | 265 | extern unsigned long __weak kgdb_arch_pc(int exception, struct pt_regs *regs); |
264 | 266 | ||
267 | extern void kgdb_arch_set_pc(struct pt_regs *regs, unsigned long pc); | ||
265 | extern int kgdb_register_io_module(struct kgdb_io *local_kgdb_io_ops); | 268 | extern int kgdb_register_io_module(struct kgdb_io *local_kgdb_io_ops); |
266 | extern void kgdb_unregister_io_module(struct kgdb_io *local_kgdb_io_ops); | 269 | extern void kgdb_unregister_io_module(struct kgdb_io *local_kgdb_io_ops); |
267 | extern struct kgdb_io *dbg_io_ops; | 270 | extern struct kgdb_io *dbg_io_ops; |
@@ -279,5 +282,9 @@ extern int kgdb_nmicallback(int cpu, void *regs); | |||
279 | 282 | ||
280 | extern int kgdb_single_step; | 283 | extern int kgdb_single_step; |
281 | extern atomic_t kgdb_active; | 284 | extern atomic_t kgdb_active; |
282 | 285 | #define in_dbg_master() \ | |
286 | (raw_smp_processor_id() == atomic_read(&kgdb_active)) | ||
287 | #else /* ! CONFIG_KGDB */ | ||
288 | #define in_dbg_master() (0) | ||
289 | #endif /* ! CONFIG_KGDB */ | ||
283 | #endif /* _KGDB_H_ */ | 290 | #endif /* _KGDB_H_ */ |