diff options
-rw-r--r-- | meta-oe/recipes-dbs/rocksdb/files/mips.patch | 19 | ||||
-rw-r--r-- | meta-oe/recipes-dbs/rocksdb/rocksdb_6.20.3.bb | 1 |
2 files changed, 20 insertions, 0 deletions
diff --git a/meta-oe/recipes-dbs/rocksdb/files/mips.patch b/meta-oe/recipes-dbs/rocksdb/files/mips.patch new file mode 100644 index 000000000..db2305d29 --- /dev/null +++ b/meta-oe/recipes-dbs/rocksdb/files/mips.patch | |||
@@ -0,0 +1,19 @@ | |||
1 | implement timer implementation for mips platform | ||
2 | |||
3 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
4 | --- a/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h | ||
5 | +++ b/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h | ||
6 | @@ -155,7 +155,12 @@ static inline tokutime_t toku_time_now(v | ||
7 | __asm __volatile__("rdcycle %0" : "=r"(result)); | ||
8 | return result; | ||
9 | #endif | ||
10 | - | ||
11 | +#elif defined(__mips__) | ||
12 | + // mips apparently only allows rdtsc for superusers, so we fall | ||
13 | + // back to gettimeofday. It's possible clock_gettime would be better. | ||
14 | + struct timeval tv; | ||
15 | + gettimeofday(&tv, nullptr); | ||
16 | + return (uint64_t)tv.tv_sec * 1000000 + tv.tv_usec; | ||
17 | #else | ||
18 | #error No timer implementation for this platform | ||
19 | #endif | ||
diff --git a/meta-oe/recipes-dbs/rocksdb/rocksdb_6.20.3.bb b/meta-oe/recipes-dbs/rocksdb/rocksdb_6.20.3.bb index d03d0c952..6516edade 100644 --- a/meta-oe/recipes-dbs/rocksdb/rocksdb_6.20.3.bb +++ b/meta-oe/recipes-dbs/rocksdb/rocksdb_6.20.3.bb | |||
@@ -16,6 +16,7 @@ SRC_URI = "git://github.com/facebook/${BPN}.git;branch=${SRCBRANCH} \ | |||
16 | file://0001-jemalloc_helper-Limit-the-mm_malloc.h-hack-to-glibc-.patch \ | 16 | file://0001-jemalloc_helper-Limit-the-mm_malloc.h-hack-to-glibc-.patch \ |
17 | file://0001-range_tree-Implement-toku_time_now-for-rv32-rv64-in-.patch \ | 17 | file://0001-range_tree-Implement-toku_time_now-for-rv32-rv64-in-.patch \ |
18 | file://ppc64.patch \ | 18 | file://ppc64.patch \ |
19 | file://mips.patch \ | ||
19 | " | 20 | " |
20 | 21 | ||
21 | S = "${WORKDIR}/git" | 22 | S = "${WORKDIR}/git" |