summaryrefslogtreecommitdiffstats
path: root/arch/arc/kernel/process.c
diff options
context:
space:
mode:
authorVineet Gupta <vgupta@synopsys.com>2015-02-27 10:59:31 +0530
committerVineet Gupta <vgupta@synopsys.com>2015-02-27 10:59:34 +0530
commit3240dd57e533da94998029af6e17008a1806c665 (patch)
treef23ae90f1d3861c7f2d0dc8fb7a8c6b0c39c1948 /arch/arc/kernel/process.c
parent13648b0118a24f4fc76c34e6c7b6ccf447e46a2a (diff)
downloadop-kernel-dev-3240dd57e533da94998029af6e17008a1806c665.zip
op-kernel-dev-3240dd57e533da94998029af6e17008a1806c665.tar.gz
ARC: Fix thread_saved_pc()
The old implementation assumed that SP at the time of __switch_to() is right above pt_regs which is almost certainly not the case as there will be some stack build up between entry into kernel and leading up to __switch_to Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Diffstat (limited to 'arch/arc/kernel/process.c')
-rw-r--r--arch/arc/kernel/process.c23
1 files changed, 0 insertions, 23 deletions
diff --git a/arch/arc/kernel/process.c b/arch/arc/kernel/process.c
index fdd8971..98c00a2 100644
--- a/arch/arc/kernel/process.c
+++ b/arch/arc/kernel/process.c
@@ -192,29 +192,6 @@ int dump_fpu(struct pt_regs *regs, elf_fpregset_t *fpu)
return 0;
}
-/*
- * API: expected by schedular Code: If thread is sleeping where is that.
- * What is this good for? it will be always the scheduler or ret_from_fork.
- * So we hard code that anyways.
- */
-unsigned long thread_saved_pc(struct task_struct *t)
-{
- struct pt_regs *regs = task_pt_regs(t);
- unsigned long blink = 0;
-
- /*
- * If the thread being queried for in not itself calling this, then it
- * implies it is not executing, which in turn implies it is sleeping,
- * which in turn implies it got switched OUT by the schedular.
- * In that case, it's kernel mode blink can reliably retrieved as per
- * the picture above (right above pt_regs).
- */
- if (t != current && t->state != TASK_RUNNING)
- blink = *((unsigned int *)regs - 1);
-
- return blink;
-}
-
int elf_check_arch(const struct elf32_hdr *x)
{
unsigned int eflags;
OpenPOWER on IntegriCloud