aboutsummaryrefslogtreecommitdiffstats
path: root/arch/openrisc/kernel/process.c
diff options
context:
space:
mode:
authorStefan Kristiansson <stefan.kristiansson@saunalahti.fi>2014-11-03 14:28:14 +0200
committerStafford Horne <shorne@gmail.com>2017-02-06 21:50:43 +0900
commit63104c06a9eddf53f88f6d16196bb036c62967b2 (patch)
tree3f4bfcaa467d0546512602d5ad961e5f62f4e529 /arch/openrisc/kernel/process.c
parentopenrisc: head: refactor out tlb flush into it's own function (diff)
downloadlinux-dev-63104c06a9eddf53f88f6d16196bb036c62967b2.tar.xz
linux-dev-63104c06a9eddf53f88f6d16196bb036c62967b2.zip
openrisc: add l.lwa/l.swa emulation
This adds an emulation layer for implementations that lack the l.lwa and l.swa instructions. It handles these instructions both in kernel space and user space. Signed-off-by: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi> [shorne@gmail.com: Added delay slot pc adjust logic] Signed-off-by: Stafford Horne <shorne@gmail.com>
Diffstat (limited to 'arch/openrisc/kernel/process.c')
-rw-r--r--arch/openrisc/kernel/process.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/openrisc/kernel/process.c b/arch/openrisc/kernel/process.c
index d7990df9025a..c49350b200e1 100644
--- a/arch/openrisc/kernel/process.c
+++ b/arch/openrisc/kernel/process.c
@@ -226,6 +226,7 @@ int dump_fpu(struct pt_regs *regs, elf_fpregset_t * fpu)
extern struct thread_info *_switch(struct thread_info *old_ti,
struct thread_info *new_ti);
+extern int lwa_flag;
struct task_struct *__switch_to(struct task_struct *old,
struct task_struct *new)
@@ -243,6 +244,8 @@ struct task_struct *__switch_to(struct task_struct *old,
new_ti = new->stack;
old_ti = old->stack;
+ lwa_flag = 0;
+
current_thread_info_set[smp_processor_id()] = new_ti;
last = (_switch(old_ti, new_ti))->task;