From 63104c06a9eddf53f88f6d16196bb036c62967b2 Mon Sep 17 00:00:00 2001 From: Stefan Kristiansson Date: Mon, 3 Nov 2014 14:28:14 +0200 Subject: 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 [shorne@gmail.com: Added delay slot pc adjust logic] Signed-off-by: Stafford Horne --- arch/openrisc/kernel/process.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'arch/openrisc/kernel/process.c') 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; -- cgit