diff options
| -rw-r--r-- | meta/recipes-rt/rt-tests/files/0001-rt-tests-oslat-Allow-build-for-not-supported-archs.patch | 52 | ||||
| -rw-r--r-- | meta/recipes-rt/rt-tests/rt-tests_1.9.bb | 1 |
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 @@ | |||
| 1 | From 165b597e3003c6870f5980e8902014d9344e6cf3 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Peter Xu <peterx@redhat.com> | ||
| 3 | Date: Thu, 1 Oct 2020 14:47:26 -0400 | ||
| 4 | Subject: [PATCH] rt-tests: oslat: Allow build for not supported archs | ||
| 5 | |||
| 6 | Now rt-tests won't build for archs other than x86/i386/ppc64 after oslat is | ||
| 7 | merged. Instead of failing the build, let's make it pass. However, whenever | ||
| 8 | oslat is executed, instead of running the real program, dump an error message, | ||
| 9 | so that people can try to implement the frc() function for it when there's a | ||
| 10 | real need for the new arch. | ||
| 11 | |||
| 12 | Upstream-Status: Backport [https://git.kernel.org/pub/scm/utils/rt-tests/rt-tests.git/commit/?id=165b597e3003c6870f5980e8902014d9344e6cf3] | ||
| 13 | |||
| 14 | Signed-off-by: Peter Xu <peterx@redhat.com> | ||
| 15 | Signed-off-by: John Kacur <jkacur@redhat.com> | ||
| 16 | Signed-off-by: Peter Bergin <peter@berginkonsult.se> | ||
| 17 | |||
| 18 | --- | ||
| 19 | src/oslat/oslat.c | 10 +++++++++- | ||
| 20 | 1 file changed, 9 insertions(+), 1 deletion(-) | ||
| 21 | |||
| 22 | diff --git a/src/oslat/oslat.c b/src/oslat/oslat.c | ||
| 23 | index 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 | -- | ||
| 51 | 2.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 |
