diff options
Diffstat (limited to 'arch/sparc64/kernel/process.c')
-rw-r--r-- | arch/sparc64/kernel/process.c | 92 |
1 files changed, 3 insertions, 89 deletions
diff --git a/arch/sparc64/kernel/process.c b/arch/sparc64/kernel/process.c index 1b2379174988..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 | ||
@@ -113,16 +116,9 @@ void cpu_idle(void) | |||
113 | 116 | ||
114 | extern char reboot_command []; | 117 | extern char reboot_command []; |
115 | 118 | ||
116 | extern void (*prom_palette)(int); | ||
117 | extern void (*prom_keyboard)(void); | ||
118 | |||
119 | void machine_halt(void) | 119 | void machine_halt(void) |
120 | { | 120 | { |
121 | sstate_halt(); | 121 | sstate_halt(); |
122 | if (prom_palette) | ||
123 | prom_palette (1); | ||
124 | if (prom_keyboard) | ||
125 | prom_keyboard(); | ||
126 | prom_halt(); | 122 | prom_halt(); |
127 | panic("Halt failed!"); | 123 | panic("Halt failed!"); |
128 | } | 124 | } |
@@ -130,10 +126,6 @@ void machine_halt(void) | |||
130 | void machine_alt_power_off(void) | 126 | void machine_alt_power_off(void) |
131 | { | 127 | { |
132 | sstate_poweroff(); | 128 | sstate_poweroff(); |
133 | if (prom_palette) | ||
134 | prom_palette(1); | ||
135 | if (prom_keyboard) | ||
136 | prom_keyboard(); | ||
137 | prom_halt_power_off(); | 129 | prom_halt_power_off(); |
138 | panic("Power-off failed!"); | 130 | panic("Power-off failed!"); |
139 | } | 131 | } |
@@ -145,10 +137,6 @@ void machine_restart(char * cmd) | |||
145 | sstate_reboot(); | 137 | sstate_reboot(); |
146 | p = strchr (reboot_command, '\n'); | 138 | p = strchr (reboot_command, '\n'); |
147 | if (p) *p = 0; | 139 | if (p) *p = 0; |
148 | if (prom_palette) | ||
149 | prom_palette (1); | ||
150 | if (prom_keyboard) | ||
151 | prom_keyboard(); | ||
152 | if (cmd) | 140 | if (cmd) |
153 | prom_reboot(cmd); | 141 | prom_reboot(cmd); |
154 | if (*reboot_command) | 142 | if (*reboot_command) |
@@ -226,62 +214,6 @@ static void show_regwindow(struct pt_regs *regs) | |||
226 | print_symbol("I7: <%s>\n", rwk->ins[7]); | 214 | print_symbol("I7: <%s>\n", rwk->ins[7]); |
227 | } | 215 | } |
228 | 216 | ||
229 | void show_stackframe(struct sparc_stackf *sf) | ||
230 | { | ||
231 | unsigned long size; | ||
232 | unsigned long *stk; | ||
233 | int i; | ||
234 | |||
235 | printk("l0: %016lx l1: %016lx l2: %016lx l3: %016lx\n" | ||
236 | "l4: %016lx l5: %016lx l6: %016lx l7: %016lx\n", | ||
237 | sf->locals[0], sf->locals[1], sf->locals[2], sf->locals[3], | ||
238 | sf->locals[4], sf->locals[5], sf->locals[6], sf->locals[7]); | ||
239 | printk("i0: %016lx i1: %016lx i2: %016lx i3: %016lx\n" | ||
240 | "i4: %016lx i5: %016lx fp: %016lx ret_pc: %016lx\n", | ||
241 | sf->ins[0], sf->ins[1], sf->ins[2], sf->ins[3], | ||
242 | sf->ins[4], sf->ins[5], (unsigned long)sf->fp, sf->callers_pc); | ||
243 | printk("sp: %016lx x0: %016lx x1: %016lx x2: %016lx\n" | ||
244 | "x3: %016lx x4: %016lx x5: %016lx xx: %016lx\n", | ||
245 | (unsigned long)sf->structptr, sf->xargs[0], sf->xargs[1], | ||
246 | sf->xargs[2], sf->xargs[3], sf->xargs[4], sf->xargs[5], | ||
247 | sf->xxargs[0]); | ||
248 | size = ((unsigned long)sf->fp) - ((unsigned long)sf); | ||
249 | size -= STACKFRAME_SZ; | ||
250 | stk = (unsigned long *)((unsigned long)sf + STACKFRAME_SZ); | ||
251 | i = 0; | ||
252 | do { | ||
253 | printk("s%d: %016lx\n", i++, *stk++); | ||
254 | } while ((size -= sizeof(unsigned long))); | ||
255 | } | ||
256 | |||
257 | void show_stackframe32(struct sparc_stackf32 *sf) | ||
258 | { | ||
259 | unsigned long size; | ||
260 | unsigned *stk; | ||
261 | int i; | ||
262 | |||
263 | printk("l0: %08x l1: %08x l2: %08x l3: %08x\n", | ||
264 | sf->locals[0], sf->locals[1], sf->locals[2], sf->locals[3]); | ||
265 | printk("l4: %08x l5: %08x l6: %08x l7: %08x\n", | ||
266 | sf->locals[4], sf->locals[5], sf->locals[6], sf->locals[7]); | ||
267 | printk("i0: %08x i1: %08x i2: %08x i3: %08x\n", | ||
268 | sf->ins[0], sf->ins[1], sf->ins[2], sf->ins[3]); | ||
269 | printk("i4: %08x i5: %08x fp: %08x ret_pc: %08x\n", | ||
270 | sf->ins[4], sf->ins[5], sf->fp, sf->callers_pc); | ||
271 | printk("sp: %08x x0: %08x x1: %08x x2: %08x\n" | ||
272 | "x3: %08x x4: %08x x5: %08x xx: %08x\n", | ||
273 | sf->structptr, sf->xargs[0], sf->xargs[1], | ||
274 | sf->xargs[2], sf->xargs[3], sf->xargs[4], sf->xargs[5], | ||
275 | sf->xxargs[0]); | ||
276 | size = ((unsigned long)sf->fp) - ((unsigned long)sf); | ||
277 | size -= STACKFRAME32_SZ; | ||
278 | stk = (unsigned *)((unsigned long)sf + STACKFRAME32_SZ); | ||
279 | i = 0; | ||
280 | do { | ||
281 | printk("s%d: %08x\n", i++, *stk++); | ||
282 | } while ((size -= sizeof(unsigned))); | ||
283 | } | ||
284 | |||
285 | #ifdef CONFIG_SMP | 217 | #ifdef CONFIG_SMP |
286 | static DEFINE_SPINLOCK(regdump_lock); | 218 | static DEFINE_SPINLOCK(regdump_lock); |
287 | #endif | 219 | #endif |
@@ -369,24 +301,6 @@ void show_regs(struct pt_regs *regs) | |||
369 | #endif | 301 | #endif |
370 | } | 302 | } |
371 | 303 | ||
372 | void show_regs32(struct pt_regs32 *regs) | ||
373 | { | ||
374 | printk("PSR: %08x PC: %08x NPC: %08x Y: %08x %s\n", regs->psr, | ||
375 | regs->pc, regs->npc, regs->y, print_tainted()); | ||
376 | printk("g0: %08x g1: %08x g2: %08x g3: %08x ", | ||
377 | regs->u_regs[0], regs->u_regs[1], regs->u_regs[2], | ||
378 | regs->u_regs[3]); | ||
379 | printk("g4: %08x g5: %08x g6: %08x g7: %08x\n", | ||
380 | regs->u_regs[4], regs->u_regs[5], regs->u_regs[6], | ||
381 | regs->u_regs[7]); | ||
382 | printk("o0: %08x o1: %08x o2: %08x o3: %08x ", | ||
383 | regs->u_regs[8], regs->u_regs[9], regs->u_regs[10], | ||
384 | regs->u_regs[11]); | ||
385 | printk("o4: %08x o5: %08x sp: %08x ret_pc: %08x\n", | ||
386 | regs->u_regs[12], regs->u_regs[13], regs->u_regs[14], | ||
387 | regs->u_regs[15]); | ||
388 | } | ||
389 | |||
390 | unsigned long thread_saved_pc(struct task_struct *tsk) | 304 | unsigned long thread_saved_pc(struct task_struct *tsk) |
391 | { | 305 | { |
392 | struct thread_info *ti = task_thread_info(tsk); | 306 | struct thread_info *ti = task_thread_info(tsk); |