diff options
author | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
---|---|---|
committer | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
commit | ada47b5fe13d89735805b566185f4885f5a3f750 (patch) | |
tree | 644b88f8a71896307d71438e9b3af49126ffb22b /arch/sh/kernel/process_64.c | |
parent | 43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff) | |
parent | 3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff) |
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'arch/sh/kernel/process_64.c')
-rw-r--r-- | arch/sh/kernel/process_64.c | 43 |
1 files changed, 8 insertions, 35 deletions
diff --git a/arch/sh/kernel/process_64.c b/arch/sh/kernel/process_64.c index 1192398ef582..d4ca6480e355 100644 --- a/arch/sh/kernel/process_64.c +++ b/arch/sh/kernel/process_64.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/fs.h> | 21 | #include <linux/fs.h> |
22 | #include <linux/ptrace.h> | 22 | #include <linux/ptrace.h> |
23 | #include <linux/reboot.h> | 23 | #include <linux/reboot.h> |
24 | #include <linux/slab.h> | ||
24 | #include <linux/init.h> | 25 | #include <linux/init.h> |
25 | #include <linux/module.h> | 26 | #include <linux/module.h> |
26 | #include <linux/io.h> | 27 | #include <linux/io.h> |
@@ -32,30 +33,7 @@ | |||
32 | 33 | ||
33 | struct task_struct *last_task_used_math = NULL; | 34 | struct task_struct *last_task_used_math = NULL; |
34 | 35 | ||
35 | void machine_restart(char * __unused) | 36 | void show_regs(struct pt_regs *regs) |
36 | { | ||
37 | extern void phys_stext(void); | ||
38 | |||
39 | phys_stext(); | ||
40 | } | ||
41 | |||
42 | void machine_halt(void) | ||
43 | { | ||
44 | for (;;); | ||
45 | } | ||
46 | |||
47 | void machine_power_off(void) | ||
48 | { | ||
49 | __asm__ __volatile__ ( | ||
50 | "sleep\n\t" | ||
51 | "synci\n\t" | ||
52 | "nop;nop;nop;nop\n\t" | ||
53 | ); | ||
54 | |||
55 | panic("Unexpected wakeup!\n"); | ||
56 | } | ||
57 | |||
58 | void show_regs(struct pt_regs * regs) | ||
59 | { | 37 | { |
60 | unsigned long long ah, al, bh, bl, ch, cl; | 38 | unsigned long long ah, al, bh, bl, ch, cl; |
61 | 39 | ||
@@ -335,6 +313,7 @@ int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags) | |||
335 | return do_fork(flags | CLONE_VM | CLONE_UNTRACED, 0, | 313 | return do_fork(flags | CLONE_VM | CLONE_UNTRACED, 0, |
336 | ®s, 0, NULL, NULL); | 314 | ®s, 0, NULL, NULL); |
337 | } | 315 | } |
316 | EXPORT_SYMBOL(kernel_thread); | ||
338 | 317 | ||
339 | /* | 318 | /* |
340 | * Free current thread data structures etc.. | 319 | * Free current thread data structures etc.. |
@@ -367,7 +346,7 @@ void exit_thread(void) | |||
367 | void flush_thread(void) | 346 | void flush_thread(void) |
368 | { | 347 | { |
369 | 348 | ||
370 | /* Called by fs/exec.c (flush_old_exec) to remove traces of a | 349 | /* Called by fs/exec.c (setup_new_exec) to remove traces of a |
371 | * previously running executable. */ | 350 | * previously running executable. */ |
372 | #ifdef CONFIG_SH_FPU | 351 | #ifdef CONFIG_SH_FPU |
373 | if (last_task_used_math == current) { | 352 | if (last_task_used_math == current) { |
@@ -403,13 +382,13 @@ int dump_fpu(struct pt_regs *regs, elf_fpregset_t *fpu) | |||
403 | if (fpvalid) { | 382 | if (fpvalid) { |
404 | if (current == last_task_used_math) { | 383 | if (current == last_task_used_math) { |
405 | enable_fpu(); | 384 | enable_fpu(); |
406 | save_fpu(tsk, regs); | 385 | save_fpu(tsk); |
407 | disable_fpu(); | 386 | disable_fpu(); |
408 | last_task_used_math = 0; | 387 | last_task_used_math = 0; |
409 | regs->sr |= SR_FD; | 388 | regs->sr |= SR_FD; |
410 | } | 389 | } |
411 | 390 | ||
412 | memcpy(fpu, &tsk->thread.fpu.hard, sizeof(*fpu)); | 391 | memcpy(fpu, &tsk->thread.xstate->hardfpu, sizeof(*fpu)); |
413 | } | 392 | } |
414 | 393 | ||
415 | return fpvalid; | 394 | return fpvalid; |
@@ -417,6 +396,7 @@ int dump_fpu(struct pt_regs *regs, elf_fpregset_t *fpu) | |||
417 | return 0; /* Task didn't use the fpu at all. */ | 396 | return 0; /* Task didn't use the fpu at all. */ |
418 | #endif | 397 | #endif |
419 | } | 398 | } |
399 | EXPORT_SYMBOL(dump_fpu); | ||
420 | 400 | ||
421 | asmlinkage void ret_from_fork(void); | 401 | asmlinkage void ret_from_fork(void); |
422 | 402 | ||
@@ -429,7 +409,7 @@ int copy_thread(unsigned long clone_flags, unsigned long usp, | |||
429 | #ifdef CONFIG_SH_FPU | 409 | #ifdef CONFIG_SH_FPU |
430 | if(last_task_used_math == current) { | 410 | if(last_task_used_math == current) { |
431 | enable_fpu(); | 411 | enable_fpu(); |
432 | save_fpu(current, regs); | 412 | save_fpu(current); |
433 | disable_fpu(); | 413 | disable_fpu(); |
434 | last_task_used_math = NULL; | 414 | last_task_used_math = NULL; |
435 | regs->sr |= SR_FD; | 415 | regs->sr |= SR_FD; |
@@ -525,13 +505,6 @@ out: | |||
525 | return error; | 505 | return error; |
526 | } | 506 | } |
527 | 507 | ||
528 | /* | ||
529 | * These bracket the sleeping functions.. | ||
530 | */ | ||
531 | extern void interruptible_sleep_on(wait_queue_head_t *q); | ||
532 | |||
533 | #define mid_sched ((unsigned long) interruptible_sleep_on) | ||
534 | |||
535 | #ifdef CONFIG_FRAME_POINTER | 508 | #ifdef CONFIG_FRAME_POINTER |
536 | static int in_sh64_switch_to(unsigned long pc) | 509 | static int in_sh64_switch_to(unsigned long pc) |
537 | { | 510 | { |