summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorPeter Bergin <peter@berginkonsult.se>2020-11-11 23:15:02 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-11-13 14:32:00 +0000
commit361c1fb8112c2c6cc74bea7787c612f02bde028e (patch)
treef24ede72b0b4284601a02e41ecd4bed565ede9fe /meta
parent345b5cf15507889ce6da4475b6fa373a784bd7c4 (diff)
downloadpoky-361c1fb8112c2c6cc74bea7787c612f02bde028e.tar.gz
rt-tests: backport patch that enable build for all archs
Upstream rt-tests has applied a patch that allow builds for all archs. The problem is that oslat using frc() that is not present for all archs. With this backported patch oslat is building but in run-time an error message is dumped if frc() is not present. (From OE-Core rev: bf5b9c531e0b5199b3d406e73d5592f215f482ce) Signed-off-by: Peter Bergin <peter@berginkonsult.se> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-rt/rt-tests/files/0001-rt-tests-oslat-Allow-build-for-not-supported-archs.patch52
-rw-r--r--meta/recipes-rt/rt-tests/rt-tests_1.9.bb1
2 files changed, 53 insertions, 0 deletions
diff --git a/meta/recipes-rt/rt-tests/files/0001-rt-tests-oslat-Allow-build-for-not-supported-archs.patch b/meta/recipes-rt/rt-tests/files/0001-rt-tests-oslat-Allow-build-for-not-supported-archs.patch
new file mode 100644
index 0000000000..1ee7539f7d
--- /dev/null
+++ b/meta/recipes-rt/rt-tests/files/0001-rt-tests-oslat-Allow-build-for-not-supported-archs.patch
@@ -0,0 +1,52 @@
1From 165b597e3003c6870f5980e8902014d9344e6cf3 Mon Sep 17 00:00:00 2001
2From: Peter Xu <peterx@redhat.com>
3Date: Thu, 1 Oct 2020 14:47:26 -0400
4Subject: [PATCH] rt-tests: oslat: Allow build for not supported archs
5
6Now rt-tests won't build for archs other than x86/i386/ppc64 after oslat is
7merged. Instead of failing the build, let's make it pass. However, whenever
8oslat is executed, instead of running the real program, dump an error message,
9so that people can try to implement the frc() function for it when there's a
10real need for the new arch.
11
12Upstream-Status: Backport [https://git.kernel.org/pub/scm/utils/rt-tests/rt-tests.git/commit/?id=165b597e3003c6870f5980e8902014d9344e6cf3]
13
14Signed-off-by: Peter Xu <peterx@redhat.com>
15Signed-off-by: John Kacur <jkacur@redhat.com>
16Signed-off-by: Peter Bergin <peter@berginkonsult.se>
17
18---
19 src/oslat/oslat.c | 10 +++++++++-
20 1 file changed, 9 insertions(+), 1 deletion(-)
21
22diff --git a/src/oslat/oslat.c b/src/oslat/oslat.c
23index f1a82f2..a8b6155 100644
24--- a/src/oslat/oslat.c
25+++ b/src/oslat/oslat.c
26@@ -69,7 +69,9 @@ static inline void frc(uint64_t *pval)
27 __asm__ __volatile__("mfspr %0, 268\n" : "=r" (*pval));
28 }
29 # else
30-# error Need frc() for this platform.
31+# define relax() do { } while (0)
32+# define frc(x)
33+# define FRC_MISSING
34 # endif
35 #else
36 # error Need to add support for this compiler.
37@@ -810,6 +812,12 @@ int main(int argc, char *argv[])
38 int i, n_cores;
39 cpu_set_t cpu_set;
40
41+#ifdef FRC_MISSING
42+ printf("This architecture is not yet supported. "
43+ "Please implement frc() function first for %s.\n", argv[0]);
44+ return 0;
45+#endif
46+
47 CPU_ZERO(&cpu_set);
48
49 g.app_name = argv[0];
50--
512.25.1
52
diff --git a/meta/recipes-rt/rt-tests/rt-tests_1.9.bb b/meta/recipes-rt/rt-tests/rt-tests_1.9.bb
index 1fe0bd5cfc..330b5090c6 100644
--- a/meta/recipes-rt/rt-tests/rt-tests_1.9.bb
+++ b/meta/recipes-rt/rt-tests/rt-tests_1.9.bb
@@ -12,6 +12,7 @@ SRC_URI += " \
12 file://run-ptest \ 12 file://run-ptest \
13 file://rt_bmark.py \ 13 file://rt_bmark.py \
14 file://0001-Makefile-Allow-for-CC-and-AR-to-be-overridden.patch \ 14 file://0001-Makefile-Allow-for-CC-and-AR-to-be-overridden.patch \
15 file://0001-rt-tests-oslat-Allow-build-for-not-supported-archs.patch \
15 " 16 "
16 17
17# rt-tests needs PI mutex support in libc 18# rt-tests needs PI mutex support in libc