aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2007-11-06 03:34:33 -0500
committerPaul Mundt <lethal@linux-sh.org>2007-11-06 21:13:55 -0500
commit808bde2537b6c683af25a2e911c1d88dc80a445e (patch)
tree0bae142d7ba521da7308fe8615559598eb73d4e0
parent98c6942975dc73138df61070dd8cfbcbe67f3d96 (diff)
sh: Fix up kgdb build with modular sh-sci.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
-rw-r--r--arch/sh/Kconfig.debug2
-rw-r--r--arch/sh/kernel/kgdb_stub.c9
2 files changed, 9 insertions, 2 deletions
diff --git a/arch/sh/Kconfig.debug b/arch/sh/Kconfig.debug
index ab2f9f3c354c..7fb6d5ca977a 100644
--- a/arch/sh/Kconfig.debug
+++ b/arch/sh/Kconfig.debug
@@ -124,7 +124,7 @@ config KGDB_NMI
124 124
125config SH_KGDB_CONSOLE 125config SH_KGDB_CONSOLE
126 bool "Console messages through GDB" 126 bool "Console messages through GDB"
127 depends on !SERIAL_SH_SCI_CONSOLE 127 depends on !SERIAL_SH_SCI_CONSOLE && SERIAL_SH_SCI=y
128 select SERIAL_CORE_CONSOLE 128 select SERIAL_CORE_CONSOLE
129 default n 129 default n
130 130
diff --git a/arch/sh/kernel/kgdb_stub.c b/arch/sh/kernel/kgdb_stub.c
index 2fdc700dfd6e..d453c3a1c79f 100644
--- a/arch/sh/kernel/kgdb_stub.c
+++ b/arch/sh/kernel/kgdb_stub.c
@@ -102,6 +102,7 @@
102#include <linux/init.h> 102#include <linux/init.h>
103#include <linux/console.h> 103#include <linux/console.h>
104#include <linux/sysrq.h> 104#include <linux/sysrq.h>
105#include <linux/module.h>
105#include <asm/system.h> 106#include <asm/system.h>
106#include <asm/cacheflush.h> 107#include <asm/cacheflush.h>
107#include <asm/current.h> 108#include <asm/current.h>
@@ -116,7 +117,9 @@ kgdb_debug_hook_t *kgdb_debug_hook;
116kgdb_bus_error_hook_t *kgdb_bus_err_hook; 117kgdb_bus_error_hook_t *kgdb_bus_err_hook;
117 118
118int (*kgdb_getchar)(void); 119int (*kgdb_getchar)(void);
120EXPORT_SYMBOL_GPL(kgdb_getchar);
119void (*kgdb_putchar)(int); 121void (*kgdb_putchar)(int);
122EXPORT_SYMBOL_GPL(kgdb_putchar);
120 123
121static void put_debug_char(int c) 124static void put_debug_char(int c)
122{ 125{
@@ -136,7 +139,7 @@ static int get_debug_char(void)
136#define NUMREGBYTES (MAXREG*4) 139#define NUMREGBYTES (MAXREG*4)
137#define OUTBUFMAX (NUMREGBYTES*2+512) 140#define OUTBUFMAX (NUMREGBYTES*2+512)
138 141
139enum regs { 142enum {
140 R0 = 0, R1, R2, R3, R4, R5, R6, R7, 143 R0 = 0, R1, R2, R3, R4, R5, R6, R7,
141 R8, R9, R10, R11, R12, R13, R14, R15, 144 R8, R9, R10, R11, R12, R13, R14, R15,
142 PC, PR, GBR, VBR, MACH, MACL, SR, 145 PC, PR, GBR, VBR, MACH, MACL, SR,
@@ -176,9 +179,13 @@ int kgdb_nofault; /* Boolean to ignore bus errs (i.e. in GDB) */
176 179
177/* SCI/UART settings, used in kgdb_console_setup() */ 180/* SCI/UART settings, used in kgdb_console_setup() */
178int kgdb_portnum = CONFIG_KGDB_DEFPORT; 181int kgdb_portnum = CONFIG_KGDB_DEFPORT;
182EXPORT_SYMBOL_GPL(kgdb_portnum);
179int kgdb_baud = CONFIG_KGDB_DEFBAUD; 183int kgdb_baud = CONFIG_KGDB_DEFBAUD;
184EXPORT_SYMBOL_GPL(kgdb_baud);
180char kgdb_parity = CONFIG_KGDB_DEFPARITY; 185char kgdb_parity = CONFIG_KGDB_DEFPARITY;
186EXPORT_SYMBOL_GPL(kgdb_parity);
181char kgdb_bits = CONFIG_KGDB_DEFBITS; 187char kgdb_bits = CONFIG_KGDB_DEFBITS;
188EXPORT_SYMBOL_GPL(kgdb_bits);
182 189
183/* Jump buffer for setjmp/longjmp */ 190/* Jump buffer for setjmp/longjmp */
184static jmp_buf rem_com_env; 191static jmp_buf rem_com_env;