sh: kgdb section mismatches and tidying.
The kgdb console setup was callable from a left-over deferred
initialization path, which in turn depends on __init symbols. Since
the deferred initialization was removed some time ago, kill off the
rest of those remnants and move kgdb_init() and friends to __init.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
diff --git a/include/asm-sh/kgdb.h b/include/asm-sh/kgdb.h
index 74bd095..5334e86 100644
--- a/include/asm-sh/kgdb.h
+++ b/include/asm-sh/kgdb.h
@@ -19,8 +19,6 @@
#include <asm/ptrace.h>
#include <asm/cacheflush.h>
-struct console;
-
/* Same as pt_regs but has vbr in place of syscall_nr */
struct kgdb_regs {
unsigned long regs[16];
@@ -35,10 +33,7 @@
/* State info */
extern char kgdb_in_gdb_mode;
-extern int kgdb_done_init;
-extern int kgdb_enabled;
extern int kgdb_nofault; /* Ignore bus errors (in gdb mem access) */
-extern int kgdb_halt; /* Execute initial breakpoint at startup */
extern char in_nmi; /* Debounce flag to prevent NMI reentry*/
/* SCI */
@@ -59,6 +54,7 @@
extern kgdb_bus_error_hook_t *kgdb_bus_err_hook;
/* Console */
+struct console;
void kgdb_console_write(struct console *co, const char *s, unsigned count);
extern int kgdb_console_setup(struct console *, char *);
@@ -69,11 +65,7 @@
extern int setjmp(jmp_buf __jmpb);
/* Forced breakpoint */
-#define breakpoint() \
-do { \
- if (kgdb_enabled) \
- __asm__ __volatile__("trapa #0x3c"); \
-} while (0)
+#define breakpoint() __asm__ __volatile__("trapa #0x3c")
/* KGDB should be able to flush all kernel text space */
#if defined(CONFIG_CPU_SH4)