aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arc/kernel/stacktrace.c
diff options
context:
space:
mode:
authorVineet Gupta <vgupta@synopsys.com>2013-01-18 04:42:21 -0500
committerVineet Gupta <vgupta@synopsys.com>2013-02-15 12:45:57 -0500
commitc08098f28e3f3830086b1b542c2d2646a84e109c (patch)
tree246c4d6e2874f455e3cb19a85f83c96a4f460edf /arch/arc/kernel/stacktrace.c
parentabe11ddea1d759f9995a9a4636c28c9b40856ca8 (diff)
ARC: Last bits (stubs) to get to a running kernel with UART
This was part of port buildup strategy from Arnd to have a minimal kernel at first and then add optional features (stacktracing, ptrace, smp, kprobes, oprofile....) Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Diffstat (limited to 'arch/arc/kernel/stacktrace.c')
-rw-r--r--arch/arc/kernel/stacktrace.c43
1 files changed, 43 insertions, 0 deletions
diff --git a/arch/arc/kernel/stacktrace.c b/arch/arc/kernel/stacktrace.c
new file mode 100644
index 000000000000..b9d1646d1220
--- /dev/null
+++ b/arch/arc/kernel/stacktrace.c
@@ -0,0 +1,43 @@
1/*
2 * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 */
8
9#include <linux/ptrace.h>
10#include <linux/export.h>
11
12/*-------------------------------------------------------------------------
13 * APIs expected by various kernel sub-systems
14 *-------------------------------------------------------------------------
15 */
16
17noinline void show_stacktrace(struct task_struct *tsk, struct pt_regs *regs)
18{
19 pr_info("\nStack Trace: NOT Available\n");
20}
21EXPORT_SYMBOL(show_stacktrace);
22
23/* Expected by sched Code */
24void show_stack(struct task_struct *tsk, unsigned long *sp)
25{
26 show_stacktrace(tsk, NULL);
27}
28
29/* Expected by Rest of kernel code */
30void dump_stack(void)
31{
32 show_stacktrace(NULL, NULL);
33}
34EXPORT_SYMBOL(dump_stack);
35
36/* Another API expected by schedular, shows up in "ps" as Wait Channel
37 * Ofcourse just returning schedule( ) would be pointless so unwind until
38 * the function is not in schedular code
39 */
40unsigned int get_wchan(struct task_struct *tsk)
41{
42 return 0;
43}