summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-dbs/mysql/mariadb/0001-Ensure-compatibility-with-ARMv9-by-updating-.arch-di.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-dbs/mysql/mariadb/0001-Ensure-compatibility-with-ARMv9-by-updating-.arch-di.patch')
-rw-r--r--meta-oe/recipes-dbs/mysql/mariadb/0001-Ensure-compatibility-with-ARMv9-by-updating-.arch-di.patch41
1 files changed, 41 insertions, 0 deletions
diff --git a/meta-oe/recipes-dbs/mysql/mariadb/0001-Ensure-compatibility-with-ARMv9-by-updating-.arch-di.patch b/meta-oe/recipes-dbs/mysql/mariadb/0001-Ensure-compatibility-with-ARMv9-by-updating-.arch-di.patch
new file mode 100644
index 0000000000..2a1c74a68c
--- /dev/null
+++ b/meta-oe/recipes-dbs/mysql/mariadb/0001-Ensure-compatibility-with-ARMv9-by-updating-.arch-di.patch
@@ -0,0 +1,41 @@
1From 0b1ba174bd5148c0675b335fcebde767a56e10bb Mon Sep 17 00:00:00 2001
2From: Ruiqiang Hao <Ruiqiang.Hao@windriver.com>
3Date: Mon, 2 Dec 2024 02:18:46 +0000
4Subject: [PATCH] Ensure compatibility with ARMv9 by updating .arch directive
5
6The pmem_cvap() function currently uses the '.arch armv8.2-a' directive
7for the 'dc cvap' instruction. This will cause build errors below when
8compiling for ARMv9 systems. Update the '.arch' directive to 'armv9.4-a'
9to ensure compatibility with ARMv9 architectures.
10
11{standard input}: Assembler messages:
12{standard input}:169: Error: selected processor does not support `retaa'
13{standard input}:286: Error: selected processor does not support `retaa'
14make[2]: *** [storage/innobase/CMakeFiles/innobase_embedded.dir/build.make:
151644: storage/innobase/CMakeFiles/innobase_embedded.dir/sync/cache.cc.o]
16Error 1
17
18Upstream-Status: Submitted
19
20Signed-off-by: Ruiqiang Hao <Ruiqiang.Hao@windriver.com>
21---
22 storage/innobase/sync/cache.cc | 5 +++++
23 1 file changed, 5 insertions(+)
24
25diff --git a/storage/innobase/sync/cache.cc b/storage/innobase/sync/cache.cc
26index 43d642d0..c5e67709 100644
27--- a/storage/innobase/sync/cache.cc
28+++ b/storage/innobase/sync/cache.cc
29@@ -82,7 +82,12 @@ static void pmem_cvap(const void* buf, size_t size)
30 for (uintptr_t u= uintptr_t(buf) & ~(CPU_LEVEL1_DCACHE_LINESIZE),
31 end= uintptr_t(buf) + size;
32 u < end; u+= CPU_LEVEL1_DCACHE_LINESIZE)
33+#if defined __ARM_ARCH && __ARM_ARCH == 9
34+ __asm__ __volatile__(".arch armv9.4-a\n dc cvap, %0" :: "r"(u) : "memory");
35+#else
36 __asm__ __volatile__(".arch armv8.2-a\n dc cvap, %0" :: "r"(u) : "memory");
37+#endif
38+
39 __asm__ __volatile__("dmb ishst" ::: "memory");
40 }
41