aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc
diff options
context:
space:
mode:
authorDima Zavin <dima@android.com>2011-11-09 16:07:17 -0800
committerDima Zavin <dima@android.com>2011-11-14 10:27:10 -0800
commit9ab6a29787b1221a697f85835645549668258bdc (patch)
tree64eb08ff87d3ccc5e9c04eeefb167b515ec1e422 /drivers/misc
parent1e78d52ab825e2672bc8b552bdea582860f7b830 (diff)
downloadkernel_samsung_aries-9ab6a29787b1221a697f85835645549668258bdc.zip
kernel_samsung_aries-9ab6a29787b1221a697f85835645549668258bdc.tar.gz
kernel_samsung_aries-9ab6a29787b1221a697f85835645549668258bdc.tar.bz2
misc: remove kernel debugger core
The current split between this and the fiq debugger is awkward and does not have any benefit (the interface between the two is also too simplistic). The fiq debugger code itself needs a lot of refactoring, part of which would be to split out some components that are arch indpendent. So, for now, move this very small piece back into the fiq_debugger. Change-Id: Ie4ec2a2f5d907be1691a0eb6ae9304aad29ecd14 Signed-off-by: Dima Zavin <dima@android.com>
Diffstat (limited to 'drivers/misc')
-rw-r--r--drivers/misc/Kconfig7
-rw-r--r--drivers/misc/Makefile1
-rw-r--r--drivers/misc/kernel_debugger.c89
3 files changed, 0 insertions, 97 deletions
diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig
index 68f3671..961b529 100644
--- a/drivers/misc/Kconfig
+++ b/drivers/misc/Kconfig
@@ -233,13 +233,6 @@ config ENCLOSURE_SERVICES
driver (SCSI/ATA) which supports enclosures
or a SCSI enclosure device (SES) to use these services.
-config KERNEL_DEBUGGER_CORE
- bool "Kernel Debugger Core"
- default n
- ---help---
- Generic kernel debugging command processor used by low level
- (interrupt context) platform-specific debuggers.
-
config SGI_XP
tristate "Support communication between SGI SSIs"
depends on NET
diff --git a/drivers/misc/Makefile b/drivers/misc/Makefile
index 2d43048..5d80458 100644
--- a/drivers/misc/Makefile
+++ b/drivers/misc/Makefile
@@ -22,7 +22,6 @@ obj-$(CONFIG_SENSORS_APDS990X) += apds990x.o
obj-$(CONFIG_ANDROID_PMEM) += pmem.o
obj-$(CONFIG_SGI_IOC4) += ioc4.o
obj-$(CONFIG_ENCLOSURE_SERVICES) += enclosure.o
-obj-$(CONFIG_KERNEL_DEBUGGER_CORE) += kernel_debugger.o
obj-$(CONFIG_KGDB_TESTS) += kgdbts.o
obj-$(CONFIG_SGI_XP) += sgi-xp/
obj-$(CONFIG_SGI_GRU) += sgi-gru/
diff --git a/drivers/misc/kernel_debugger.c b/drivers/misc/kernel_debugger.c
deleted file mode 100644
index 4a9fef6..0000000
--- a/drivers/misc/kernel_debugger.c
+++ /dev/null
@@ -1,89 +0,0 @@
-/* drivers/android/kernel_debugger.c
- *
- * Guts of the kernel debugger.
- * Needs something to actually push commands to it.
- *
- * Copyright (C) 2007-2008 Google, Inc.
- *
- * This software is licensed under the terms of the GNU General Public
- * License version 2, as published by the Free Software Foundation, and
- * may be copied, distributed, and modified under those terms.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- */
-
-#include <linux/ctype.h>
-#include <linux/device.h>
-#include <linux/sched.h>
-#include <linux/spinlock.h>
-#include <linux/sysrq.h>
-#include <linux/kernel_debugger.h>
-
-#define dprintf(fmt...) (ctxt->printf(ctxt->cookie, fmt))
-
-static void do_ps(struct kdbg_ctxt *ctxt)
-{
- struct task_struct *g, *p;
- unsigned state;
- static const char stat_nam[] = "RSDTtZX";
-
- dprintf("pid ppid prio task pc\n");
- read_lock(&tasklist_lock);
- do_each_thread(g, p) {
- state = p->state ? __ffs(p->state) + 1 : 0;
- dprintf("%5d %5d %4d ", p->pid, p->parent->pid, p->prio);
- dprintf("%-13.13s %c", p->comm,
- state >= sizeof(stat_nam) ? '?' : stat_nam[state]);
- if (state == TASK_RUNNING)
- dprintf(" running\n");
- else
- dprintf(" %08lx\n", thread_saved_pc(p));
- } while_each_thread(g, p);
- read_unlock(&tasklist_lock);
-}
-
-int log_buf_copy(char *dest, int idx, int len);
-extern int do_syslog(int type, char __user *bug, int count);
-static void do_sysrq(struct kdbg_ctxt *ctxt, char rq)
-{
- char buf[128];
- int ret;
- int idx = 0;
- do_syslog(5 /* clear */, NULL, 0);
- handle_sysrq(rq);
- while (1) {
- ret = log_buf_copy(buf, idx, sizeof(buf) - 1);
- if (ret <= 0)
- break;
- buf[ret] = 0;
- dprintf("%s", buf);
- idx += ret;
- }
-}
-
-static void do_help(struct kdbg_ctxt *ctxt)
-{
- dprintf("Kernel Debugger commands:\n");
- dprintf(" ps Process list\n");
- dprintf(" sysrq sysrq options\n");
- dprintf(" sysrq <param> Execute sysrq with <param>\n");
-}
-
-int kernel_debugger(struct kdbg_ctxt *ctxt, char *cmd)
-{
- if (!strcmp(cmd, "ps"))
- do_ps(ctxt);
- if (!strcmp(cmd, "sysrq"))
- do_sysrq(ctxt, 'h');
- if (!strncmp(cmd, "sysrq ", 6))
- do_sysrq(ctxt, cmd[6]);
- if (!strcmp(cmd, "help"))
- do_help(ctxt);
-
- return 0;
-}
-