From: Martin Schwidefsky <schwidefsky@de.ibm.com>
To: linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>,
Martin Schwidefsky <schwidefsky@de.ibm.com>
Subject: [patch 02/15] Move show_regs to traps.c.
Date: Tue, 29 Apr 2008 16:01:19 +0200 [thread overview]
Message-ID: <20080429140248.892514700@de.ibm.com> (raw)
In-Reply-To: 20080429140117.631962807@de.ibm.com
[-- Attachment #1: 002-showregs.diff --]
[-- Type: text/plain, Size: 4063 bytes --]
From: Heiko Carstens <heiko.carstens@de.ibm.com>
This is where it should be and we can get rid of some externs
and a static inline function.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
---
arch/s390/kernel/process.c | 18 ------------------
arch/s390/kernel/traps.c | 26 ++++++++++++++++++++++----
include/asm-s390/processor.h | 9 ---------
3 files changed, 22 insertions(+), 31 deletions(-)
Index: quilt-2.6/arch/s390/kernel/process.c
===================================================================
--- quilt-2.6.orig/arch/s390/kernel/process.c
+++ quilt-2.6/arch/s390/kernel/process.c
@@ -180,24 +180,6 @@ void cpu_idle(void)
}
}
-void show_regs(struct pt_regs *regs)
-{
- print_modules();
- printk("CPU: %d %s %s %.*s\n",
- task_thread_info(current)->cpu, print_tainted(),
- init_utsname()->release,
- (int)strcspn(init_utsname()->version, " "),
- init_utsname()->version);
- printk("Process %s (pid: %d, task: %p, ksp: %p)\n",
- current->comm, current->pid, current,
- (void *) current->thread.ksp);
- show_registers(regs);
- /* Show stack backtrace if pt_regs is from kernel mode */
- if (!(regs->psw.mask & PSW_MASK_PSTATE))
- show_trace(NULL, (unsigned long *) regs->gprs[15]);
- show_last_breaking_event(regs);
-}
-
extern void kernel_thread_starter(void);
asm(
Index: quilt-2.6/arch/s390/kernel/traps.c
===================================================================
--- quilt-2.6.orig/arch/s390/kernel/traps.c
+++ quilt-2.6/arch/s390/kernel/traps.c
@@ -113,7 +113,7 @@ __show_trace(unsigned long sp, unsigned
}
}
-void show_trace(struct task_struct *task, unsigned long *stack)
+static void show_trace(struct task_struct *task, unsigned long *stack)
{
register unsigned long __r15 asm ("15");
unsigned long sp;
@@ -161,14 +161,14 @@ void show_stack(struct task_struct *task
show_trace(task, sp);
}
-#ifdef CONFIG_64BIT
-void show_last_breaking_event(struct pt_regs *regs)
+static void show_last_breaking_event(struct pt_regs *regs)
{
+#ifdef CONFIG_64BIT
printk("Last Breaking-Event-Address:\n");
printk(" [<%016lx>] ", regs->args[0] & PSW_ADDR_INSN);
print_symbol("%s\n", regs->args[0] & PSW_ADDR_INSN);
-}
#endif
+}
/*
* The architecture-independent dump_stack generator
@@ -223,6 +223,24 @@ void show_registers(struct pt_regs *regs
show_code(regs);
}
+void show_regs(struct pt_regs *regs)
+{
+ print_modules();
+ printk("CPU: %d %s %s %.*s\n",
+ task_thread_info(current)->cpu, print_tainted(),
+ init_utsname()->release,
+ (int)strcspn(init_utsname()->version, " "),
+ init_utsname()->version);
+ printk("Process %s (pid: %d, task: %p, ksp: %p)\n",
+ current->comm, current->pid, current,
+ (void *) current->thread.ksp);
+ show_registers(regs);
+ /* Show stack backtrace if pt_regs is from kernel mode */
+ if (!(regs->psw.mask & PSW_MASK_PSTATE))
+ show_trace(NULL, (unsigned long *) regs->gprs[15]);
+ show_last_breaking_event(regs);
+}
+
/* This is called from fs/proc/array.c */
void task_show_regs(struct seq_file *m, struct task_struct *task)
{
Index: quilt-2.6/include/asm-s390/processor.h
===================================================================
--- quilt-2.6.orig/include/asm-s390/processor.h
+++ quilt-2.6/include/asm-s390/processor.h
@@ -172,16 +172,7 @@ extern unsigned long thread_saved_pc(str
*/
extern void task_show_regs(struct seq_file *m, struct task_struct *task);
-extern void show_registers(struct pt_regs *regs);
extern void show_code(struct pt_regs *regs);
-extern void show_trace(struct task_struct *task, unsigned long *sp);
-#ifdef CONFIG_64BIT
-extern void show_last_breaking_event(struct pt_regs *regs);
-#else
-static inline void show_last_breaking_event(struct pt_regs *regs)
-{
-}
-#endif
unsigned long get_wchan(struct task_struct *p);
#define task_pt_regs(tsk) ((struct pt_regs *) \
--
blue skies,
Martin.
"Reality continues to ruin my life." - Calvin.
next prev parent reply other threads:[~2008-04-29 14:16 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-29 14:01 [patch 00/15] 2nd batch of s390 patches for 2.6.26 Martin Schwidefsky
2008-04-29 14:01 ` [patch 01/15] cio: Use strict_strtoul() for attributes Martin Schwidefsky
2008-04-29 14:01 ` Martin Schwidefsky [this message]
2008-04-29 14:01 ` [patch 03/15] Add missing ifndef/define to include/asm-s390/sysinfo.h Martin Schwidefsky
2008-04-29 14:01 ` [patch 04/15] smp: Fix locking order Martin Schwidefsky
2008-04-29 14:01 ` [patch 05/15] Automatically detect added cpus Martin Schwidefsky
2008-04-29 14:01 ` [patch 06/15] remove -traditional Martin Schwidefsky
2008-04-29 14:01 ` [patch 07/15] cio: Make isc handling more robust Martin Schwidefsky
2008-04-29 14:01 ` [patch 08/15] Add topology_core_siblings to topology.h Martin Schwidefsky
2008-04-29 14:01 ` [patch 09/15] cpu topology: Fix possible deadlock Martin Schwidefsky
2008-04-29 14:01 ` [patch 10/15] uaccess_mvcos: #ifdef config dependent code Martin Schwidefsky
2008-04-29 14:01 ` [patch 11/15] Move stfl to system.h and delete duplicated version Martin Schwidefsky
2008-04-29 14:01 ` [patch 12/15] vmemmap: use clear_table to initialise page tables Martin Schwidefsky
2008-04-29 14:01 ` [patch 13/15] Convert machine feature detection code to C Martin Schwidefsky
2008-04-29 14:01 ` [patch 14/15] System z large page support Martin Schwidefsky
2008-04-29 14:01 ` [patch 15/15] Convert to SPARSEMEM & SPARSEMEM_VMEMMAP Martin Schwidefsky
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=20080429140248.892514700@de.ibm.com \
--to=schwidefsky@de.ibm.com \
--cc=heiko.carstens@de.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
/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