Skip to contentSkip to conversation

unicore32 core architecture: process/thread related code

PATCH In review Guan Xuetao 2 participants 2 messages Dec 25, 2010 – Jan 7, 2011 Generic include/asm header files

lore
Share & tools
lore
#0 lore raw

PATCH 5/12 unicore32 core architecture: process/thread related code

From: Guan Xuetao <[email protected]>

Patch 5 implements process/thread related codes. Backtrace and stacktrace are here.

---
 arch/unicore32/include/asm/stacktrace.h  |   31 +++
 arch/unicore32/include/asm/thread_info.h |  152 ++++++++++++
 arch/unicore32/kernel/init_task.c        |   44 ++++
 arch/unicore32/kernel/process.c          |  389 ++++++++++++++++++++++++++++++
 arch/unicore32/kernel/stacktrace.c       |  131 ++++++++++
 arch/unicore32/lib/backtrace.S           |  163 +++++++++++++
 6 files changed, 910 insertions(+), 0 deletions(-)
arch/unicore32/include/asm/stacktrace.h new file +31 -0
new file mode 100644
index 0000000..76edc65
@@ -0,0 +1,31 @@
+/*
+ * linux/arch/unicore32/include/asm/stacktrace.h
+ *
+ * Code specific to PKUnity SoC and UniCore ISA
+ *
+ * Copyright (C) 2001-2010 GUAN Xue-tao
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#ifndef __UNICORE_STACKTRACE_H__
+#define __UNICORE_STACKTRACE_H__
+
+struct stackframe {
+	unsigned long fp;
+	unsigned long sp;
+	unsigned long lr;
+	unsigned long pc;
+};
+
+#ifdef CONFIG_FRAME_POINTER
+extern int unwind_frame(struct stackframe *frame);
+#else
+#define unwind_frame(f) (-EINVAL)
+#endif
+extern void walk_stackframe(struct stackframe *frame,
+			    int (*fn)(struct stackframe *, void *), void *data);
+
+#endif	/* __UNICORE_STACKTRACE_H__ */
arch/unicore32/include/asm/thread_info.h new file +152 -0

152 lines not on this page · raw message

arch/unicore32/kernel/init_task.c new file +44 -0

44 lines not on this page · raw message

arch/unicore32/kernel/process.c new file +389 -0

389 lines not on this page · raw message

arch/unicore32/kernel/stacktrace.c new file +131 -0

131 lines not on this page · raw message

arch/unicore32/lib/backtrace.S new file +163 -0

163 lines not on this page · raw message