From: Vineet Gupta <Vineet.Gupta1@synopsys.com>
To: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: tglx@linutronix.de, arnd@arndb.de,
Vineet Gupta <Vineet.Gupta1@synopsys.com>
Subject: [RFC PATCH v1 27/31] ARC: Last bits (stubs) to get to a running kernel with UART
Date: Wed, 7 Nov 2012 10:47:50 +0100 [thread overview]
Message-ID: <1352281674-2186-28-git-send-email-vgupta@synopsys.com> (raw)
In-Reply-To: <1352281674-2186-1-git-send-email-vgupta@synopsys.com>
=========================>8=============================
Linux version 3.7.0-rc3+ (vineetg@vineetg-Latitude) (gcc version 4.4.7
(ARCompact elf32 toolchain (built 20120928)) ) #5 Tue Nov 6 17:05:37 CET
2012
[plat-arcfpga]: registering early dev resources
bootconsole [early_ARCuart0] enabled
pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
pcpu-alloc: [0] 0
Built 1 zonelists in Zone order, mobility grouping on. Total pages:
32624
Kernel command line: print-fatal-signals=1
PID hash table entries: 1024 (order: -1, 4096 bytes)
Dentry cache hash table entries: 32768 (order: 4, 131072 bytes)
Inode-cache hash table entries: 16384 (order: 3, 65536 bytes)
Memory Available: 248M / 256M (1219K code, 412K data, 4192K init, 1400K
reserv)
SLUB: Genslabs=12, HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
NR_IRQS:16
Device [ARC Timer0] clockevent mode now [1]
Device [ARC Timer0] clockevent mode now [2]
Console: colour dummy device 80x25
Calibrating delay loop... 39.73 BogoMIPS (lpj=198656)
pid_max: default: 4096 minimum: 301
Mount-cache hash table entries: 1024
devtmpfs: initialized
[plat-arcfpga]: registering device resources
bio: create slab <bio-0> at 0
Switching to clocksource ARC Timer1
Device [ARC Timer0] clockevent mode now [3]
io scheduler noop registered (default)
arc-uart.0: ttyARC0 at MMIO 0xc0fc1000 (irq = 5) is a arc-uart
console [ttyARC0] enabled, bootconsole disabled
console [ttyARC0] enabled, bootconsole disabled
Warning: unable to open an initial console.
Freeing unused kernel memory: 4192k [80002000] to [8041a000]
Mounting proc
Mounting sysfs
Mounting devpts
Setting hostname to ARCLinux
Starting System logger (syslogd)
Bringing up loopback device
ifconfig: socket: Function not implemented
route: socket: Function not implemented
Disk not detected !
Mounting tmpfs
/etc/init.d/rcS: line 76: can't create /proc/sys/kernel/msgmni:
nonexistent directory
Please press Enter to activate this console.
***********************************************************************
Welcome to ARCLinux
***********************************************************************
[ARCLinux]$
=========================>8=============================
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
---
arch/arc/kernel/ptrace.c | 26 ++++++++++++++++++++++++
arch/arc/kernel/stacktrace.c | 43 ++++++++++++++++++++++++++++++++++++++++
arch/arc/kernel/troubleshoot.c | 17 +++++++++++++++
3 files changed, 86 insertions(+), 0 deletions(-)
create mode 100644 arch/arc/kernel/ptrace.c
create mode 100644 arch/arc/kernel/stacktrace.c
create mode 100644 arch/arc/kernel/troubleshoot.c
diff --git a/arch/arc/kernel/ptrace.c b/arch/arc/kernel/ptrace.c
new file mode 100644
index 0000000..1cf944a
--- /dev/null
+++ b/arch/arc/kernel/ptrace.c
@@ -0,0 +1,26 @@
+/*
+ * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
+ *
+ * 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.
+ */
+
+#include <linux/ptrace.h>
+
+void ptrace_disable(struct task_struct *child)
+{
+}
+
+long arch_ptrace(struct task_struct *child, long request,
+ unsigned long addr, unsigned long data)
+{
+ int ret = -EIO;
+ return ret;
+}
+
+
+const struct user_regset_view *task_user_regset_view(struct task_struct *task)
+{
+ return (const struct user_regset_view *)NULL;
+}
diff --git a/arch/arc/kernel/stacktrace.c b/arch/arc/kernel/stacktrace.c
new file mode 100644
index 0000000..b9d1646
--- /dev/null
+++ b/arch/arc/kernel/stacktrace.c
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
+ *
+ * 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.
+ */
+
+#include <linux/ptrace.h>
+#include <linux/export.h>
+
+/*-------------------------------------------------------------------------
+ * APIs expected by various kernel sub-systems
+ *-------------------------------------------------------------------------
+ */
+
+noinline void show_stacktrace(struct task_struct *tsk, struct pt_regs *regs)
+{
+ pr_info("\nStack Trace: NOT Available\n");
+}
+EXPORT_SYMBOL(show_stacktrace);
+
+/* Expected by sched Code */
+void show_stack(struct task_struct *tsk, unsigned long *sp)
+{
+ show_stacktrace(tsk, NULL);
+}
+
+/* Expected by Rest of kernel code */
+void dump_stack(void)
+{
+ show_stacktrace(NULL, NULL);
+}
+EXPORT_SYMBOL(dump_stack);
+
+/* Another API expected by schedular, shows up in "ps" as Wait Channel
+ * Ofcourse just returning schedule( ) would be pointless so unwind until
+ * the function is not in schedular code
+ */
+unsigned int get_wchan(struct task_struct *tsk)
+{
+ return 0;
+}
diff --git a/arch/arc/kernel/troubleshoot.c b/arch/arc/kernel/troubleshoot.c
new file mode 100644
index 0000000..80bfe2a
--- /dev/null
+++ b/arch/arc/kernel/troubleshoot.c
@@ -0,0 +1,17 @@
+/*
+ * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
+ *
+ * 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
+ */
+
+#include <linux/ptrace.h>
+
+void show_regs(struct pt_regs *regs)
+{
+}
+
+void show_kernel_fault_diag(const char *str, struct pt_regs *regs,
+ unsigned long address, unsigned long cause_reg)
+{
+}
--
1.7.4.1
next prev parent reply other threads:[~2012-11-07 9:47 UTC|newest]
Thread overview: 146+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-07 9:47 [RFC Patch v1 00/31] Synopsys ARC Linux kernel Port Vineet Gupta
2012-11-07 9:47 ` Vineet Gupta
2012-11-07 9:47 ` [RFC PATCH v1 01/31] ARC: Generic Headers Vineet Gupta
2012-11-07 9:47 ` Vineet Gupta
2012-11-07 9:47 ` [RFC PATCH v1 02/31] ARC: irqflags Vineet Gupta
2012-11-07 9:47 ` Vineet Gupta
2012-11-12 19:50 ` Thomas Gleixner
2012-11-12 19:50 ` Thomas Gleixner
2013-01-01 7:44 ` Vineet Gupta
2013-01-01 7:44 ` Vineet Gupta
2012-11-07 9:47 ` [RFC PATCH v1 03/31] ARC: atomic/bitops/cmpxchg/barriers Vineet Gupta
2012-11-07 9:47 ` Vineet Gupta
2012-11-07 9:47 ` [RFC PATCH v1 04/31] asm-generic headers: uaccess.h to conditionally define segment_eq() Vineet Gupta
2012-11-07 9:47 ` Vineet Gupta
2012-11-07 9:47 ` [RFC PATCH v1 05/31] ARC: uaccess friends Vineet Gupta
2012-11-07 9:47 ` [RFC PATCH v1 06/31] asm-generic headers: Allow yet more arch overrides in checksum.h Vineet Gupta
2012-11-07 9:47 ` Vineet Gupta
2012-11-07 9:47 ` [RFC PATCH v1 07/31] ARC: checksum/byteorder/swab routines Vineet Gupta
2012-11-07 9:47 ` Vineet Gupta
2012-11-07 9:47 ` [RFC PATCH v1 08/31] ARC: Fundamental ARCH data-types/defines Vineet Gupta
2012-11-07 9:47 ` Vineet Gupta
2012-11-08 7:10 ` Jonas Bonn
2012-11-08 18:52 ` Vineet Gupta
2012-11-08 20:36 ` Jonas Bonn
2012-11-12 13:58 ` Vineet Gupta
2012-11-12 14:12 ` Arnd Bergmann
2012-11-07 9:47 ` [RFC PATCH v1 09/31] ARC: spinlock/rwlock/mutex primitives Vineet Gupta
2012-11-07 9:47 ` Vineet Gupta
2012-11-07 9:47 ` [RFC PATCH v1 10/31] ARC: string library Vineet Gupta
2012-11-07 9:47 ` Vineet Gupta
2012-11-07 9:47 ` [RFC PATCH v1 11/31] ARC: Low level IRQ/Trap/Exception(non-MMU) Handling Vineet Gupta
2012-11-07 9:47 ` Vineet Gupta
2012-11-16 4:58 ` Al Viro
2012-11-16 4:58 ` Al Viro
2012-12-27 9:00 ` Vineet Gupta
2012-12-27 13:29 ` Vineet Gupta
2012-11-07 9:47 ` [RFC PATCH v1 12/31] ARC: Interrupt Handling Vineet Gupta
2012-11-07 9:47 ` Vineet Gupta
2012-11-12 20:08 ` Thomas Gleixner
2012-11-12 20:08 ` Thomas Gleixner
2013-01-01 10:46 ` Vineet Gupta
2012-11-07 9:47 ` [RFC PATCH v1 13/31] ARC: Non-MMU Exception Handling Vineet Gupta
2012-11-07 9:47 ` Vineet Gupta
2012-11-07 9:47 ` [RFC PATCH v1 14/31] ARC: syscall support Vineet Gupta
2012-11-07 9:47 ` Vineet Gupta
2012-11-07 14:21 ` Arnd Bergmann
2012-11-09 9:50 ` James Hogan
2012-11-13 11:41 ` James Hogan
2012-11-13 12:01 ` Jonas Bonn
2012-11-13 12:01 ` Jonas Bonn
2012-11-13 12:11 ` James Hogan
2012-11-14 12:23 ` Arnd Bergmann
2012-11-14 12:31 ` James Hogan
2012-11-13 10:13 ` Gilad Ben-Yossef
2012-11-13 10:37 ` Arnd Bergmann
2012-11-15 6:15 ` Vineet Gupta
2012-11-15 6:15 ` Vineet Gupta
2012-11-15 12:35 ` Arnd Bergmann
2013-01-17 5:13 ` Vineet Gupta
2012-11-07 9:47 ` [RFC PATCH v1 15/31] ARC: Process/scheduling/clock/Timers/Delay Management Vineet Gupta
2012-11-07 9:47 ` Vineet Gupta
2012-11-12 20:29 ` Thomas Gleixner
2013-01-02 7:13 ` Vineet Gupta
2013-01-02 8:45 ` Vineet Gupta
2013-01-04 13:01 ` Frederic Weisbecker
2012-11-07 9:47 ` [RFC PATCH v1 16/31] ARC: Signal handling Vineet Gupta
2012-11-07 9:47 ` Vineet Gupta
2012-11-16 5:26 ` Al Viro
2012-12-28 12:34 ` Vineet Gupta
2012-12-28 12:34 ` Vineet Gupta
2012-12-28 12:42 ` [PATCH 1/2] ARC: [Review] Preparing to fix incorrect syscall restarts due to signals Vineet Gupta
2012-12-28 12:42 ` [PATCH 2/2] ARC: [Review] Prevent incorrect syscall restarts Vineet Gupta
2012-11-07 9:47 ` [RFC PATCH v1 17/31] ARC: Cache Flush Management Vineet Gupta
2012-11-07 9:47 ` Vineet Gupta
2012-11-07 9:47 ` [RFC PATCH v1 18/31] ARC: Page Table Management Vineet Gupta
2012-11-07 9:47 ` Vineet Gupta
2012-11-07 9:47 ` [RFC PATCH v1 19/31] ARC: MMU Context Management Vineet Gupta
2012-11-07 9:47 ` Vineet Gupta
2012-11-07 9:47 ` [RFC PATCH v1 20/31] ARC: MMU Exception Handling Vineet Gupta
2012-11-07 9:47 ` [RFC PATCH v1 21/31] ARC: TLB flush Handling Vineet Gupta
2012-11-07 9:47 ` Vineet Gupta
2012-11-07 9:47 ` [RFC PATCH v1 22/31] ARC: Page Fault handling (incl uaccess fixup) Vineet Gupta
2012-11-07 9:47 ` Vineet Gupta
2012-11-07 9:47 ` [RFC PATCH v1 23/31] ARC: I/O and DMA Mappings Vineet Gupta
2012-11-07 9:47 ` Vineet Gupta
2012-11-07 9:47 ` [RFC PATCH v1 24/31] ARC: startup #1: low-level, setup_arch(), /proc/cpuinfo, mem init Vineet Gupta
2012-11-07 9:47 ` [RFC PATCH v1 25/31] ARC: [plat-arcfpga] Hooking up platform to ARC UART Vineet Gupta
2012-11-07 9:47 ` Vineet Gupta
2012-11-07 14:16 ` Arnd Bergmann
2012-11-07 14:16 ` Arnd Bergmann
2013-01-07 13:10 ` Vineet Gupta
2013-01-07 13:46 ` Arnd Bergmann
2013-01-07 14:04 ` Vineet Gupta
2013-01-07 14:36 ` Arnd Bergmann
2013-01-14 7:35 ` early init dt for earlyprintk (was Re: [RFC PATCH v1 25/31] ARC: [plat-arcfpga] Hooking up platform to ARC UART) Vineet Gupta
2013-01-14 9:48 ` James Hogan
2013-01-14 10:09 ` Vineet Gupta
2013-01-14 10:54 ` Arnd Bergmann
2013-01-17 7:29 ` [RFC PATCH v1 25/31] ARC: [plat-arcfpga] Hooking up platform to ARC UART Vineet Gupta
2013-01-17 10:52 ` Arnd Bergmann
2012-11-07 9:47 ` [RFC PATCH v1 26/31] ARC: Build system: Makefiles, Kconfig, Linker script Vineet Gupta
2012-11-07 14:13 ` Arnd Bergmann
[not found] ` <50E4449A.7010606@synopsys.com>
[not found] ` <201301021448.20119.arnd@arndb.de>
2013-01-03 7:58 ` Vineet Gupta
2013-01-03 8:25 ` Arnd Bergmann
2013-01-03 8:25 ` Arnd Bergmann
2013-03-11 12:29 ` SYSV IPC broken for no-legacy syscall kernels (was Re: [RFC PATCH v1 26/31] ARC: Build system: Makefiles, Kconfig, Linker script) Vineet Gupta
2013-03-11 12:44 ` James Hogan
2013-03-11 12:56 ` Vineet Gupta
2013-03-11 13:07 ` James Hogan
2013-03-11 13:30 ` Arnd Bergmann
2013-03-11 13:48 ` Vineet Gupta
2013-03-11 13:48 ` Vineet Gupta
2013-03-11 14:50 ` Arnd Bergmann
2012-11-15 17:49 ` [RFC PATCH v1 26/31] ARC: Build system: Makefiles, Kconfig, Linker script James Hogan
2012-11-15 17:49 ` James Hogan
2012-11-15 19:30 ` Ralf Baechle
2012-11-16 6:36 ` Vineet Gupta
2012-11-07 9:47 ` Vineet Gupta [this message]
2012-11-07 9:47 ` [RFC PATCH v1 27/31] ARC: Last bits (stubs) to get to a running kernel with UART Vineet Gupta
2012-11-07 9:47 ` [RFC PATCH v1 28/31] ARC: split ret_from_fork, simplify kernel_thread() Vineet Gupta
2012-11-07 9:47 ` Vineet Gupta
2012-11-07 9:47 ` [RFC PATCH v1 29/31] ARC: switch to generic kernel_thread() Vineet Gupta
2012-11-07 9:47 ` Vineet Gupta
2012-11-07 9:47 ` [RFC PATCH v1 30/31] ARC: switch to generic kernel_execve() and sys_execve() Vineet Gupta
2012-11-07 9:47 ` Vineet Gupta
2012-11-16 4:08 ` Al Viro
2012-11-16 4:08 ` Al Viro
2012-11-17 14:01 ` Vineet Gupta
2012-11-07 9:47 ` [RFC PATCH v1 31/31] ARC: [plat-arcfpga] defconfig Vineet Gupta
2012-11-07 9:47 ` Vineet Gupta
2012-11-07 14:06 ` Arnd Bergmann
2012-11-12 14:18 ` James Hogan
2012-11-12 14:21 ` Arnd Bergmann
2012-11-07 14:36 ` [RFC Patch v1 00/31] Synopsys ARC Linux kernel Port Arnd Bergmann
2012-11-08 19:09 ` Vineet Gupta
2012-11-07 20:46 ` Gilad Ben-Yossef
2012-11-07 20:46 ` Gilad Ben-Yossef
2012-11-20 13:47 ` Pavel Machek
2012-11-20 13:49 ` Vineet Gupta
2012-11-20 13:59 ` Pavel Machek
2012-11-20 14:17 ` Vineet Gupta
2013-01-18 19:46 ` Pavel Machek
2013-01-18 22:17 ` Arnd Bergmann
2013-01-19 10:15 ` Pavel Machek
2013-01-19 12:32 ` Vineet Gupta
2013-01-19 17:02 ` Pavel Machek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1352281674-2186-28-git-send-email-vgupta@synopsys.com \
--to=vineet.gupta1@synopsys.com \
--cc=arnd@arndb.de \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).