diff options
author | Stuart Menefy <stuart.menefy@st.com> | 2007-11-30 02:12:36 -0500 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2008-01-27 23:18:58 -0500 |
commit | 1efe4ce3ca126da77e450d5a83f7201949d76f62 (patch) | |
tree | fbae9902aa4103a9e86d06f841d580f24682e7b3 /arch/sh/kernel/process_32.c | |
parent | 53ff09422e5e7a6d6198b767c8f494e43ec8e3ae (diff) |
sh: GUSA atomic rollback support.
This implements kernel-level atomic rollback built on top of gUSA,
as an alternative non-IRQ based atomicity method. This is generally
a faster method for platforms that are lacking the LL/SC pairs that
SH-4A and later use, and is only supportable on legacy cores.
Signed-off-by: Stuart Menefy <stuart.menefy@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel/process_32.c')
-rw-r--r-- | arch/sh/kernel/process_32.c | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/arch/sh/kernel/process_32.c b/arch/sh/kernel/process_32.c index b48324867eee..9ab1926b9d10 100644 --- a/arch/sh/kernel/process_32.c +++ b/arch/sh/kernel/process_32.c | |||
@@ -322,25 +322,6 @@ struct task_struct *__switch_to(struct task_struct *prev, | |||
322 | unlazy_fpu(prev, task_pt_regs(prev)); | 322 | unlazy_fpu(prev, task_pt_regs(prev)); |
323 | #endif | 323 | #endif |
324 | 324 | ||
325 | #if defined(CONFIG_GUSA) && defined(CONFIG_PREEMPT) | ||
326 | { | ||
327 | struct pt_regs *regs; | ||
328 | |||
329 | preempt_disable(); | ||
330 | regs = task_pt_regs(prev); | ||
331 | if (user_mode(regs) && regs->regs[15] >= 0xc0000000) { | ||
332 | int offset = (int)regs->regs[15]; | ||
333 | |||
334 | /* Reset stack pointer: clear critical region mark */ | ||
335 | regs->regs[15] = regs->regs[1]; | ||
336 | if (regs->pc < regs->regs[0]) | ||
337 | /* Go to rewind point */ | ||
338 | regs->pc = regs->regs[0] + offset; | ||
339 | } | ||
340 | preempt_enable_no_resched(); | ||
341 | } | ||
342 | #endif | ||
343 | |||
344 | #ifdef CONFIG_MMU | 325 | #ifdef CONFIG_MMU |
345 | /* | 326 | /* |
346 | * Restore the kernel mode register | 327 | * Restore the kernel mode register |