aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-blackfin/fixed_code.h
diff options
context:
space:
mode:
authorBernd Schmidt <bernd.schmidt@analog.com>2007-06-21 11:34:16 +0800
committerBryan Wu <bryan.wu@analog.com>2007-06-21 11:34:16 +0800
commit7adfb58fbd0a27469d26536f99b66391c4c8e2a0 (patch)
tree59e511ac2ddca77fe7c9d51bc6f6c6f0049a313b /include/asm-blackfin/fixed_code.h
parentBlackfin arch: new kernel config for BF548-EZKIT (diff)
downloadlinux-dev-7adfb58fbd0a27469d26536f99b66391c4c8e2a0.tar.xz
linux-dev-7adfb58fbd0a27469d26536f99b66391c4c8e2a0.zip
Blackfin arch: defines and provides entry points for certain user space functions at fixed addresses
This patch defines (and provides) entry points for certain user space functions at fixed addresses. The Blackfin has no usable atomic instructions, but we can ensure that these code sequences appear atomic from a user space point of view by detecting when we're in the process of executing them during the interrupt handler return path. This allows much more efficient pthread lock implementations than the bfin_spinlock syscall we're currently using. Also provided is a small sys_rt_sigreturn stub which can be used by the signal handler setup code. The signal.c part will be committed separately. Signed-off-by: Bernd Schmidt <bernd.schmidt@analog.com> Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Diffstat (limited to '')
-rw-r--r--include/asm-blackfin/fixed_code.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/asm-blackfin/fixed_code.h b/include/asm-blackfin/fixed_code.h
new file mode 100644
index 000000000000..e6df84ee1557
--- /dev/null
+++ b/include/asm-blackfin/fixed_code.h
@@ -0,0 +1,20 @@
+/* This file defines the fixed addresses where userspace programs can find
+ atomic code sequences. */
+
+#define FIXED_CODE_START 0x400
+
+#define SIGRETURN_STUB 0x400
+
+#define ATOMIC_SEQS_START 0x410
+
+#define ATOMIC_XCHG32 0x410
+#define ATOMIC_CAS32 0x420
+#define ATOMIC_ADD32 0x430
+#define ATOMIC_SUB32 0x440
+#define ATOMIC_IOR32 0x450
+#define ATOMIC_AND32 0x460
+#define ATOMIC_XOR32 0x470
+
+#define ATOMIC_SEQS_END 0x480
+
+#define FIXED_CODE_END 0x480