aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-09-12 02:19:22 -0400
committerDavid S. Miller <davem@davemloft.net>2008-09-12 02:19:22 -0400
commit8f20b20de73eeabe3d35e67e0ce993eceef07492 (patch)
tree54ac89b908c07d714f58fa355ff6fbb91b52489b /arch
parent4845afac95a653f8e64c45024cbb94264df54b8f (diff)
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: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch')
-rw-r--r--arch/sparc/include/asm/ptrace_64.h3
-rw-r--r--arch/sparc64/kernel/process.c2
2 files changed, 3 insertions, 2 deletions
diff --git a/arch/sparc/include/asm/ptrace_64.h b/arch/sparc/include/asm/ptrace_64.h
index 06e4914c13f4..3d3e9c161d8b 100644
--- a/arch/sparc/include/asm/ptrace_64.h
+++ b/arch/sparc/include/asm/ptrace_64.h
@@ -113,6 +113,8 @@ struct sparc_trapf {
113 113
114#ifdef __KERNEL__ 114#ifdef __KERNEL__
115 115
116#include <linux/threads.h>
117
116static inline int pt_regs_trap_type(struct pt_regs *regs) 118static inline int pt_regs_trap_type(struct pt_regs *regs)
117{ 119{
118 return regs->magic & 0x1ff; 120 return regs->magic & 0x1ff;
@@ -138,6 +140,7 @@ struct global_reg_snapshot {
138 struct thread_info *thread; 140 struct thread_info *thread;
139 unsigned long pad1; 141 unsigned long pad1;
140}; 142};
143extern struct global_reg_snapshot global_reg_snapshot[NR_CPUS];
141 144
142#define __ARCH_WANT_COMPAT_SYS_PTRACE 145#define __ARCH_WANT_COMPAT_SYS_PTRACE
143 146
diff --git a/arch/sparc64/kernel/process.c b/arch/sparc64/kernel/process.c
index 11bb6c4612de..d5e2acef9877 100644
--- a/arch/sparc64/kernel/process.c
+++ b/arch/sparc64/kernel/process.c
@@ -215,7 +215,6 @@ static void __global_reg_self(struct thread_info *tp, struct pt_regs *regs,
215 global_reg_snapshot[this_cpu].o7 = regs->u_regs[UREG_I7]; 215 global_reg_snapshot[this_cpu].o7 = regs->u_regs[UREG_I7];
216 216
217 if (regs->tstate & TSTATE_PRIV) { 217 if (regs->tstate & TSTATE_PRIV) {
218 struct thread_info *tp = current_thread_info();
219 struct reg_window *rw; 218 struct reg_window *rw;
220 219
221 rw = (struct reg_window *) 220 rw = (struct reg_window *)
@@ -271,7 +270,6 @@ void __trigger_all_cpu_backtrace(void)
271 270
272 for_each_online_cpu(cpu) { 271 for_each_online_cpu(cpu) {
273 struct global_reg_snapshot *gp = &global_reg_snapshot[cpu]; 272 struct global_reg_snapshot *gp = &global_reg_snapshot[cpu];
274 struct thread_info *tp;
275 273
276 __global_reg_poll(gp); 274 __global_reg_poll(gp);
277 275