summaryrefslogtreecommitdiffstats
path: root/arch/blackfin/mach-common
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2009-08-17 19:05:07 +0000
committerMike Frysinger <vapier@gentoo.org>2009-09-16 22:10:28 -0400
commit926494943b7d9dbc998adb298a92a708232ce46b (patch)
treeb5b0ea4b2635e94f7cf3f5fe3da276d99f82bbec /arch/blackfin/mach-common
parentdac981740f4b990eadf523b0900859f189dd2b4e (diff)
downloadblackbird-op-linux-926494943b7d9dbc998adb298a92a708232ce46b.tar.gz
blackbird-op-linux-926494943b7d9dbc998adb298a92a708232ce46b.zip
Blackfin: optimize fixed code handling for the most common case
The majority of the time we are returning to user space, it is not in the fixed atomic code region. So rather than branch to a function where we check the PC and return, do the check inline and branch only when needed. Also, tweak some of the fixed code handling based on assumptions we are aware of but cannot be expressed in C. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'arch/blackfin/mach-common')
-rw-r--r--arch/blackfin/mach-common/entry.S6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/blackfin/mach-common/entry.S b/arch/blackfin/mach-common/entry.S
index e7eb16355f74..a9b15aaf5254 100644
--- a/arch/blackfin/mach-common/entry.S
+++ b/arch/blackfin/mach-common/entry.S
@@ -1025,6 +1025,12 @@ ENTRY(_schedule_and_signal_from_int)
#endif
sti r0;
+ /* finish the userspace "atomic" functions for it */
+ r1 = FIXED_CODE_END;
+ r2 = [sp + PT_PC];
+ cc = r1 <= r2;
+ if cc jump .Lresume_userspace (bp);
+
r0 = sp;
sp += -12;
call _finish_atomic_sections;
OpenPOWER on IntegriCloud