Commit 8f20b20d authored by David S. Miller's avatar David S. Miller

sparc64: Fix sparse warnings in global reg snapshotting.

Lots of shadowed local variables and global_reg_snapshot[] needs
an extern declaration in asm/ptrace_64.h.
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 4845afac
...@@ -113,6 +113,8 @@ struct sparc_trapf { ...@@ -113,6 +113,8 @@ struct sparc_trapf {
#ifdef __KERNEL__ #ifdef __KERNEL__
#include <linux/threads.h>
static inline int pt_regs_trap_type(struct pt_regs *regs) static inline int pt_regs_trap_type(struct pt_regs *regs)
{ {
return regs->magic & 0x1ff; return regs->magic & 0x1ff;
...@@ -138,6 +140,7 @@ struct global_reg_snapshot { ...@@ -138,6 +140,7 @@ struct global_reg_snapshot {
struct thread_info *thread; struct thread_info *thread;
unsigned long pad1; unsigned long pad1;
}; };
extern struct global_reg_snapshot global_reg_snapshot[NR_CPUS];
#define __ARCH_WANT_COMPAT_SYS_PTRACE #define __ARCH_WANT_COMPAT_SYS_PTRACE
......
...@@ -215,7 +215,6 @@ static void __global_reg_self(struct thread_info *tp, struct pt_regs *regs, ...@@ -215,7 +215,6 @@ static void __global_reg_self(struct thread_info *tp, struct pt_regs *regs,
global_reg_snapshot[this_cpu].o7 = regs->u_regs[UREG_I7]; global_reg_snapshot[this_cpu].o7 = regs->u_regs[UREG_I7];
if (regs->tstate & TSTATE_PRIV) { if (regs->tstate & TSTATE_PRIV) {
struct thread_info *tp = current_thread_info();
struct reg_window *rw; struct reg_window *rw;
rw = (struct reg_window *) rw = (struct reg_window *)
...@@ -271,7 +270,6 @@ void __trigger_all_cpu_backtrace(void) ...@@ -271,7 +270,6 @@ void __trigger_all_cpu_backtrace(void)
for_each_online_cpu(cpu) { for_each_online_cpu(cpu) {
struct global_reg_snapshot *gp = &global_reg_snapshot[cpu]; struct global_reg_snapshot *gp = &global_reg_snapshot[cpu];
struct thread_info *tp;
__global_reg_poll(gp); __global_reg_poll(gp);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment