|
|
@@ -128,24 +128,6 @@ static void kgdboc_unregister_kbd(void)
|
|
|
#define kgdboc_restore_input()
|
|
|
#endif /* ! CONFIG_KDB_KEYBOARD */
|
|
|
|
|
|
-static int kgdboc_option_setup(char *opt)
|
|
|
-{
|
|
|
- if (!opt) {
|
|
|
- pr_err("kgdboc: config string not provided\n");
|
|
|
- return -EINVAL;
|
|
|
- }
|
|
|
-
|
|
|
- if (strlen(opt) >= MAX_CONFIG_LEN) {
|
|
|
- printk(KERN_ERR "kgdboc: config string too long\n");
|
|
|
- return -ENOSPC;
|
|
|
- }
|
|
|
- strcpy(config, opt);
|
|
|
-
|
|
|
- return 0;
|
|
|
-}
|
|
|
-
|
|
|
-__setup("kgdboc=", kgdboc_option_setup);
|
|
|
-
|
|
|
static void cleanup_kgdboc(void)
|
|
|
{
|
|
|
if (kgdb_unregister_nmi_console())
|
|
|
@@ -314,6 +296,25 @@ static struct kgdb_io kgdboc_io_ops = {
|
|
|
};
|
|
|
|
|
|
#ifdef CONFIG_KGDB_SERIAL_CONSOLE
|
|
|
+static int kgdboc_option_setup(char *opt)
|
|
|
+{
|
|
|
+ if (!opt) {
|
|
|
+ pr_err("config string not provided\n");
|
|
|
+ return -EINVAL;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (strlen(opt) >= MAX_CONFIG_LEN) {
|
|
|
+ pr_err("config string too long\n");
|
|
|
+ return -ENOSPC;
|
|
|
+ }
|
|
|
+ strcpy(config, opt);
|
|
|
+
|
|
|
+ return 0;
|
|
|
+}
|
|
|
+
|
|
|
+__setup("kgdboc=", kgdboc_option_setup);
|
|
|
+
|
|
|
+
|
|
|
/* This is only available if kgdboc is a built in for early debugging */
|
|
|
static int __init kgdboc_early_init(char *opt)
|
|
|
{
|