summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-benchmark/libhugetlbfs/files/aarch64-unit-test-fixes.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-benchmark/libhugetlbfs/files/aarch64-unit-test-fixes.patch')
-rw-r--r--meta-oe/recipes-benchmark/libhugetlbfs/files/aarch64-unit-test-fixes.patch62
1 files changed, 62 insertions, 0 deletions
diff --git a/meta-oe/recipes-benchmark/libhugetlbfs/files/aarch64-unit-test-fixes.patch b/meta-oe/recipes-benchmark/libhugetlbfs/files/aarch64-unit-test-fixes.patch
new file mode 100644
index 0000000000..0b6fd8a303
--- /dev/null
+++ b/meta-oe/recipes-benchmark/libhugetlbfs/files/aarch64-unit-test-fixes.patch
@@ -0,0 +1,62 @@
1Upstream-Status: Pending
2
3From 9bb940bd6a86f09280bdcd48a7177a835d72a25c Mon Sep 17 00:00:00 2001
4From: Steve Capper <steve.capper@linaro.org>
5Date: Wed, 10 Apr 2013 15:52:46 +0100
6Subject: [PATCH] Aarch64 unit test fixes.
7
8On Aarch64, zero bytes are illegal instructions, this is added to
9the icache-hygiene test.
10
11In mremap-expand-slice-collision, if __LP64__ is defined then
12mappings are attempted at 1TB boundaries which are outside the
13allowable mmap region for Aarch64. For __aarch64__ we change this
14mapping back to 256MB slices.
15
16Signed-off-by: Steve Capper <steve.capper@linaro.org>
17---
18 tests/icache-hygiene.c | 7 ++++---
19 tests/mremap-expand-slice-collision.c | 2 +-
20 2 files changed, 5 insertions(+), 4 deletions(-)
21
22diff --git a/tests/icache-hygiene.c b/tests/icache-hygiene.c
23index 51792b3..876ce10 100644
24--- a/tests/icache-hygiene.c
25+++ b/tests/icache-hygiene.c
26@@ -54,7 +54,7 @@ static void cacheflush(void *p)
27 {
28 #if defined(__powerpc__)
29 asm volatile("dcbst 0,%0; sync; icbi 0,%0; isync" : : "r"(p));
30-#elif defined(__arm__)
31+#elif defined(__arm__) || defined(__aarch64__)
32 __clear_cache(p, p + COPY_SIZE);
33 #endif
34 }
35@@ -87,8 +87,9 @@ static void *sig_expected;
36 static void sig_handler(int signum, siginfo_t *si, void *uc)
37 {
38 #if defined(__powerpc__) || defined(__powerpc64__) || defined(__ia64__) || \
39- defined(__s390__) || defined(__s390x__) || defined(__sparc__)
40- /* On powerpc and ia64 and s390, 0 bytes are an illegal
41+ defined(__s390__) || defined(__s390x__) || defined(__sparc__) || \
42+ defined(__aarch64__)
43+ /* On powerpc, ia64, s390 and Aarch64, 0 bytes are an illegal
44 * instruction, so, if the icache is cleared properly, we SIGILL
45 * as soon as we jump into the cleared page */
46 if (signum == SIGILL) {
47diff --git a/tests/mremap-expand-slice-collision.c b/tests/mremap-expand-slice-collision.c
48index c25f4c6..853f3c3 100644
49--- a/tests/mremap-expand-slice-collision.c
50+++ b/tests/mremap-expand-slice-collision.c
51@@ -38,7 +38,7 @@ void init_slice_boundary(int fd)
52 unsigned long slice_size;
53 void *p1, *p2, *heap;
54 int slices_ok, i, rc;
55-#ifdef __LP64__
56+#if defined(__LP64__) && !defined(__aarch64__)
57 /* powerpc: 1TB slices starting at 1 TB */
58 slice_boundary = 0x10000000000;
59 slice_size = 0x10000000000;
60--
611.7.9.5
62