aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc
diff options
context:
space:
mode:
authorSam Ravnborg <sam@ravnborg.org>2012-05-12 16:40:45 -0400
committerDavid S. Miller <davem@davemloft.net>2012-05-12 16:44:22 -0400
commitc78896f00d0d0715c3043af2f3f4d098fc6ab6e4 (patch)
tree3a4e959c6fedb50eb10336f2a86821497ca19ff8 /arch/sparc
parent62875cff73fbb7c22bdb96e42d2e78cfe8464e06 (diff)
sparc32: drop unused code in process_32
It is commented out using #ifdef 0 / #endif, and has been so for a long time. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc')
-rw-r--r--arch/sparc/kernel/process_32.c82
1 files changed, 0 insertions, 82 deletions
diff --git a/arch/sparc/kernel/process_32.c b/arch/sparc/kernel/process_32.c
index bb23036c3228..fe6787cc62fc 100644
--- a/arch/sparc/kernel/process_32.c
+++ b/arch/sparc/kernel/process_32.c
@@ -145,88 +145,6 @@ void machine_power_off(void)
145 machine_halt(); 145 machine_halt();
146} 146}
147 147
148#if 0
149
150static DEFINE_SPINLOCK(sparc_backtrace_lock);
151
152void __show_backtrace(unsigned long fp)
153{
154 struct reg_window32 *rw;
155 unsigned long flags;
156 int cpu = smp_processor_id();
157
158 spin_lock_irqsave(&sparc_backtrace_lock, flags);
159
160 rw = (struct reg_window32 *)fp;
161 while(rw && (((unsigned long) rw) >= PAGE_OFFSET) &&
162 !(((unsigned long) rw) & 0x7)) {
163 printk("CPU[%d]: ARGS[%08lx,%08lx,%08lx,%08lx,%08lx,%08lx] "
164 "FP[%08lx] CALLER[%08lx]: ", cpu,
165 rw->ins[0], rw->ins[1], rw->ins[2], rw->ins[3],
166 rw->ins[4], rw->ins[5],
167 rw->ins[6],
168 rw->ins[7]);
169 printk("%pS\n", (void *) rw->ins[7]);
170 rw = (struct reg_window32 *) rw->ins[6];
171 }
172 spin_unlock_irqrestore(&sparc_backtrace_lock, flags);
173}
174
175#define __SAVE __asm__ __volatile__("save %sp, -0x40, %sp\n\t")
176#define __RESTORE __asm__ __volatile__("restore %g0, %g0, %g0\n\t")
177#define __GET_FP(fp) __asm__ __volatile__("mov %%i6, %0" : "=r" (fp))
178
179void show_backtrace(void)
180{
181 unsigned long fp;
182
183 __SAVE; __SAVE; __SAVE; __SAVE;
184 __SAVE; __SAVE; __SAVE; __SAVE;
185 __RESTORE; __RESTORE; __RESTORE; __RESTORE;
186 __RESTORE; __RESTORE; __RESTORE; __RESTORE;
187
188 __GET_FP(fp);
189
190 __show_backtrace(fp);
191}
192
193#ifdef CONFIG_SMP
194void smp_show_backtrace_all_cpus(void)
195{
196 xc0((smpfunc_t) show_backtrace);
197 show_backtrace();
198}
199#endif
200
201void show_stackframe(struct sparc_stackf *sf)
202{
203 unsigned long size;
204 unsigned long *stk;
205 int i;
206
207 printk("l0: %08lx l1: %08lx l2: %08lx l3: %08lx "
208 "l4: %08lx l5: %08lx l6: %08lx l7: %08lx\n",
209 sf->locals[0], sf->locals[1], sf->locals[2], sf->locals[3],
210 sf->locals[4], sf->locals[5], sf->locals[6], sf->locals[7]);
211 printk("i0: %08lx i1: %08lx i2: %08lx i3: %08lx "
212 "i4: %08lx i5: %08lx fp: %08lx i7: %08lx\n",
213 sf->ins[0], sf->ins[1], sf->ins[2], sf->ins[3],
214 sf->ins[4], sf->ins[5], (unsigned long)sf->fp, sf->callers_pc);
215 printk("sp: %08lx x0: %08lx x1: %08lx x2: %08lx "
216 "x3: %08lx x4: %08lx x5: %08lx xx: %08lx\n",
217 (unsigned long)sf->structptr, sf->xargs[0], sf->xargs[1],
218 sf->xargs[2], sf->xargs[3], sf->xargs[4], sf->xargs[5],
219 sf->xxargs[0]);
220 size = ((unsigned long)sf->fp) - ((unsigned long)sf);
221 size -= STACKFRAME_SZ;
222 stk = (unsigned long *)((unsigned long)sf + STACKFRAME_SZ);
223 i = 0;
224 do {
225 printk("s%d: %08lx\n", i++, *stk++);
226 } while ((size -= sizeof(unsigned long)));
227}
228#endif
229
230void show_regs(struct pt_regs *r) 148void show_regs(struct pt_regs *r)
231{ 149{
232 struct reg_window32 *rw = (struct reg_window32 *) r->u_regs[14]; 150 struct reg_window32 *rw = (struct reg_window32 *) r->u_regs[14];