summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/db/db
diff options
context:
space:
mode:
authorAndre McCurdy <armccurdy@gmail.com>2018-06-26 13:24:55 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-06-28 09:22:30 +0100
commit7aa94abac09be6beb7ce14a2b9a409e934465706 (patch)
treed1cb466a997e4636b7ecf75fabf98211be81c779 /meta/recipes-support/db/db
parent1a0ee6b0f194807b9eac1207c43ba3fae4d1f94c (diff)
downloadopenembedded-core-7aa94abac09be6beb7ce14a2b9a409e934465706.tar.gz
db: drop legacy ARM specific SWP based mutex optimisation
Although the ARM SWP instruction may exist for ARMv6 and above, it's not guaranteed to work, especially on SMP systems where it's use may lead to instability at runtime, etc: https://community.arm.com/processors/b/blog/posts/locks-swps-and-two-smoking-barriers Keeping the optimisation for architecture levels which pre-date SMP (ie <= ARMv5) may be safe, however other distros (Buildroot, Debian, Fedora, etc) are not doing so and mutex contention is likely to be less of an issue on uniprocessor systems anyway, so the benefits of this micro optimisations are not clear. Since OE uses ARMv5 qemu as a proxy for testing all 32bit ARM architecture levels, it's desirable to keep the ARMv5 builds aligned with later ARM architecture levels wherever possible. Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-support/db/db')
-rw-r--r--meta/recipes-support/db/db/arm-thumb-mutex_db5.patch50
1 files changed, 0 insertions, 50 deletions
diff --git a/meta/recipes-support/db/db/arm-thumb-mutex_db5.patch b/meta/recipes-support/db/db/arm-thumb-mutex_db5.patch
deleted file mode 100644
index 6a8eada605..0000000000
--- a/meta/recipes-support/db/db/arm-thumb-mutex_db5.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-Original patch submitted by jbowler@nslu2-linux.org on 2005-11-17:
-
-db: fix thumb uclibc operation in 4.3.29
- - uclibc thumb builds were using libpthread to implement mutexes, the
- - uclibc version seems to be a stub (at least on thumb). This commit
- - fixes the ARM/gcc-assembly mutex implementation so that it has thumb
- - support and the resultant db4 works (tested on LE Thumb uclibc)
-
-Upstream-Status: Inappropriate [embedded specific]
-
-Author: jbowler@nslu2-linux.org
-
-Index: db-6.0.30/src/dbinc/mutex_int.h
-===================================================================
---- db-6.0.30.orig/src/dbinc/mutex_int.h
-+++ db-6.0.30/src/dbinc/mutex_int.h
-@@ -474,6 +474,25 @@ typedef unsigned char tsl_t;
-
- #ifdef LOAD_ACTUAL_MUTEX_CODE
- /* gcc/arm: 0 is clear, 1 is set. */
-+#if defined __thumb__
-+#define MUTEX_SET(tsl) ({ \
-+ int __r, __p; \
-+ __asm__ volatile( \
-+ ".align 2\n\t" \
-+ "bx pc\n\t" \
-+ "nop\n\t" \
-+ ".arm\n\t" \
-+ "swpb %0, %2, [%3]\n\t" \
-+ "eor %0, %0, #1\n\t" \
-+ "orr %1, pc, #1\n\t" \
-+ "bx %1\n\t" \
-+ ".force_thumb" \
-+ : "=&r" (__r), "=r" (__p) \
-+ : "r" (1), "r" (tsl) \
-+ ); \
-+ __r & 1; \
-+})
-+#else
- #define MUTEX_SET(tsl) ({ \
- int __r; \
- __asm__ volatile( \
-@@ -484,6 +503,7 @@ typedef unsigned char tsl_t;
- ); \
- __r & 1; \
- })
-+#endif
-
- #define MUTEX_UNSET(tsl) (*(volatile tsl_t *)(tsl) = 0)
- #define MUTEX_INIT(tsl) (MUTEX_UNSET(tsl), 0)