aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-07-31 23:33:43 -0400
committerDavid S. Miller <davem@davemloft.net>2008-07-31 23:33:43 -0400
commitdbf3e950679b2588e554baa4da94c445c7903e24 (patch)
treeb312ea343ce84eae8ad0c2010f4cc894093d462b
parent6717c282e407650c29e7b058623d89f543015a33 (diff)
sparc64: Kill __show_regs().
The story is that what we used to do when we actually used smp_report_regs() is that if you specifically only wanted to have the current cpu's registers dumped you would call "__show_regs()" otherwise you would call show_regs() which also invoked smp_report_regs(). Now that we killed off smp_report_regs() there is no longer any reason to have these two routines, just show_regs() is sufficient. Also kill off a stray declaration of show_regs() in sparc64_ksym.c Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--arch/sparc64/kernel/process.c26
-rw-r--r--arch/sparc64/kernel/sparc64_ksyms.c1
-rw-r--r--arch/sparc64/kernel/traps.c4
3 files changed, 3 insertions, 28 deletions
diff --git a/arch/sparc64/kernel/process.c b/arch/sparc64/kernel/process.c
index bf740e039b75..7f5debdc5fed 100644
--- a/arch/sparc64/kernel/process.c
+++ b/arch/sparc64/kernel/process.c
@@ -211,22 +211,8 @@ static void show_regwindow(struct pt_regs *regs)
211 printk("I7: <%pS>\n", (void *) rwk->ins[7]); 211 printk("I7: <%pS>\n", (void *) rwk->ins[7]);
212} 212}
213 213
214#ifdef CONFIG_SMP 214void show_regs(struct pt_regs *regs)
215static DEFINE_SPINLOCK(regdump_lock);
216#endif
217
218void __show_regs(struct pt_regs * regs)
219{ 215{
220#ifdef CONFIG_SMP
221 unsigned long flags;
222
223 /* Protect against xcall ipis which might lead to livelock on the lock */
224 __asm__ __volatile__("rdpr %%pstate, %0\n\t"
225 "wrpr %0, %1, %%pstate"
226 : "=r" (flags)
227 : "i" (PSTATE_IE));
228 spin_lock(&regdump_lock);
229#endif
230 printk("TSTATE: %016lx TPC: %016lx TNPC: %016lx Y: %08x %s\n", regs->tstate, 216 printk("TSTATE: %016lx TPC: %016lx TNPC: %016lx Y: %08x %s\n", regs->tstate,
231 regs->tpc, regs->tnpc, regs->y, print_tainted()); 217 regs->tpc, regs->tnpc, regs->y, print_tainted());
232 printk("TPC: <%pS>\n", (void *) regs->tpc); 218 printk("TPC: <%pS>\n", (void *) regs->tpc);
@@ -244,16 +230,6 @@ void __show_regs(struct pt_regs * regs)
244 regs->u_regs[15]); 230 regs->u_regs[15]);
245 printk("RPC: <%pS>\n", (void *) regs->u_regs[15]); 231 printk("RPC: <%pS>\n", (void *) regs->u_regs[15]);
246 show_regwindow(regs); 232 show_regwindow(regs);
247#ifdef CONFIG_SMP
248 spin_unlock(&regdump_lock);
249 __asm__ __volatile__("wrpr %0, 0, %%pstate"
250 : : "r" (flags));
251#endif
252}
253
254void show_regs(struct pt_regs *regs)
255{
256 __show_regs(regs);
257} 233}
258 234
259struct global_reg_snapshot global_reg_snapshot[NR_CPUS]; 235struct global_reg_snapshot global_reg_snapshot[NR_CPUS];
diff --git a/arch/sparc64/kernel/sparc64_ksyms.c b/arch/sparc64/kernel/sparc64_ksyms.c
index 504e678ee128..0804f71df6cb 100644
--- a/arch/sparc64/kernel/sparc64_ksyms.c
+++ b/arch/sparc64/kernel/sparc64_ksyms.c
@@ -68,7 +68,6 @@ extern void *__memscan_zero(void *, size_t);
68extern void *__memscan_generic(void *, int, size_t); 68extern void *__memscan_generic(void *, int, size_t);
69extern int __memcmp(const void *, const void *, __kernel_size_t); 69extern int __memcmp(const void *, const void *, __kernel_size_t);
70extern __kernel_size_t strlen(const char *); 70extern __kernel_size_t strlen(const char *);
71extern void show_regs(struct pt_regs *);
72extern void syscall_trace(struct pt_regs *, int); 71extern void syscall_trace(struct pt_regs *, int);
73extern void sys_sigsuspend(void); 72extern void sys_sigsuspend(void);
74extern int compat_sys_ioctl(unsigned int fd, unsigned int cmd, u32 arg); 73extern int compat_sys_ioctl(unsigned int fd, unsigned int cmd, u32 arg);
diff --git a/arch/sparc64/kernel/traps.c b/arch/sparc64/kernel/traps.c
index f56b6fe78e92..404e8561e2d0 100644
--- a/arch/sparc64/kernel/traps.c
+++ b/arch/sparc64/kernel/traps.c
@@ -1777,7 +1777,7 @@ static void sun4v_log_error(struct pt_regs *regs, struct sun4v_error_entry *ent,
1777 pfx, 1777 pfx,
1778 ent->err_raddr, ent->err_size, ent->err_cpu); 1778 ent->err_raddr, ent->err_size, ent->err_cpu);
1779 1779
1780 __show_regs(regs); 1780 show_regs(regs);
1781 1781
1782 if ((cnt = atomic_read(ocnt)) != 0) { 1782 if ((cnt = atomic_read(ocnt)) != 0) {
1783 atomic_set(ocnt, 0); 1783 atomic_set(ocnt, 0);
@@ -2189,7 +2189,7 @@ void die_if_kernel(char *str, struct pt_regs *regs)
2189 printk("%s(%d): %s [#%d]\n", current->comm, task_pid_nr(current), str, ++die_counter); 2189 printk("%s(%d): %s [#%d]\n", current->comm, task_pid_nr(current), str, ++die_counter);
2190 notify_die(DIE_OOPS, str, regs, 0, 255, SIGSEGV); 2190 notify_die(DIE_OOPS, str, regs, 0, 255, SIGSEGV);
2191 __asm__ __volatile__("flushw"); 2191 __asm__ __volatile__("flushw");
2192 __show_regs(regs); 2192 show_regs(regs);
2193 add_taint(TAINT_DIE); 2193 add_taint(TAINT_DIE);
2194 if (regs->tstate & TSTATE_PRIV) { 2194 if (regs->tstate & TSTATE_PRIV) {
2195 struct reg_window *rw = (struct reg_window *) 2195 struct reg_window *rw = (struct reg_window *)