diff options
| author | Ingo Molnar <mingo@kernel.org> | 2014-04-14 10:44:42 -0400 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2014-04-14 10:44:42 -0400 |
| commit | 740c699a8d316c8bf8593f19e2ca47795e690622 (patch) | |
| tree | a78886955770a477945c5d84e06b2e7678733b54 /tools/testing | |
| parent | e69af4657e7764d03ad555f0b583d9c4217bcefa (diff) | |
| parent | c9eaa447e77efe77b7fa4c953bd62de8297fd6c5 (diff) | |
Merge tag 'v3.15-rc1' into perf/urgent
Pick up the latest fixes.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/testing')
11 files changed, 226 insertions, 1 deletions
diff --git a/tools/testing/ktest/examples/kvm.conf b/tools/testing/ktest/examples/kvm.conf index 831c7c5395f1..fbc134f9ac6e 100644 --- a/tools/testing/ktest/examples/kvm.conf +++ b/tools/testing/ktest/examples/kvm.conf | |||
| @@ -10,6 +10,10 @@ MACHINE = Guest | |||
| 10 | # Use virsh to read the serial console of the guest | 10 | # Use virsh to read the serial console of the guest |
| 11 | CONSOLE = virsh console ${MACHINE} | 11 | CONSOLE = virsh console ${MACHINE} |
| 12 | 12 | ||
| 13 | # Use SIGKILL to terminate virsh console. We can't kill virsh console | ||
| 14 | # by the default signal, SIGINT. | ||
| 15 | CLOSE_CONSOLE_SIGNAL = KILL | ||
| 16 | |||
| 13 | #*************************************# | 17 | #*************************************# |
| 14 | # This part is the same as test.conf # | 18 | # This part is the same as test.conf # |
| 15 | #*************************************# | 19 | #*************************************# |
diff --git a/tools/testing/selftests/powerpc/Makefile b/tools/testing/selftests/powerpc/Makefile index bd24ae5aaeab..316194f26ff4 100644 --- a/tools/testing/selftests/powerpc/Makefile +++ b/tools/testing/selftests/powerpc/Makefile | |||
| @@ -13,7 +13,7 @@ CFLAGS := -Wall -O2 -flto -Wall -Werror -DGIT_VERSION='"$(GIT_VERSION)"' -I$(CUR | |||
| 13 | 13 | ||
| 14 | export CC CFLAGS | 14 | export CC CFLAGS |
| 15 | 15 | ||
| 16 | TARGETS = pmu | 16 | TARGETS = pmu copyloops |
| 17 | 17 | ||
| 18 | endif | 18 | endif |
| 19 | 19 | ||
diff --git a/tools/testing/selftests/powerpc/copyloops/Makefile b/tools/testing/selftests/powerpc/copyloops/Makefile new file mode 100644 index 000000000000..6f2d3be227f9 --- /dev/null +++ b/tools/testing/selftests/powerpc/copyloops/Makefile | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | # The loops are all 64-bit code | ||
| 2 | CFLAGS += -m64 | ||
| 3 | CFLAGS += -I$(CURDIR) | ||
| 4 | CFLAGS += -D SELFTEST | ||
| 5 | |||
| 6 | # Use our CFLAGS for the implicit .S rule | ||
| 7 | ASFLAGS = $(CFLAGS) | ||
| 8 | |||
| 9 | PROGS := copyuser_64 copyuser_power7 memcpy_64 memcpy_power7 | ||
| 10 | EXTRA_SOURCES := validate.c ../harness.c | ||
| 11 | |||
| 12 | all: $(PROGS) | ||
| 13 | |||
| 14 | copyuser_64: CPPFLAGS += -D COPY_LOOP=test___copy_tofrom_user_base | ||
| 15 | copyuser_power7: CPPFLAGS += -D COPY_LOOP=test___copy_tofrom_user_power7 | ||
| 16 | memcpy_64: CPPFLAGS += -D COPY_LOOP=test_memcpy | ||
| 17 | memcpy_power7: CPPFLAGS += -D COPY_LOOP=test_memcpy_power7 | ||
| 18 | |||
| 19 | $(PROGS): $(EXTRA_SOURCES) | ||
| 20 | |||
| 21 | run_tests: all | ||
| 22 | @-for PROG in $(PROGS); do \ | ||
| 23 | ./$$PROG; \ | ||
| 24 | done; | ||
| 25 | |||
| 26 | clean: | ||
| 27 | rm -f $(PROGS) *.o | ||
| 28 | |||
| 29 | .PHONY: all run_tests clean | ||
diff --git a/tools/testing/selftests/powerpc/copyloops/asm/ppc_asm.h b/tools/testing/selftests/powerpc/copyloops/asm/ppc_asm.h new file mode 100644 index 000000000000..ccd9c84c4e3f --- /dev/null +++ b/tools/testing/selftests/powerpc/copyloops/asm/ppc_asm.h | |||
| @@ -0,0 +1,86 @@ | |||
| 1 | #include <ppc-asm.h> | ||
| 2 | |||
| 3 | #define CONFIG_ALTIVEC | ||
| 4 | |||
| 5 | #define r1 1 | ||
| 6 | |||
| 7 | #define vr0 0 | ||
| 8 | #define vr1 1 | ||
| 9 | #define vr2 2 | ||
| 10 | #define vr3 3 | ||
| 11 | #define vr4 4 | ||
| 12 | #define vr5 5 | ||
| 13 | #define vr6 6 | ||
| 14 | #define vr7 7 | ||
| 15 | #define vr8 8 | ||
| 16 | #define vr9 9 | ||
| 17 | #define vr10 10 | ||
| 18 | #define vr11 11 | ||
| 19 | #define vr12 12 | ||
| 20 | #define vr13 13 | ||
| 21 | #define vr14 14 | ||
| 22 | #define vr15 15 | ||
| 23 | #define vr16 16 | ||
| 24 | #define vr17 17 | ||
| 25 | #define vr18 18 | ||
| 26 | #define vr19 19 | ||
| 27 | #define vr20 20 | ||
| 28 | #define vr21 21 | ||
| 29 | #define vr22 22 | ||
| 30 | #define vr23 23 | ||
| 31 | #define vr24 24 | ||
| 32 | #define vr25 25 | ||
| 33 | #define vr26 26 | ||
| 34 | #define vr27 27 | ||
| 35 | #define vr28 28 | ||
| 36 | #define vr29 29 | ||
| 37 | #define vr30 30 | ||
| 38 | #define vr31 31 | ||
| 39 | |||
| 40 | #define R14 r14 | ||
| 41 | #define R15 r15 | ||
| 42 | #define R16 r16 | ||
| 43 | #define R17 r17 | ||
| 44 | #define R18 r18 | ||
| 45 | #define R19 r19 | ||
| 46 | #define R20 r20 | ||
| 47 | #define R21 r21 | ||
| 48 | #define R22 r22 | ||
| 49 | |||
| 50 | #define STACKFRAMESIZE 256 | ||
| 51 | #define STK_PARAM(i) (48 + ((i)-3)*8) | ||
| 52 | #define STK_REG(i) (112 + ((i)-14)*8) | ||
| 53 | |||
| 54 | #define _GLOBAL(A) FUNC_START(test_ ## A) | ||
| 55 | |||
| 56 | #define PPC_MTOCRF(A, B) mtocrf A, B | ||
| 57 | |||
| 58 | FUNC_START(enter_vmx_usercopy) | ||
| 59 | li r3,1 | ||
| 60 | blr | ||
| 61 | |||
| 62 | FUNC_START(exit_vmx_usercopy) | ||
| 63 | li r3,0 | ||
| 64 | blr | ||
| 65 | |||
| 66 | FUNC_START(enter_vmx_copy) | ||
| 67 | li r3,1 | ||
| 68 | blr | ||
| 69 | |||
| 70 | FUNC_START(exit_vmx_copy) | ||
| 71 | blr | ||
| 72 | |||
| 73 | FUNC_START(memcpy_power7) | ||
| 74 | blr | ||
| 75 | |||
| 76 | FUNC_START(__copy_tofrom_user_power7) | ||
| 77 | blr | ||
| 78 | |||
| 79 | FUNC_START(__copy_tofrom_user_base) | ||
| 80 | blr | ||
| 81 | |||
| 82 | #define BEGIN_FTR_SECTION | ||
| 83 | #define FTR_SECTION_ELSE | ||
| 84 | #define ALT_FTR_SECTION_END_IFCLR(x) | ||
| 85 | #define ALT_FTR_SECTION_END(x, y) | ||
| 86 | #define END_FTR_SECTION_IFCLR(x) | ||
diff --git a/tools/testing/selftests/powerpc/copyloops/asm/processor.h b/tools/testing/selftests/powerpc/copyloops/asm/processor.h new file mode 100644 index 000000000000..e69de29bb2d1 --- /dev/null +++ b/tools/testing/selftests/powerpc/copyloops/asm/processor.h | |||
diff --git a/tools/testing/selftests/powerpc/copyloops/copyuser_64.S b/tools/testing/selftests/powerpc/copyloops/copyuser_64.S new file mode 120000 index 000000000000..f1c418a2521a --- /dev/null +++ b/tools/testing/selftests/powerpc/copyloops/copyuser_64.S | |||
| @@ -0,0 +1 @@ | |||
| ../../../../../arch/powerpc/lib/copyuser_64.S \ No newline at end of file | |||
diff --git a/tools/testing/selftests/powerpc/copyloops/copyuser_power7.S b/tools/testing/selftests/powerpc/copyloops/copyuser_power7.S new file mode 120000 index 000000000000..478689598298 --- /dev/null +++ b/tools/testing/selftests/powerpc/copyloops/copyuser_power7.S | |||
| @@ -0,0 +1 @@ | |||
| ../../../../../arch/powerpc/lib/copyuser_power7.S \ No newline at end of file | |||
diff --git a/tools/testing/selftests/powerpc/copyloops/memcpy_64.S b/tools/testing/selftests/powerpc/copyloops/memcpy_64.S new file mode 120000 index 000000000000..cce33fb6f9d8 --- /dev/null +++ b/tools/testing/selftests/powerpc/copyloops/memcpy_64.S | |||
| @@ -0,0 +1 @@ | |||
| ../../../../../arch/powerpc/lib/memcpy_64.S \ No newline at end of file | |||
diff --git a/tools/testing/selftests/powerpc/copyloops/memcpy_power7.S b/tools/testing/selftests/powerpc/copyloops/memcpy_power7.S new file mode 120000 index 000000000000..0d6fbfaf3d59 --- /dev/null +++ b/tools/testing/selftests/powerpc/copyloops/memcpy_power7.S | |||
| @@ -0,0 +1 @@ | |||
| ../../../../../arch/powerpc/lib/memcpy_power7.S \ No newline at end of file | |||
diff --git a/tools/testing/selftests/powerpc/copyloops/validate.c b/tools/testing/selftests/powerpc/copyloops/validate.c new file mode 100644 index 000000000000..1750ff57ee58 --- /dev/null +++ b/tools/testing/selftests/powerpc/copyloops/validate.c | |||
| @@ -0,0 +1,99 @@ | |||
| 1 | #include <malloc.h> | ||
| 2 | #include <string.h> | ||
| 3 | #include <stdlib.h> | ||
| 4 | #include <stdbool.h> | ||
| 5 | |||
| 6 | #include "../utils.h" | ||
