diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-24 00:00:21 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-24 00:00:21 -0500 |
commit | 85b80ebfa4384b8ea30cc1af9617db30319a9ccd (patch) | |
tree | d601c0faf36b0ca4cda607ecfec892c73ca41bc1 /arch/sparc64/kernel/process.c | |
parent | 038eb0ea04b245351be34b0ae76b55eee4603989 (diff) | |
parent | 89c94f2f70d093f59b55d3ea8042d13889169346 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
[SPARC64]: make IOMMU code respect the segment boundary limits
[SPARC64]: Fix cpu trampoline et al. mismatch warnings.
[SPARC64]: More sparse warning fixes in process.c
[SPARC64]: Fix sparse warning wrt. fault_in_user_windows.
[SPARC64]: Kill show_regs32().
[SPARC64]: Fix sparse warnings wrt. __show_regs().
[SPARC64]: Kill show_stackframe{,32}().
[SPARC64]: Fix sparse warnings wrt. machine_alt_power_off().
Diffstat (limited to 'arch/sparc64/kernel/process.c')
-rw-r--r-- | arch/sparc64/kernel/process.c | 77 |
1 files changed, 3 insertions, 74 deletions
diff --git a/arch/sparc64/kernel/process.c b/arch/sparc64/kernel/process.c index 6eceac51ae62..2aafce7dfc0e 100644 --- a/arch/sparc64/kernel/process.c +++ b/arch/sparc64/kernel/process.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/tick.h> | 30 | #include <linux/tick.h> |
31 | #include <linux/init.h> | 31 | #include <linux/init.h> |
32 | #include <linux/cpu.h> | 32 | #include <linux/cpu.h> |
33 | #include <linux/elfcore.h> | ||
33 | 34 | ||
34 | #include <asm/oplib.h> | 35 | #include <asm/oplib.h> |
35 | #include <asm/uaccess.h> | 36 | #include <asm/uaccess.h> |
@@ -47,6 +48,8 @@ | |||
47 | #include <asm/unistd.h> | 48 | #include <asm/unistd.h> |
48 | #include <asm/hypervisor.h> | 49 | #include <asm/hypervisor.h> |
49 | #include <asm/sstate.h> | 50 | #include <asm/sstate.h> |
51 | #include <asm/reboot.h> | ||
52 | #include <asm/syscalls.h> | ||
50 | 53 | ||
51 | /* #define VERBOSE_SHOWREGS */ | 54 | /* #define VERBOSE_SHOWREGS */ |
52 | 55 | ||
@@ -211,62 +214,6 @@ static void show_regwindow(struct pt_regs *regs) | |||
211 | print_symbol("I7: <%s>\n", rwk->ins[7]); | 214 | print_symbol("I7: <%s>\n", rwk->ins[7]); |
212 | } | 215 | } |
213 | 216 | ||
214 | void show_stackframe(struct sparc_stackf *sf) | ||
215 | { | ||
216 | unsigned long size; | ||
217 | unsigned long *stk; | ||
218 | int i; | ||
219 | |||
220 | printk("l0: %016lx l1: %016lx l2: %016lx l3: %016lx\n" | ||
221 | "l4: %016lx l5: %016lx l6: %016lx l7: %016lx\n", | ||
222 | sf->locals[0], sf->locals[1], sf->locals[2], sf->locals[3], | ||
223 | sf->locals[4], sf->locals[5], sf->locals[6], sf->locals[7]); | ||
224 | printk("i0: %016lx i1: %016lx i2: %016lx i3: %016lx\n" | ||
225 | "i4: %016lx i5: %016lx fp: %016lx ret_pc: %016lx\n", | ||
226 | sf->ins[0], sf->ins[1], sf->ins[2], sf->ins[3], | ||
227 | sf->ins[4], sf->ins[5], (unsigned long)sf->fp, sf->callers_pc); | ||
228 | printk("sp: %016lx x0: %016lx x1: %016lx x2: %016lx\n" | ||
229 | "x3: %016lx x4: %016lx x5: %016lx xx: %016lx\n", | ||
230 | (unsigned long)sf->structptr, sf->xargs[0], sf->xargs[1], | ||
231 | sf->xargs[2], sf->xargs[3], sf->xargs[4], sf->xargs[5], | ||
232 | sf->xxargs[0]); | ||
233 | size = ((unsigned long)sf->fp) - ((unsigned long)sf); | ||
234 | size -= STACKFRAME_SZ; | ||
235 | stk = (unsigned long *)((unsigned long)sf + STACKFRAME_SZ); | ||
236 | i = 0; | ||
237 | do { | ||
238 | printk("s%d: %016lx\n", i++, *stk++); | ||
239 | } while ((size -= sizeof(unsigned long))); | ||
240 | } | ||
241 | |||
242 | void show_stackframe32(struct sparc_stackf32 *sf) | ||
243 | { | ||
244 | unsigned long size; | ||
245 | unsigned *stk; | ||
246 | int i; | ||
247 | |||
248 | printk("l0: %08x l1: %08x l2: %08x l3: %08x\n", | ||
249 | sf->locals[0], sf->locals[1], sf->locals[2], sf->locals[3]); | ||
250 | printk("l4: %08x l5: %08x l6: %08x l7: %08x\n", | ||
251 | sf->locals[4], sf->locals[5], sf->locals[6], sf->locals[7]); | ||
252 | printk("i0: %08x i1: %08x i2: %08x i3: %08x\n", | ||
253 | sf->ins[0], sf->ins[1], sf->ins[2], sf->ins[3]); | ||
254 | printk("i4: %08x i5: %08x fp: %08x ret_pc: %08x\n", | ||
255 | sf->ins[4], sf->ins[5], sf->fp, sf->callers_pc); | ||
256 | printk("sp: %08x x0: %08x x1: %08x x2: %08x\n" | ||
257 | "x3: %08x x4: %08x x5: %08x xx: %08x\n", | ||
258 | sf->structptr, sf->xargs[0], sf->xargs[1], | ||
259 | sf->xargs[2], sf->xargs[3], sf->xargs[4], sf->xargs[5], | ||
260 | sf->xxargs[0]); | ||
261 | size = ((unsigned long)sf->fp) - ((unsigned long)sf); | ||
262 | size -= STACKFRAME32_SZ; | ||
263 | stk = (unsigned *)((unsigned long)sf + STACKFRAME32_SZ); | ||
264 | i = 0; | ||
265 | do { | ||
266 | printk("s%d: %08x\n", i++, *stk++); | ||
267 | } while ((size -= sizeof(unsigned))); | ||
268 | } | ||
269 | |||
270 | #ifdef CONFIG_SMP | 217 | #ifdef CONFIG_SMP |
271 | static DEFINE_SPINLOCK(regdump_lock); | 218 | static DEFINE_SPINLOCK(regdump_lock); |
272 | #endif | 219 | #endif |
@@ -354,24 +301,6 @@ void show_regs(struct pt_regs *regs) | |||
354 | #endif | 301 | #endif |
355 | } | 302 | } |
356 | 303 | ||
357 | void show_regs32(struct pt_regs32 *regs) | ||
358 | { | ||
359 | printk("PSR: %08x PC: %08x NPC: %08x Y: %08x %s\n", regs->psr, | ||
360 | regs->pc, regs->npc, regs->y, print_tainted()); | ||
361 | printk("g0: %08x g1: %08x g2: %08x g3: %08x ", | ||
362 | regs->u_regs[0], regs->u_regs[1], regs->u_regs[2], | ||
363 | regs->u_regs[3]); | ||
364 | printk("g4: %08x g5: %08x g6: %08x g7: %08x\n", | ||
365 | regs->u_regs[4], regs->u_regs[5], regs->u_regs[6], | ||
366 | regs->u_regs[7]); | ||
367 | printk("o0: %08x o1: %08x o2: %08x o3: %08x ", | ||
368 | regs->u_regs[8], regs->u_regs[9], regs->u_regs[10], | ||
369 | regs->u_regs[11]); | ||
370 | printk("o4: %08x o5: %08x sp: %08x ret_pc: %08x\n", | ||
371 | regs->u_regs[12], regs->u_regs[13], regs->u_regs[14], | ||
372 | regs->u_regs[15]); | ||
373 | } | ||
374 | |||
375 | unsigned long thread_saved_pc(struct task_struct *tsk) | 304 | unsigned long thread_saved_pc(struct task_struct *tsk) |
376 | { | 305 | { |
377 | struct thread_info *ti = task_thread_info(tsk); | 306 | struct thread_info *ti = task_thread_info(tsk); |