diff options
Diffstat (limited to 'arch/sh/kernel/process_64.c')
-rw-r--r-- | arch/sh/kernel/process_64.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/arch/sh/kernel/process_64.c b/arch/sh/kernel/process_64.c index cff3b7dc9c56..046999b1d1af 100644 --- a/arch/sh/kernel/process_64.c +++ b/arch/sh/kernel/process_64.c | |||
@@ -623,6 +623,7 @@ extern void interruptible_sleep_on(wait_queue_head_t *q); | |||
623 | 623 | ||
624 | #define mid_sched ((unsigned long) interruptible_sleep_on) | 624 | #define mid_sched ((unsigned long) interruptible_sleep_on) |
625 | 625 | ||
626 | #ifdef CONFIG_FRAME_POINTER | ||
626 | static int in_sh64_switch_to(unsigned long pc) | 627 | static int in_sh64_switch_to(unsigned long pc) |
627 | { | 628 | { |
628 | extern char __sh64_switch_to_end; | 629 | extern char __sh64_switch_to_end; |
@@ -631,12 +632,10 @@ static int in_sh64_switch_to(unsigned long pc) | |||
631 | return (pc >= (unsigned long) sh64_switch_to) && | 632 | return (pc >= (unsigned long) sh64_switch_to) && |
632 | (pc < (unsigned long) &__sh64_switch_to_end); | 633 | (pc < (unsigned long) &__sh64_switch_to_end); |
633 | } | 634 | } |
635 | #endif | ||
634 | 636 | ||
635 | unsigned long get_wchan(struct task_struct *p) | 637 | unsigned long get_wchan(struct task_struct *p) |
636 | { | 638 | { |
637 | unsigned long schedule_fp; | ||
638 | unsigned long sh64_switch_to_fp; | ||
639 | unsigned long schedule_caller_pc; | ||
640 | unsigned long pc; | 639 | unsigned long pc; |
641 | 640 | ||
642 | if (!p || p == current || p->state == TASK_RUNNING) | 641 | if (!p || p == current || p->state == TASK_RUNNING) |
@@ -649,6 +648,10 @@ unsigned long get_wchan(struct task_struct *p) | |||
649 | 648 | ||
650 | #ifdef CONFIG_FRAME_POINTER | 649 | #ifdef CONFIG_FRAME_POINTER |
651 | if (in_sh64_switch_to(pc)) { | 650 | if (in_sh64_switch_to(pc)) { |
651 | unsigned long schedule_fp; | ||
652 | unsigned long sh64_switch_to_fp; | ||
653 | unsigned long schedule_caller_pc; | ||
654 | |||
652 | sh64_switch_to_fp = (long) p->thread.sp; | 655 | sh64_switch_to_fp = (long) p->thread.sp; |
653 | /* r14 is saved at offset 4 in the sh64_switch_to frame */ | 656 | /* r14 is saved at offset 4 in the sh64_switch_to frame */ |
654 | schedule_fp = *(unsigned long *) (long)(sh64_switch_to_fp + 4); | 657 | schedule_fp = *(unsigned long *) (long)(sh64_switch_to_fp + 4); |